This class describes a node indexer.
Constructors and destructors | |
| SBDDataGraphNodeIndexer () | |
| Constructs a node indexer. | |
| SBDDataGraphNodeIndexer (unsigned int initialSize) | |
Constructs a node indexer with a pre-allocated initialSize. | |
| virtual | ~SBDDataGraphNodeIndexer () |
| Destructs the node indexer. | |
Management | |
| unsigned int | addNode (SBDDataGraphNode *node) |
Adds a node to the indexer and returns the index of the node. | |
| unsigned int | removeNode (SBDDataGraphNode *node) |
| Erases the node from the indexer. | |
| bool | hasNode (SBDDataGraphNode *node) const |
| Returns true if the node has an index. | |
| SBDDataGraphNode * | getNode (unsigned int index) const |
| Returns the node with the given index. | |
| bool | hasIndex (SBDDataGraphNode *node) const |
| Returns true if the node has an index. | |
| unsigned int | getIndex (SBDDataGraphNode *node) const |
| Returns the index associated to the node. | |
| bool | getIndex (SBDDataGraphNode *node, unsigned int &index) const |
| Returns the index associated to the node. | |
| void | getNodes (SBDDataGraphNodeIndexer &nodeIndexer, const SBNodePredicate &selectionPredicate=SBNodePredicateTrue(), const SBNodePredicate &visitPredicate=SBNodePredicateTrue(), bool includeDependencies=false) |
Collects nodes into nodeIndexer, based on a selectionPredicate and a visitPredicate, with our without dependencies. More... | |
| SBDDataGraphNode * | operator[] (unsigned int i) const |
| Returns the node with the given index. | |
Additional Inherited Members | |
Public Member Functions inherited from SBCContainerIndexer< SBDDataGraphNode *> | |
| SBCContainerIndexer () | |
| Creates an indexer. | |
| SBCContainerIndexer (unsigned int initialSize) | |
| Creates an indexer with a default pre-allocated size. | |
| SBCContainerIndexer (std::set< SBDDataGraphNode * > &objectSet) | |
| Indexes a set of objects. | |
| SBCContainerIndexer (std::vector< SBDDataGraphNode * > &objectVector) | |
| Indexes a vector of objects. | |
| SBCContainerIndexer (const SBCContainerIndexer &indexer) | |
Creates a copy of indexer indexer. | |
| virtual | ~SBCContainerIndexer () |
| Destructs the indexer. | |
| SBCContainerIndexer & | operator= (const SBCContainerIndexer &indexer) |
Assigns a copy of indexer indexer to this. | |
| void | clear () |
| Clears the indexer. | |
| unsigned int | push_back (const SBDDataGraphNode * &object) |
| Adds an object in the indexer if possible, and returns the index of the object. | |
| unsigned int | insert (unsigned int i, const SBDDataGraphNode * &object) |
Inserts an object in the indexer at position i if possible, and returns the index of the object. | |
| unsigned int | pop_back () |
| Adds an object in the indexer and returns the index of the object. | |
| unsigned int | eraseObject (const SBDDataGraphNode * &object) |
| Erases the object from the indexer. More... | |
| unsigned int | eraseIndex (unsigned int objectIndex) |
| Erases object objectIndex from the indexer. More... | |
| bool | empty () const |
| Returns true if and only if the indexer is empty. | |
| unsigned int | size () const |
| Returns the number of indexed objects. | |
| bool | hasIndex (const SBDDataGraphNode * &object) const |
| Returns true if the object has an index. | |
| unsigned int | getIndex (const SBDDataGraphNode * &object) const |
| Returns the index associated to the object. | |
| bool | getIndex (const SBDDataGraphNode * &object, unsigned int &index) const |
| Returns the index associated to the object. | |
| SBDDataGraphNode * | getObject (unsigned int index) const |
| Returns the object associated to the index. | |
| SBDDataGraphNode * | operator[] (unsigned int index) const |
| Returns the object associated to the index. | |
| iterator | begin () |
| Returns an iterator that points to the beginning of the indexer. | |
| const_iterator | begin () const |
| Returns an iterator that points to the beginning of the indexer. | |
| iterator | end () |
| Returns an iterator that points to the end of the indexer. | |
| const_iterator | end () const |
| Returns an iterator that points to the end of the indexer. | |
| reverse_iterator | rbegin () |
| Returns a reverse iterator that points to the reverse beginning of the indexer. | |
| const_reverse_iterator | rbegin () const |
| Returns a reverse iterator that points to the reverse beginning of the indexer. | |
| reverse_iterator | rend () |
| Returns a reverse iterator that points to the reverse end of the indexer. | |
| const_reverse_iterator | rend () const |
| Returns a reverse iterator that points to the reverse end of the indexer. | |
| void | print () const |
| Prints some debugging information. | |
Protected Attributes inherited from SBCContainerIndexer< SBDDataGraphNode *> | |
| SBCContainerHashMap< SBDDataGraphNode *, unsigned int > * | indexMap |
| The hash map. | |
| SBCContainerVector< SBDDataGraphNode *> * | objectVector |
| The object vector. | |
| void SBDDataGraphNodeIndexer::getNodes | ( | SBDDataGraphNodeIndexer & | nodeIndexer, |
| const SBNodePredicate & | selectionPredicate = SBNodePredicateTrue(), |
||
| const SBNodePredicate & | visitPredicate = SBNodePredicateTrue(), |
||
| bool | includeDependencies = false |
||
| ) |
For each node in the indexer, this function calls the getNodes function.
Note that the nodeIndexer is not cleared when entering this function.