![]() |
Radium Engine
1.6.3
|
#include <Core/Containers/AdjacencyList.hpp>
Collaboration diagram for Ra::Core::AdjacencyList:Public Types | |
| enum class | ConsistencyStatus { Valid , IncompatibleChildrenAndParentList , WrongParentOrdering , WrongParentIndex , InconsistentParentIndex , NonLeafNodeWithoutChild } |
Public Member Functions | |
| AdjacencyList () | |
| CONSTRUCTOR. | |
| AdjacencyList (const uint n) | |
| AdjacencyList (const AdjacencyList &adj) | |
| AdjacencyList & | operator= (const AdjacencyList &)=default |
| ~AdjacencyList () | |
| DESTRUCTOR. | |
| uint | addRoot () |
| Return the index of the added root. | |
| uint | addNode (const uint parent) |
| Return the index of the added leaf. | |
| void | pruneLeaves (std::vector< uint > &pruned, std::vector< bool > &delete_flag) |
| Prune the leaves of the graph and returns the changes. | |
| void | pruneLeaves () |
| Prune the leaves of the graph. | |
| VectorArray< Eigen::Matrix< uint, 2, 1 > > | extractEdgeList (bool include_leaf=false) const |
| uint | size () const |
| Return the number of nodes in the graph. | |
| void | clear () |
| Clear the vectors. | |
| ConsistencyStatus | computeConsistencyStatus () const |
| Return true if the graph is consistent. | |
| bool | isEmpty () const |
| Return true if the graph is empty. | |
| bool | isRoot (const uint i) const |
| Return true if a node is a root node. | |
| bool | isLeaf (const uint i) const |
| Return true if the node is a leaf node. | |
| bool | isBranch (const uint i) const |
| Return true if the node is a branch node. ( |child| > 1 ) | |
| bool | isJoint (const uint i) const |
| Return true if the node is a joint node. ( |child| == 1 ) | |
| bool | isEdge (const uint i, const uint j) const |
| Return true if the edge { i, j } exists. | |
| const Adjacency & | children () const |
| const ParentList & | parents () const |
The AdjacencyList contains the adjacency matrix expressed as a vector of indices and a vector containing the index of the parents indices of the i-th node.
Definition at line 23 of file AdjacencyList.hpp.
|
strong |
Definition at line 26 of file AdjacencyList.hpp.
| Ra::Core::AdjacencyList::AdjacencyList | ( | ) |
CONSTRUCTOR.
Definition at line 9 of file AdjacencyList.cpp.
|
explicit |
Definition at line 10 of file AdjacencyList.cpp.
| Ra::Core::AdjacencyList::AdjacencyList | ( | const AdjacencyList & | adj | ) |
Definition at line 11 of file AdjacencyList.cpp.
| Ra::Core::AdjacencyList::~AdjacencyList | ( | ) |
DESTRUCTOR.
Definition at line 15 of file AdjacencyList.cpp.
| uint Ra::Core::AdjacencyList::addNode | ( | const uint | parent | ) |
Return the index of the added leaf.
Definition at line 26 of file AdjacencyList.cpp.
Here is the call graph for this function:| uint Ra::Core::AdjacencyList::addRoot | ( | ) |
Return the index of the added root.
NODE.
Definition at line 18 of file AdjacencyList.cpp.
Here is the call graph for this function:
|
inline |
Definition at line 95 of file AdjacencyList.hpp.
|
inline |
Clear the vectors.
Definition at line 117 of file AdjacencyList.hpp.
Here is the call graph for this function:| AdjacencyList::ConsistencyStatus Ra::Core::AdjacencyList::computeConsistencyStatus | ( | ) | const |
Return true if the graph is consistent.
Definition at line 101 of file AdjacencyList.cpp.
Here is the call graph for this function:| VectorArray< Eigen::Matrix< uint, 2, 1 > > Ra::Core::AdjacencyList::extractEdgeList | ( | bool | include_leaf = false | ) | const |
Return the edge list built from the given adjacency list. If include_leaf is true, the list will contain the pairs: ... { i, i } ... where i is the index of a leaf node.
Definition at line 78 of file AdjacencyList.cpp.
Here is the call graph for this function:
|
inline |
Return true if the node is a branch node. ( |child| > 1 )
Definition at line 132 of file AdjacencyList.hpp.
Here is the call graph for this function:
|
inline |
Return true if the edge { i, j } exists.
Definition at line 142 of file AdjacencyList.hpp.
Here is the call graph for this function:
|
inline |
Return true if the graph is empty.
Definition at line 83 of file AdjacencyList.hpp.
|
inline |
Return true if the node is a joint node. ( |child| == 1 )
Definition at line 137 of file AdjacencyList.hpp.
Here is the call graph for this function:
|
inline |
Return true if the node is a leaf node.
Definition at line 127 of file AdjacencyList.hpp.
Here is the call graph for this function:
|
inline |
Return true if a node is a root node.
Definition at line 122 of file AdjacencyList.hpp.
Here is the call graph for this function:
|
inline |
Definition at line 97 of file AdjacencyList.hpp.
| void Ra::Core::AdjacencyList::pruneLeaves | ( | ) |
Prune the leaves of the graph.
Definition at line 72 of file AdjacencyList.cpp.
Here is the call graph for this function:| void Ra::Core::AdjacencyList::pruneLeaves | ( | std::vector< uint > & | pruned, |
| std::vector< bool > & | delete_flag ) |
Prune the leaves of the graph and returns the changes.
Definition at line 36 of file AdjacencyList.cpp.
Here is the call graph for this function:
|
inline |
Return the number of nodes in the graph.
Definition at line 112 of file AdjacencyList.hpp.
Here is the call graph for this function: