26 #ifndef DOXYGEN_SHOULD_SKIP_THIS 33 template <
typename VAL >
39 template <
typename VAL >
45 template <
typename VAL >
50 template <
typename T >
54 for (
const auto iter = h.begin(); iter != h.end(); ++iter) {
55 NodeId new_one = iter.key();
58 GUM_ERROR(DuplicateElement, new_one <<
" already exists in the graph");
67 #endif // DOXYGEN_SHOULD_SKIP_THIS Base node set class for graphs.
virtual void addNodeWithId(const NodeId id)
try to insert a node with the given id
List< VAL > listMapNodes(VAL(*f)(const NodeId &)) const
a method to create a list of VAL from a set of nodes (using for every nodee, say x, the VAL f(x))
NodeProperty< VAL > nodesProperty(VAL(*f)(const NodeId &), Size size=0) const
a method to create a HashTable with key:NodeId and value:VAL
gum is the global namespace for all aGrUM entities
HashTable< Key, NewKey, NewAlloc > hashMap(NewKey(*f)(const Key &), Size capacity=0) const
Creates a hashtable of NewKey from the set.
NodeSet asNodeSet() const
returns a copy of the set of nodes represented by the NodeGraphPart
void populateNodesFromProperty(const NodeProperty< T > &h)
populateNodesFromProperty clears *this and fills it with the keys of "h"
virtual void clear()
alias for clearNodes
bool existsNode(const NodeId id) const
returns true iff the NodeGraphPart contains the given nodeId
List< NewKey, NewAlloc > listMap(NewKey(*f)(const Key &)) const
A method to create a List of NewKey from the set.
std::size_t Size
In aGrUM, hashed values are unsigned long int.
Size NodeId
Type for node ids.
#define GUM_ERROR(type, msg)