58 template<
class NodeData>
74 inline const std::set<Node*>&
149 nodes_.resize (
static_cast<std::size_t
> (n));
151 for (
int i = 0 ; i < n ; ++i )
162 for (
typename std::vector<Node*>::iterator
it =
nodes_.begin () ;
it !=
nodes_.end () ; ++
it )
182 for (
typename std::set<Node*>::iterator
neigh = (*it)->neighbors_.begin () ;
neigh != (*it)->neighbors_.end () ; ++
neigh )
219 inline typename std::vector<Node*>&
Iterator class for point clouds with or without given indices.
const std::set< Node * > & getNeighbors() const
std::set< Node * > neighbors_
const NodeData & getData() const
void setData(const NodeData &data)
void setFitness(int fitness)
static bool compare(const Node *a, const Node *b)
void computeMaximalOnOffPartition(std::list< Node * > &on_nodes, std::list< Node * > &off_nodes)
void resize(int n)
Drops all existing graph nodes and creates 'n' new ones.
std::vector< Node * > & getNodes()
std::vector< Node * > nodes_
void insertDirectedEdge(int id1, int id2)
void deleteUndirectedEdge(int id1, int id2)
void insertUndirectedEdge(int id1, int id2)
void deleteDirectedEdge(int id1, int id2)