![]() |
RobWorkProject
25.2.11-
|
interface for creating and deleting constraintEdges and ConstraintNodes. More...
#include <CNodePool.hpp>
Public Member Functions | |
CNodePool (int nrNodes=0, int nrEdges=0) | |
initialize the node and edge buffers | |
ConstraintNode * | createCNode (ConstraintNode::NodeType type) |
create a ConstraintNode | |
void | deleteCNode (ConstraintNode *node) |
delete a constraint node | |
ConstraintEdge * | createCEdge (const CNodePair &pair, ConstraintEdge::EdgeType type) |
void | deleteCEdge (ConstraintEdge *edge) |
delete an edge from the pool. The edge will be recycled | |
const std::vector< ConstraintNode * > & | getNodes () const |
gets the complete list of constraint nodes in the pool. NULL elements can occour. | |
const std::vector< ConstraintEdge * > & | getEdges () const |
gets the complete list of constraint edges in the pool. NULL elements can occour. | |
Protected Attributes | |
std::vector< ConstraintNode * > | _nodes |
std::vector< ConstraintEdge * > | _edges |
std::stack< int > | _freeNodeIDs |
std::stack< int > | _freeEdgeIDs |
interface for creating and deleting constraintEdges and ConstraintNodes.
ConstraintEdges are frequently created and deleted so efficient data structures are needed.