- Main Page
- Namespaces
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# DependencyNode Class Reference

Inheritance diagram for DependencyNode:

[legend]
Collaboration diagram for DependencyNode:

[legend]
List of all members.

## Public Member Functions
| DependencyNode (BaseModelVariable *myVariable)
virtual | ~DependencyNode ()
BaseModelVariable * | getVariable ()
BaseModelVariable const * | getVariable () const
bool | isSettable () const
void | setSettable (bool newSettable=true)
bool | isVisited () const
void | setVisited (bool newVisited=true)
int | addConnection (DependencyHyperedge *hyperedge)
int | removeConnection (DependencyHyperedge *hyperedge)
DependencyHyperedge & | operator[] (unsigned int index) throw (DependencyArrayIndexOutOfBoundsException)
unsigned int | getNumberOfHyperedges () const
bool | operator== (DependencyNode const &other) const
void | print (ostream &out) const
## Protected Attributes
BaseModelVariable * | variable
| the variable that this node represents
bool | settable
bool | visited
| The visited status of this hypernode.
DynamicArrayTemplate< DependencyHyperedge > | hyperedges
| our hyperedge transitions

## Detailed Description

This class stores the variable, edges, and flags necessary to generate a dependency partition graph and then trace the graph.

Definition at line 455 of file CompileSATDriver.cpp.

## Constructor & Destructor Documentation

DependencyNode::DependencyNode | ( | BaseModelVariable * | myVariable | ) |

creates a new dependency node. This node corresponds to the given variable. Note that only one dependency node should be created per variable.

Parameters:

  | myVariable | the variable

Definition at line 691 of file CompileSATDriver.cpp.

References DependencyNode(), settable, variable, and visited.

Referenced by DependencyNode().

Here is the call graph for this function:

DependencyNode::~DependencyNode | ( |  | ) | `[virtual]`

Destroys this object

Definition at line 702 of file CompileSATDriver.cpp.

References hyperedges.

## Member Function Documentation

BaseModelVariable* DependencyNode::getVariable | ( |  | ) | `[inline]`

returns the variable of this node

Returns:
  a reference to the variable that this node represents

Definition at line 474 of file CompileSATDriver.cpp.

References variable.

BaseModelVariable const* DependencyNode::getVariable | ( |  | ) | const`[inline]`

returns the variable of this node

Returns:
  a reference to the variable that this node represents

Definition at line 480 of file CompileSATDriver.cpp.

References variable.

bool DependencyNode::isSettable | ( |  | ) | const

Returns true if this node contains a settable variable, one that we will not be searching through.

Definition at line 712 of file CompileSATDriver.cpp.

References settable.

void DependencyNode::setSettable | ( | bool | newSettable = `true` | ) |

sets the settable status of this node

Parameters:

  | newSettable | the new settable status for this node

Definition at line 719 of file CompileSATDriver.cpp.

References settable.

bool DependencyNode::isVisited | ( |  | ) | const

Returns true if this hypernode has been visited already

Returns:
  true if this hypernode has been visited.

Definition at line 726 of file CompileSATDriver.cpp.

References visited.

void DependencyNode::setVisited | ( | bool | newVisited = `true` | ) |

sets the visited status of this hypernode.

Parameters:

  | newVisited | the new visited status of this hypernode

Definition at line 733 of file CompileSATDriver.cpp.

References visited.

int DependencyNode::addConnection | ( | DependencyHyperedge * | hyperedge | ) |

Adds a hyperedge to this object. The hyper edge connects together all the nodes mentioned in the node list hyperedge.

Parameters:

  | hyperedge | list of all the nodes referenced by this hyper edge. Note that this object assumes partial ownership of the hyperedge and will increase/decrease the reference count on the hyperedge.

Returns:
  0 on success or a positive value if the edge could not be added. Note that if a positive value is returned, this object will delete the hyperedge if the edge has no references.

Definition at line 740 of file CompileSATDriver.cpp.

References DependencyHyperedge::addReference(), hyperedges, and DependencyHyperedge::releaseReference().

Here is the call graph for this function:

int DependencyNode::removeConnection | ( | DependencyHyperedge * | hyperedge | ) |

Removes the last hyperedge, which should be the hyperedge specified. It then dereferences it.

Parameters:

  | hyperedge | the hyperedge being removed from the end of the edges. This will remove this edge from this node and will dereference the hyperedge.

Returns:
  0 on success or a positive value if the edge could not be added. Note that if a positive value is returned, this object will delete the hyperedge if the edge has no references.

Definition at line 762 of file CompileSATDriver.cpp.

References hyperedges, and DependencyHyperedge::releaseReference().

Here is the call graph for this function:

DependencyHyperedge& DependencyNode::operator[] | ( | unsigned int | index | ) | throw (DependencyArrayIndexOutOfBoundsException)`[inline]`

returns the hyperedge specified by the array index.

Parameters:

  | index | the index of the hyperedge desired

Returns:
  the hyper edge requested or NULL if the index was out of bounds

Definition at line 534 of file CompileSATDriver.cpp.

References hyperedges.

unsigned int DependencyNode::getNumberOfHyperedges | ( |  | ) | const`[inline]`

returns the number of hyperedges that connect to this node

Returns:
  the number of hyperedges that can be indexed into this node

Definition at line 548 of file CompileSATDriver.cpp.

References hyperedges.

bool DependencyNode::operator== | ( | DependencyNode const & | other | ) | const

Returns true if the two nodes are the same.

Parameters:

  | other | The other object being compared to this object.

Returns:
  true if the two objects are the same.

Definition at line 780 of file CompileSATDriver.cpp.

References hyperedges, and variable.

void DependencyNode::print | ( | ostream & | out | ) | const`[virtual]`

called to print this object to the specified ostream.

Parameters:

  | out | the ostream to print this object information to

Implements Mers::Utils::Lang::BaseModelObject.

Definition at line 790 of file CompileSATDriver.cpp.

References hyperedges, settable, and variable.

## Member Data Documentation

bool DependencyNode::settable`[protected]`

the settable status of this object. It is true if the variable of this object is settable.

Definition at line 571 of file CompileSATDriver.cpp.

Referenced by DependencyNode(), isSettable(), print(), and setSettable().

The documentation for this class was generated from the following file:

- /Users/fpy/titan-1-5-MBARI/Mers/Solvers/SAT/GATSAT/CompileSAT/CompileSATDriver.cpp