27 # ifndef ALEPH_GRAPH_H 28 # define ALEPH_GRAPH_H 39 static const long No_Visited = 0;
119 unsigned int depth_first : 1;
141 memset(
this, 0,
sizeof *
this);
158 case Aleph::Depth_First:
return depth_first;
162 case Aleph::Euler:
return euler;
167 case Aleph::Cut:
return cut;
168 case Aleph::Min:
return min;
169 default: assert(
false);
187 assert(value == 0 or value == 1);
190 case Aleph::Depth_First: depth_first = value;
break;
192 case Aleph::Test_Cycle:
test_cycle = value;
break;
193 case Aleph::Find_Path:
find_path = value;
break;
194 case Aleph::Euler:
euler = value;
break;
199 case Aleph::Cut:
cut = value;
break;
200 case Aleph::Min:
min = value;
break;
201 default: assert(
false);
213 case 0:
return std::string(
"Unprocessed");
214 case 1:
return std::string(
"Processing");
215 case 2:
return std::string(
"Processed");
218 return std::string(
"Undefined");
234 memset(
this, 0,
sizeof *
this);
289 void * cookie =
nullptr;
294 control_bits.
reset();
305 # define NODE_BITS(p) ((p)->attrs.control_bits) 311 # define NODE_COUNTER(p) ((p)->attrs.counter) 317 # define NODE_COLOR(p) ((p)->attrs.counter) 327 # define IS_NODE_VISITED(p, bit) (NODE_BITS(p).get_bit(bit)) 333 # define NODE_COOKIE(p) ((p)->attrs.cookie) 339 # define ARC_COUNTER(p) ((p)->attrs.counter) 345 # define ARC_COLOR(p) ((p)->attrs.counter) 351 # define ARC_BITS(p) ((p)->attrs.control_bits) 360 # define IS_ARC_VISITED(p, bit) (ARC_BITS(p).get_bit(bit)) 366 # define ARC_COOKIE(p) ((p)->attrs.cookie) const unsigned char Processing
unsigned int min
Used for cut points computing.
Definition: aleph-graph.H:129
unsigned int breadth_first
Depth first search.
Definition: aleph-graph.H:120
Definition: aleph-graph.H:285
unsigned int convert_tree
Used by subtree or subgraph building.
Definition: aleph-graph.H:127
void reset() noexcept
Reset all bits and state to zero.
Definition: aleph-graph.H:232
unsigned int state
Definition: aleph-graph.H:136
unsigned int cut
Used for Tree_Node conversion.
Definition: aleph-graph.H:128
void reset()
Reset all attributes to their default value.
Definition: aleph-graph.H:292
void reset(int bit) noexcept
Reset bit to zero.
Definition: aleph-graph.H:229
const unsigned char Unprocessed
std::string str_state() const
Return a stringficated version of state.
Definition: aleph-graph.H:209
const unsigned char Processed
unsigned int test_cycle
Breadth first search.
Definition: aleph-graph.H:121
unsigned int find_path
Cycle existence test.
Definition: aleph-graph.H:122
unsigned int build_subtree
Used by spannign tree algorithms.
Definition: aleph-graph.H:126
unsigned int spanning_tree
Used by the maximum flow algorithms.
Definition: aleph-graph.H:125
unsigned int get_state() const noexcept
Return the state value.
Definition: aleph-graph.H:206
Graph_Bits
Definition: aleph-graph.H:54
void set_state(unsigned char s) noexcept
Set the state to the value s
Definition: aleph-graph.H:222
bool get_bit(int bit) const noexcept
Definition: aleph-graph.H:154
void set_bit(int bit, int value) noexcept
Definition: aleph-graph.H:185
unsigned int maximum_flow
Used during eulerian searching.
Definition: aleph-graph.H:124
unsigned int euler
Path searching (there are several types)
Definition: aleph-graph.H:123
Definition: aleph-graph.H:115
Bit_Fields() noexcept
All the bits are set to zero.
Definition: aleph-graph.H:139