The point graph structure allows us to store the different connections in the computation of the topology, that implies we can reuse the result of the computation of the topology.
For that, the structure stores the points and an adjacency list.
R
is the container for the points.S
is the adjacency list.shared_object<vector<point<C>
> >. We have also, shared_object<vector<vector<int>
> > > to store the adjacency list.
Definition at line 57 of file point_graph.h.
Public Types | |
typedef S | Vect |
typedef R | VectPt |
typedef R::value_type | point_t |
typedef C | coeff_t |
Public Member Functions | |
point_graph () | |
point_graph (const point_graph< C, R, S > &Graph) | |
int | access (const point_t &Point) const |
int | access (point_t *Point) const |
point_graph (R &V, S &E) | |
void | insertVertex (const point_t &Point) |
void | createInEdge () |
int | insert (const point_t &Point) |
int | push_back (const point_t &Point) |
void | insert (int nb_point_begin, int nb_point_end) |
void | graphAddCoord (const coeff_t &value, const int &ind) |
void | graphSwap (const int &ind_i, const int &ind_j) |
void | rotationGraph (const coeff_t &t) |
void | graphInsert (const point_graph< C, R, S > &Graph) |
Public Attributes | |
std::map< point_t, int, ltpts< point_t > > | Pts_Map |
R | Vertices |
S | Edges |
int | nb_edges |
typedef S topology::point_graph< C, R, S >::Vect |
The type for the adjacency list.
Reimplemented in topology::point_complex< C, R, E, F >.
Definition at line 59 of file point_graph.h.
typedef R topology::point_graph< C, R, S >::VectPt |
The type for storing the vertices.
Reimplemented in topology::point_complex< C, R, E, F >.
Definition at line 62 of file point_graph.h.
typedef R::value_type topology::point_graph< C, R, S >::point_t |
The type of point.
Reimplemented in topology::point_complex< C, R, E, F >.
Definition at line 65 of file point_graph.h.
typedef C topology::point_graph< C, R, S >::coeff_t |
The type of the coefficients.
Reimplemented in topology::point_complex< C, R, E, F >.
Definition at line 68 of file point_graph.h.
topology::point_graph< C, R, S >::point_graph | ( | ) |
The default constructor.
Definition at line 94 of file point_graph.h.
topology::point_graph< C, R, S >::point_graph | ( | const point_graph< C, R, S > & | Graph | ) |
The copy constructor.
Definition at line 97 of file point_graph.h.
topology::point_graph< C, R, S >::point_graph | ( | R & | V, | |
S & | E | |||
) |
V | the vertices. | |
E | the edges. |
V
and the edges E
.
Definition at line 160 of file point_graph.h.
int topology::point_graph< C, R, S >::access | ( | const point_t & | Point | ) | const |
Point | a point. |
Point
in the data Vertices
. Point
isn't in the data structure. Definition at line 107 of file point_graph.h.
int topology::point_graph< C, R, S >::access | ( | point_t * | Point | ) | const |
*Point | a point. |
*Point
in the data Vertices
. Point
isn't in the data structure. Definition at line 133 of file point_graph.h.
void topology::point_graph< C, R, S >::insertVertex | ( | const point_t & | Point | ) |
Point | a point. |
Point
in the data Vertices
of the structure.
Definition at line 169 of file point_graph.h.
Referenced by topology::point_graph< C, R, E >::push_back().
void topology::point_graph< C, R, S >::createInEdge | ( | ) |
This procedure allocates place in the data Edges
which stores the edges.
Definition at line 178 of file point_graph.h.
Referenced by topology::point_graph< C, R, E >::insert().
int topology::point_graph< C, R, S >::insert | ( | const point_t & | Point | ) |
Point | a point. |
Vertices
of the point graph structure.Definition at line 192 of file point_graph.h.
Referenced by bezier::sbd2d< X, C, USLV >::connect_xy(), and topology::point_graph< C, R, E >::graphInsert().
int topology::point_graph< C, R, S >::push_back | ( | const point_t & | Point | ) |
Point | a point. |
Point
in the data Vertices
of the structure.Definition at line 220 of file point_graph.h.
Referenced by topology::point_graph< C, R, E >::graphInsert(), and topology::point_graph< C, R, E >::insert().
void topology::point_graph< C, R, S >::insert | ( | int | nb_point_begin, | |
int | nb_point_end | |||
) |
nb_point_begin | the number that corresponds to the begin point of the edge we want to insert in the map Pts_Map . | |
nb_point_end | the number that corresponds to the begin point of the edge we want to insert in the map Pts_Map . |
nb_point_begin
and nb_point_end
in the data Edges
of the point graph structure.
Definition at line 237 of file point_graph.h.
void topology::point_graph< C, R, S >::graphAddCoord | ( | const coeff_t & | value, | |
const int & | ind | |||
) |
value | a value. | |
ind | an index. |
point_graph
a new coordinate of index ind
, and this new coordinate has the value value
.
Definition at line 291 of file point_graph.h.
void topology::point_graph< C, R, S >::graphSwap | ( | const int & | ind_i, | |
const int & | ind_j | |||
) |
ind_i | an index. | |
ind_j | an index. |
ind_i
with ind_j
in all the vertices in the data structure Vertices
.
Definition at line 326 of file point_graph.h.
void topology::point_graph< C, R, S >::rotationGraph | ( | const coeff_t & | t | ) |
t | the rotation. |
point_graph
in the starting coordinates system. t
represents tan(teta/2) where teta is the rotation angle. Definition at line 350 of file point_graph.h.
void topology::point_graph< C, R, S >::graphInsert | ( | const point_graph< C, R, S > & | Graph | ) |
Graph | a point_graph. |
point_graph
the graph represented by the parameter Graph
.
Definition at line 375 of file point_graph.h.
std::map<point_t, int, ltpts<point_t> > topology::point_graph< C, R, S >::Pts_Map |
The map of points.
It is useful because it allows us to determine quickly if a point is already in the structure point_graph
.
Definition at line 75 of file point_graph.h.
Referenced by topology::point_graph< C, R, E >::graphAddCoord(), topology::point_graph< C, R, E >::graphSwap(), topology::point_graph< C, R, E >::push_back(), and topology::point_graph< C, R, E >::rotationGraph().
R topology::point_graph< C, R, S >::Vertices |
The points container.
It represents the vertices of the point graph structure.
Definition at line 81 of file point_graph.h.
Referenced by topology::point_graph< C, R, E >::access(), topology::point_graph< C, R, E >::graphAddCoord(), topology::point_graph< C, R, E >::graphInsert(), topology::point_graph< C, R, E >::graphSwap(), topology::point_graph< C, R, E >::insert(), topology::point_graph< C, R, E >::insertVertex(), topology::print(), topology::point_graph< C, R, E >::push_back(), and topology::point_graph< C, R, E >::rotationGraph().
S topology::point_graph< C, R, S >::Edges |
The adjacency list.
It represents the relations between the vertices of the point graph structure.
Definition at line 88 of file point_graph.h.
Referenced by topology::point_graph< C, R, E >::createInEdge(), topology::point_graph< C, R, E >::graphInsert(), topology::point_graph< C, R, E >::insert(), and topology::print().
int topology::point_graph< C, R, S >::nb_edges |
The number of edges in the graph of points.
Definition at line 91 of file point_graph.h.
Referenced by topology::point_graph< C, R, E >::insert().