38 struct Root_vertex_handle {
39 typedef int boost_vertex_handle;
41 explicit Root_vertex_handle(boost_vertex_handle val = -1)
43 boost_vertex_handle vertex;
45 bool operator!=(
const Root_vertex_handle& other)
const {
46 return !(this->vertex == other.vertex);
49 bool operator==(
const Root_vertex_handle& other)
const {
50 return this->vertex == other.vertex;
53 bool operator<(
const Root_vertex_handle& other)
const {
54 return this->vertex < other.vertex;
57 friend std::ostream& operator<<(std::ostream& o,
58 const Root_vertex_handle & v) {
64 struct Vertex_handle {
70 operator int()
const {
71 return static_cast<int> (vertex);
74 boost_vertex_handle vertex;
76 bool operator==(
const Vertex_handle& other)
const {
77 return this->vertex == other.vertex;
80 bool operator!=(
const Vertex_handle& other)
const {
81 return this->vertex != other.vertex;
84 bool operator<(
const Vertex_handle& other)
const {
85 return this->vertex < other.vertex;
88 friend std::ostream& operator<<(std::ostream& o,
const Vertex_handle & v) {
96 Root_vertex_handle id_;
99 virtual ~Graph_vertex() { }
109 bool is_active()
const {
113 void set_id(Root_vertex_handle i) {
117 Root_vertex_handle get_id()
const {
121 virtual std::string to_string()
const {
122 std::ostringstream res;
127 friend std::ostream& operator<<(std::ostream& o,
const Graph_vertex & v) {
134 Root_vertex_handle a_;
135 Root_vertex_handle b_;
152 void setId(Root_vertex_handle a, Root_vertex_handle b) {
157 Root_vertex_handle first()
const {
161 Root_vertex_handle second()
const {
165 friend std::ostream& operator<<(std::ostream& o,
const Graph_edge & v) {
166 o <<
"(" << v.a_ <<
"," << v.b_ <<
" - id = " << v.index();