58 template<
class NodeData>
74 inline const std::set<Node*>&
80 inline const NodeData&
133 for (
typename std::vector<Node*>::iterator nit =
nodes_.begin () ; nit !=
nodes_.end () ; ++nit )
146 for (
typename std::vector<Node*>::iterator nit =
nodes_.begin () ; nit !=
nodes_.end () ; ++nit )
149 nodes_.resize (
static_cast<std::size_t
> (n));
151 for (
int i = 0 ; i < n ; ++i )
158 std::vector<Node*> sorted_nodes (
nodes_.size ());
162 for (
typename std::vector<Node*>::iterator it =
nodes_.begin () ; it !=
nodes_.end () ; ++it )
164 sorted_nodes[i++] = *it;
169 std::sort (sorted_nodes.begin (), sorted_nodes.end (),
Node::compare);
172 for (
typename std::vector<Node*>::iterator it = sorted_nodes.begin () ; it != sorted_nodes.end () ; ++it )
182 for (
typename std::set<Node*>::iterator neigh = (*it)->neighbors_.begin () ; neigh != (*it)->neighbors_.end () ; ++neigh )
185 off_nodes.push_back (*neigh);
189 on_nodes.push_back (*it);
219 inline typename std::vector<Node*>&