This is the simplest implementation of the Cycle concept based on the list. More...
#include <simple_cycle.hpp>
Classes | |
class | edge_iterator |
Iterator on cycle edges. More... | |
class | vertex_iterator |
iterator over vertices of the cycle More... | |
Public Types | |
using | cycle_el_pair = std::pair< CycleEl, CycleEl > |
using | cycle_element = CycleEl |
using | vertices = boost::iterator_range< vertex_iterator > |
using | edges = boost::iterator_range< edge_iterator > |
Public Member Functions | |
template<typename Iter > | |
simple_cycle (Iter begin, Iter end) | |
constructor More... | |
void | flip (const CycleEl &begin, const CycleEl &end) |
std::size_t | size () const |
number of elements in the cycle More... | |
CycleEl | next (const CycleEl &ce) const |
next element in the cycle More... | |
vertex_iterator | vbegin (const CycleEl &el) const |
begin of the vertices range starting at el More... | |
vertex_iterator | vbegin () const |
begin of the vertices range More... | |
vertex_iterator | vend () const |
end of the vertices range More... | |
vertices | get_vertices_range (const CycleEl &el) const |
returns range of vertices starting at el More... | |
vertices | get_vertices_range () const |
returns range of vertices More... | |
edges | get_edge_range (const CycleEl &el) const |
returns edges range starting at el More... | |
edges | get_edge_range () const |
returns edges range More... | |
Protected Types | |
using | SorsMap = std::vector< IdxT > |
Protected Member Functions | |
void | link (IdxT x, IdxT y) |
connects two vertices represented by ids More... | |
void | partial_reverse (IdxT x, IdxT y) |
after this operation links from x to y are connected i reverse order, after this function call cycle is in inconsistent state More... | |
IdxT | to_idx (const CycleEl &ce) const |
vertex to idx More... | |
IdxT | next_idx (IdxT i) const |
returns next idx in the cycle More... | |
IdxT | prev_idx (IdxT i) const |
returns previous idx More... | |
const CycleEl & | from_idx (IdxT i) const |
idx to vertex More... | |
IdxT | add (const CycleEl &el) |
ads new element to cycle data structures More... | |
Protected Attributes | |
bimap< CycleEl, IdxT > | m_cycle_idx |
mapping from elements to indexes | |
SorsMap | m_predecessor_map |
predecessors | |
SorsMap | m_successor_map |
successors | |
This is the simplest implementation of the Cycle concept based on the list.
CycleEl | |
IdxT |
Definition at line 36 of file simple_cycle.hpp.
|
inline |
constructor
Iter |
begin | |
end |
Definition at line 48 of file simple_cycle.hpp.
|
inlineprotected |
ads new element to cycle data structures
el |
Definition at line 447 of file simple_cycle.hpp.
|
inline |
after flip the order will be reversed, ie it will be from 'end' to 'begin'
Definition at line 70 of file simple_cycle.hpp.
|
inlineprotected |
|
inline |
returns edges range starting at el
el |
Definition at line 360 of file simple_cycle.hpp.
|
inline |
|
inline |
returns range of vertices starting at el
el |
Definition at line 230 of file simple_cycle.hpp.
|
inline |
|
inlineprotected |
connects two vertices represented by ids
x | |
y |
Definition at line 380 of file simple_cycle.hpp.
|
inline |
|
inlineprotected |
|
inlineprotected |
after this operation links from x to y are connected i reverse order, after this function call cycle is in inconsistent state
x | |
y |
Definition at line 392 of file simple_cycle.hpp.
|
inlineprotected |
|
inline |
|
inlineprotected |
|
inline |
begin of the vertices range starting at el
el |
Definition at line 205 of file simple_cycle.hpp.
|
inline |
|
inline |