topology::point_graph< C, R, S > Struct Template Reference

List of all members.

Detailed Description

template<class C, class R = Seq<topology::point<C> >, class S = Seq<std::vector<int> >>
struct topology::point_graph< C, R, S >

The point graph structure.

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.

Remarks:
By default, in order to store all the points, we use shared_object<vector<point<C> > >. We have also, shared_object<vector<vector<int> > > > to store the adjacency list.
For further explanations, we can see the page about this structure in the documentation.

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
Vertices
Edges
int nb_edges


Member Typedef Documentation

template<class C, class R = Seq<topology::point<C> >, class S = Seq<std::vector<int> >>
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.

template<class C, class R = Seq<topology::point<C> >, class S = Seq<std::vector<int> >>
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.

template<class C, class R = Seq<topology::point<C> >, class S = Seq<std::vector<int> >>
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.

template<class C, class R = Seq<topology::point<C> >, class S = Seq<std::vector<int> >>
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.


Constructor & Destructor Documentation

template<class C, class R = Seq<topology::point<C> >, class S = Seq<std::vector<int> >>
topology::point_graph< C, R, S >::point_graph (  ) 

The default constructor.

Definition at line 94 of file point_graph.h.

template<class C, class R = Seq<topology::point<C> >, class S = Seq<std::vector<int> >>
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.

template<class C, class R = Seq<topology::point<C> >, class S = Seq<std::vector<int> >>
topology::point_graph< C, R, S >::point_graph ( R &  V,
S &  E 
)

Parameters:
V the vertices.
E the edges.
Construct a graph of points by giving the vertices V and the edges E .

Definition at line 160 of file point_graph.h.


Member Function Documentation

template<class C, class R = Seq<topology::point<C> >, class S = Seq<std::vector<int> >>
int topology::point_graph< C, R, S >::access ( const point_t Point  )  const

Parameters:
Point a point.
Allows us to know the rank of the Point in the data Vertices .
Returns:
The index in the data structure or -1 if the Point isn't in the data structure.

Definition at line 107 of file point_graph.h.

template<class C, class R = Seq<topology::point<C> >, class S = Seq<std::vector<int> >>
int topology::point_graph< C, R, S >::access ( point_t Point  )  const

Parameters:
*Point a point.
Allows us to know the rank of the *Point in the data Vertices .
Returns:
The index in the data structure or -1 if the Point isn't in the data structure.

Definition at line 133 of file point_graph.h.

template<class C, class R = Seq<topology::point<C> >, class S = Seq<std::vector<int> >>
void topology::point_graph< C, R, S >::insertVertex ( const point_t Point  ) 

Parameters:
Point a point.
This procedure inserts the 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().

template<class C, class R = Seq<topology::point<C> >, class S = Seq<std::vector<int> >>
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().

template<class C, class R = Seq<topology::point<C> >, class S = Seq<std::vector<int> >>
int topology::point_graph< C, R, S >::insert ( const point_t Point  ) 

Parameters:
Point a point.
This function does the insertion if the edge isn't in the data Vertices of the point graph structure.
Returns:
The index in the data 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().

template<class C, class R = Seq<topology::point<C> >, class S = Seq<std::vector<int> >>
int topology::point_graph< C, R, S >::push_back ( const point_t Point  ) 

Parameters:
Point a point.
This function inserts the point Point in the data Vertices of the structure.
Returns:
The index in the data 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().

template<class C, class R = Seq<topology::point<C> >, class S = Seq<std::vector<int> >>
void topology::point_graph< C, R, S >::insert ( int  nb_point_begin,
int  nb_point_end 
)

Parameters:
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.
This procedure inserts the edge represented by 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.

template<class C, class R = Seq<topology::point<C> >, class S = Seq<std::vector<int> >>
void topology::point_graph< C, R, S >::graphAddCoord ( const coeff_t value,
const int &  ind 
)

Parameters:
value a value.
ind an index.
Add for all the points in the structure 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.

template<class C, class R = Seq<topology::point<C> >, class S = Seq<std::vector<int> >>
void topology::point_graph< C, R, S >::graphSwap ( const int &  ind_i,
const int &  ind_j 
)

Parameters:
ind_i an index.
ind_j an index.
Swap the coordinate ind_i with ind_j in all the vertices in the data structure Vertices.

Definition at line 326 of file point_graph.h.

template<class C, class R = Seq<topology::point<C> >, class S = Seq<std::vector<int> >>
void topology::point_graph< C, R, S >::rotationGraph ( const coeff_t t  ) 

Parameters:
t the rotation.
This procedure allows us to recuperate the structure point_graph in the starting coordinates system.
Remarks:
The parameter t represents tan(teta/2) where teta is the rotation angle.

Definition at line 350 of file point_graph.h.

template<class C, class R = Seq<topology::point<C> >, class S = Seq<std::vector<int> >>
void topology::point_graph< C, R, S >::graphInsert ( const point_graph< C, R, S > &  Graph  ) 

Parameters:
Graph a point_graph.
Insert in the structure point_graph the graph represented by the parameter Graph .

Definition at line 375 of file point_graph.h.


Member Data Documentation

template<class C, class R = Seq<topology::point<C> >, class S = Seq<std::vector<int> >>
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().

template<class C, class R = Seq<topology::point<C> >, class S = Seq<std::vector<int> >>
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().

template<class C, class R = Seq<topology::point<C> >, class S = Seq<std::vector<int> >>
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().

template<class C, class R = Seq<topology::point<C> >, class S = Seq<std::vector<int> >>
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().


The documentation for this struct was generated from the following file:

SYNAPS DOCUMENTATION
logo