#include <aleph-graph.H>
Public Member Functions | |
| Bit_Fields () noexcept | |
| All the bits are set to zero. | |
| bool | get_bit (int bit) const noexcept |
| void | set_bit (int bit, int value) noexcept |
| unsigned int | get_state () const noexcept |
| Return the state value. | |
| std::string | str_state () const |
| Return a stringficated version of state. | |
| void | set_state (unsigned char s) noexcept |
Set the state to the value s | |
| void | reset (int bit) noexcept |
Reset bit to zero. | |
| void | reset () noexcept |
| Reset all bits and state to zero. | |
Public Attributes | |
| unsigned int | depth_first: 1 |
| unsigned int | breadth_first: 1 |
| Depth first search. | |
| unsigned int | test_cycle: 1 |
| Breadth first search. | |
| unsigned int | find_path: 1 |
| Cycle existence test. | |
| unsigned int | euler: 1 |
| Path searching (there are several types) | |
| unsigned int | maximum_flow: 1 |
| Used during eulerian searching. | |
| unsigned int | spanning_tree: 1 |
| Used by the maximum flow algorithms. | |
| unsigned int | build_subtree: 1 |
| Used by spannign tree algorithms. | |
| unsigned int | convert_tree: 1 |
| Used by subtree or subgraph building. | |
| unsigned int | cut: 1 |
| Used for Tree_Node conversion. | |
| unsigned int | min: 1 |
| Used for cut points computing. | |
| unsigned int | state: 2 |
Bit fields for nodes and arcs used for marking visit state during processing.
Each node and arc of a graph contains a bitmask intended to mark visit state during the execution of an algorithm. The bits are named according to their use by the library.
If your you intend to use some of these bits for your own processing, then make sure of two things:
|
inlinenoexcept |
Get a control bit.
It is recommended to use the bit name. By example
NODE_BITS(p).get_bit(Breadth_First)
| [in] | bit | number (or name) of the bit to be read |
| out_of_range | if bit is greater or equal than Num_Bits_Graph. |
|
inlinenoexcept |
Set a control bit.
Set a specific control bit to zero or one.
The real value of value is not verified. Anything different than zero will be considered as 1.
| [in] | bit | to set |
| [in] | value | the value to set |
| out_of_range | if bit is greater or equal than Num_Bits_Graph. |
Here is the caller graph for this function:| unsigned int Aleph::Bit_Fields::state |
Used for min path or min spanning tree Visit state.
Note that there are two bits. So you can manage 4 different states.