A body node. More...
#include <dependency_graph.h>
Public Types | |
enum | Flag { flag_has_delta = 4u, flag_seen = 8u } |
enum | Type { type_normal = 0u, type_count = 1u, type_sum = 3u } |
Public Member Functions | |
BodyNode (PrgBody *b, uint32 scc) | |
bool | delta () const |
Any disjunctive heads? | |
weight_t | ext_bound () const |
Bound of extended body. | |
bool | extended () const |
Is the body an extended body? | |
NodeId | get_pred (uint32 idx) const |
uint32 | get_pred_idx (NodeId atomId) const |
Returns idx of atomId in preds. | |
const NodeId * | heads_begin () const |
Heads (i.e. successors): atoms from same SCC precede those from other SCCs. | |
const NodeId * | heads_end () const |
uint32 | num_preds () const |
Number of predecessors (counting external subgoals). | |
uint32 | pred_inc () const |
Increment to jump from one pred to the next. | |
uint32 | pred_weight (uint32 i, bool ext) const |
Weight of ith subgoal. | |
const NodeId * | preds () const |
Predecessors from same SCC [a1,...an, idMax]. | |
bool | seen () const |
void | seen (bool b) |
bool | sum () const |
Is the body a sum body? |
A body node.
The PBDAG stores a node of type BodyNode for each body that defines a non-trivially connected atom. The predecessors of a BodyNode are the body's subgoals. Its successors are the heads that are defined by the body.
Definition at line 154 of file dependency_graph.h.
Definition at line 156 of file dependency_graph.h.
Definition at line 155 of file dependency_graph.h.
Clasp::SharedDependencyGraph::BodyNode::BodyNode | ( | PrgBody * | b, |
uint32 | scc | ||
) | [inline, explicit] |
Definition at line 157 of file dependency_graph.h.
bool Clasp::SharedDependencyGraph::BodyNode::delta | ( | ) | const [inline] |
Any disjunctive heads?
Definition at line 182 of file dependency_graph.h.
weight_t Clasp::SharedDependencyGraph::BodyNode::ext_bound | ( | ) | const [inline] |
Bound of extended body.
Definition at line 228 of file dependency_graph.h.
bool Clasp::SharedDependencyGraph::BodyNode::extended | ( | ) | const [inline] |
Is the body an extended body?
Definition at line 224 of file dependency_graph.h.
NodeId Clasp::SharedDependencyGraph::BodyNode::get_pred | ( | uint32 | idx | ) | const [inline] |
Definition at line 200 of file dependency_graph.h.
uint32 Clasp::SharedDependencyGraph::BodyNode::get_pred_idx | ( | NodeId | atomId | ) | const [inline] |
Returns idx of atomId in preds.
Definition at line 192 of file dependency_graph.h.
const NodeId* Clasp::SharedDependencyGraph::BodyNode::heads_begin | ( | ) | const [inline] |
Heads (i.e. successors): atoms from same SCC precede those from other SCCs.
Definition at line 179 of file dependency_graph.h.
const NodeId* Clasp::SharedDependencyGraph::BodyNode::heads_end | ( | ) | const [inline] |
Definition at line 180 of file dependency_graph.h.
uint32 Clasp::SharedDependencyGraph::BodyNode::num_preds | ( | ) | const [inline] |
Number of predecessors (counting external subgoals).
Definition at line 213 of file dependency_graph.h.
uint32 Clasp::SharedDependencyGraph::BodyNode::pred_inc | ( | ) | const [inline] |
Increment to jump from one pred to the next.
Definition at line 202 of file dependency_graph.h.
uint32 Clasp::SharedDependencyGraph::BodyNode::pred_weight | ( | uint32 | i, |
bool | ext | ||
) | const [inline] |
Weight of ith subgoal.
Definition at line 207 of file dependency_graph.h.
const NodeId* Clasp::SharedDependencyGraph::BodyNode::preds | ( | ) | const [inline] |
Predecessors from same SCC [a1,...an, idMax].
Definition at line 190 of file dependency_graph.h.
bool Clasp::SharedDependencyGraph::BodyNode::seen | ( | ) | const [inline] |
Definition at line 165 of file dependency_graph.h.
void Clasp::SharedDependencyGraph::BodyNode::seen | ( | bool | b | ) | [inline] |
Definition at line 166 of file dependency_graph.h.
bool Clasp::SharedDependencyGraph::BodyNode::sum | ( | ) | const [inline] |
Is the body a sum body?
Definition at line 226 of file dependency_graph.h.