Index library#
To use one of the described component here, you have to import them from revsymg.index_lib
.
Types#
Type |
Alias - value |
Description |
---|---|---|
Index type |
||
\(\mathbb{B} = \{0 ; 1\}\) |
Orientations type |
|
Oriented vertex type |
||
Edges type |
||
Adjacent vertex with edge index type |
||
Edges with edge index type |
- IndexT#
Index type
- OrT#
Orientations type
- Value:
binaries set \(\mathbb{B} = \{0 ; 1\}\)
Constants#
For
OrT
type:
For
IndOrT
type:
For
EIndOrT
type:
The index for predecessors of forwards in adjancies table |
|
The index for successors of forwards in adjancies table |
For
IndOrIndT
type:
For
EIndOrIndT
type:
The index of edge's index in the edge. |
Other:
Index multiplier. |
All the constants
- PRED_IND = 0#
The index for predecessors of forwards in adjancies table
- SUCC_IND = 1#
The index for successors of forwards in adjancies table
- E_IND = 2#
The index of edge’s index in the edge.
For both
EIndOrIndT
andEIndIndT
it corresponds toIndexT
value.
- MULT_IID = 2#
Index multiplier.
Functions#
For
IndOrT
type:
|
Return True if the vertex is considered as forward. |
|
Return True if the vertex is considered as reverse. |
|
Return the reverse vertex. |
For
EIndOrT
type:
|
Return the reverse edge. |
|
Xor boolean function between edge and its reverse. |
|
Return the edge orientation. |
All the functions:
- is_forward(vertex)#
Return True if the vertex is considered as forward.
- is_reverse(vertex)#
Return True if the vertex is considered as reverse.
- rev_vertex(vertex)#
Return the reverse vertex.
- rev_edge(first_vertex, second_vertex)#
Return the reverse edge.
- is_canonical(first_vertex, second_vertex)#
Xor boolean function between edge and its reverse.
- Parameters:
- Returns:
True if \(\texttt{is_canonical}(\overline{edge})\) is False, else False
- Return type:
Notes
\(\texttt{is_canonical}\) is defined such as \(\texttt{is_canonical}(edge) \veebar \texttt{is_canonical}(\overline{edge})\)
- eindor_orientation(first_vertex, second_vertex)#
Return the edge orientation.
- Parameters:
- Returns:
Edge orientation
- Return type:
Notes
This is pure definition. Note that in case of self loop, return value is
FORWARD_INT