RobWorkProject  23.9.11-
Public Member Functions | Protected Attributes | List of all members
CNodePool Class Reference

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
 
ConstraintNodecreateCNode (ConstraintNode::NodeType type)
 create a ConstraintNode
 
void deleteCNode (ConstraintNode *node)
 delete a constraint node
 
ConstraintEdgecreateCEdge (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
 

Detailed Description

interface for creating and deleting constraintEdges and ConstraintNodes.

ConstraintEdges are frequently created and deleted so efficient data structures are needed.


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