#include <DAGNode.h>
Inheritance diagram for DAGNode:

Public Methods | |
| DAGNode (NODE_LABEL lbl=NODE_LBL_DEFAULT_VAL) | |
| DAGNode constructor. | |
| virtual DAGNode * | CreateObject () const=0 |
| This function is required by the SmartPtr class. | |
| virtual | ~DAGNode () |
| Necessary virtual destructor. | |
| virtual DAGNode & | operator= (const DAGNode &rhs) |
| Copies the info of <rhs> into the corresponding member variables. | |
| virtual void | Clear () |
| Initializes the contents of the object to their original values. | |
| virtual istream & | Read (istream &is) |
| virtual ostream & | Write (ostream &os) const |
| virtual void | Print (ostream &os=cout) const |
| Prints the DAGNode to the specified stream. | |
| virtual void | ComputeDerivedValues () |
| void | Set (NODE_LABEL nl, double el) |
| Similarity function for two nodes. | |
| void | SetChildrenTSV (const TSV &tsv) |
| Sets the node's TSV assosiated with its adjacent nodes. | |
| TSV | GetTSV (int nDim) const |
DAGNode is an abstract class intended to provide the basic functionality of a DAG node and to specify which functions must be overloaded (the pure virtual ones).
At this moment, many functions that could belong to the DAGNode class, such as NodeDistance() and so on, are implemented in the DAG class. The reason for this is that some of these functions require information about the neighbours of the node, and that information is contained in the DAG class. However, if a node had a member variable of type leda_node that links it to the associated node in the graph, all the above functions could be implemented in the DAGNode class. Remember that given a leda_node v, we can retrieve the graph it belongs to by calling graph_of(v). A drawback of this approach would be that we introduce some risk of inconsistency because when we move a node from one graph to another, we need to change the value of its reference to the leda_node accordingly.
/see DAG and DAGNodePtr.
Definition at line 80 of file DAGNode.h.
|
|
Computes the node's TSV norm considering that the TSV includes the eigenvalue of the node too. Reimplemented in SGNode. Definition at line 177 of file DAGNode.cpp. References TSV::Norm2(). Referenced by SGNode::ComputeDerivedValues(). |
|
|
Returns the node's TSV with dimension equal <nDim>. The TSV is filled with extra zeros if necessary. The TSV of a node is composed of the eigen sums of its adjacent nodes and its own eigen sum.
Definition at line 150 of file DAGNode.cpp. References SmartArray< double >::GetSize(). |
|
|
Reads a DAGNode from the specified stream.
Reimplemented in GGNode, and SGNode. Definition at line 105 of file DAGNode.cpp. References SmartArray< double >::Read(), and String::Read(). Referenced by SGNode::Read(), and GGNode::Read(). |
|
|
Writes the DAGNode to the specified stream.
Reimplemented in GGNode, and SGNode. Definition at line 126 of file DAGNode.cpp. References SmartArray< double >::Write(), and SmartArray< char >::Write(). Referenced by SGNode::Write(), and GGNode::Write(). |
1.2.18