# topology::point< C, R > Struct Template Reference

List of all members.

## Detailed Description

### template<class C, class R = shared_object<std::vector<C> >> struct topology::point< C, R >

The topology point structure.

An topology point is represented by its coordinates.

• `C` is the type of coordinates.
• `R` is a type storing all the coordinates of the point.
Remarks:
This structure doesn't depend of the dimension.

By default, in order to store the coordinates in all dimensions, we use `shared_object<std::vector<C>` >. For further explanations, we can see the page for this structure in the documentation.

Definition at line 44 of file point.h.

## Public Types

typedef unsigned size_type
typedef ReferTo< R >::value_type::iterator iterator
typedef ReferTo< R >::value_type::const_iterator const_iterator
typedef ReferTo< C >::value_type coeff_t

## Public Member Functions

point ()
~point ()
point (const R &r)
point (const point< C, R > &P)
point (unsigned d, C *t)
point (unsigned d, char *str)
point (unsigned d)
point (const C *b, const C *e)
point (const coeff_t &x, const coeff_t &y)
point (const coeff_t &x, const coeff_t &y, const coeff_t &z)
ReferTo< R >::value_type::size_type size () const
iterator begin ()
const_iterator begin () const
iterator end ()
const_iterator end () const
void resize (int d)
operator[] (unsigned i) const
C & operator[] (unsigned i)
bool operator== (const point< C, R > &p) const
bool operator!= (const point< C, R > &p)
point< C, R > operator= (const point< C, R > &p)
point< C, R > operator+ (point< C, R > &p) const
point< C, R > operator+= (point< C, R > &p)
point< C, R > operator- (point< C, R > &p) const
point< C, R > operator-= (point< C, R > &p)
point< C, R > operator- () const
point< C, R > operator+ () const
point< C, R > operator * (C cte) const
point< C, R > operator/ (C cte) const
bool operator< (const point< C, R > &p) const

data

## Friends

point< C, R > operator * (C cte, point< C, R > &p)
point< C, R > operator/ (C cte, point< C, R > &p)

## Member Typedef Documentation

template<class C, class R = shared_object<std::vector<C> >>
 typedef ReferTo::value_type topology::point< C, R >::coeff_t

The type of the coefficients.

Definition at line 51 of file point.h.

## Constructor & Destructor Documentation

template<class C, class R = shared_object<std::vector<C> >>
 topology::point< C, R >::point ( )

The default constructor.

Definition at line 59 of file point.h.

template<class C, class R = shared_object<std::vector<C> >>
 topology::point< C, R >::~point ( )

The default destructor.

Definition at line 62 of file point.h.

template<class C, class R = shared_object<std::vector<C> >>
 topology::point< C, R >::point ( const R & r )

Parameters:
 r it represents all the coordinates of the point.
Construct an topology point by giving all its coordinates.

Definition at line 69 of file point.h.

template<class C, class R = shared_object<std::vector<C> >>
 topology::point< C, R >::point ( const point< C, R > & P )

The copy constructor.

Definition at line 72 of file point.h.

template<class C, class R = shared_object<std::vector<C> >>
 topology::point< C, R >::point ( unsigned d, C * t )

Parameters:
 d the dimension of the point. t it represents all the coordinates of the point.
Construct an topology point by giving its dimensional `d`, and a table `t` with its coordinates.

Definition at line 81 of file point.h.

References topology::point< C, R >::data.

template<class C, class R = shared_object<std::vector<C> >>
 topology::point< C, R >::point ( unsigned d, char * str )

Construct an topology point by giving its dimensional `d` , and a char* `str` with its coordinates.

Definition at line 93 of file point.h.

References topology::point< C, R >::data.

template<class C, class R = shared_object<std::vector<C> >>
 topology::point< C, R >::point ( unsigned d )

Construction of a point of size `d`.

Definition at line 101 of file point.h.

References topology::point< C, R >::data.

template<class C, class R = shared_object<std::vector<C> >>
 topology::point< C, R >::point ( const C * b, const C * e )

Parameters:
 b the first element in the table. e the last element in the table.
Construct an topology point by giving its first element `b` and the last element `e` in a table.

Definition at line 113 of file point.h.

References topology::point< C, R >::data.

template<class C, class R = shared_object<std::vector<C> >>
 topology::point< C, R >::point ( const coeff_t & x, const coeff_t & y )

Construct an topology point in 2-dimensional by giving its 2 coordinates.

Definition at line 125 of file point.h.

References topology::point< C, R >::data.

template<class C, class R = shared_object<std::vector<C> >>
 topology::point< C, R >::point ( const coeff_t & x, const coeff_t & y, const coeff_t & z )

Construct an topology point in 3-dimensional by giving its 3 coordinates.

Definition at line 136 of file point.h.

References topology::point< C, R >::data.

## Member Function Documentation

template<class C, class R = shared_object<std::vector<C> >>
 ReferTo::value_type::size_type topology::point< C, R >::size ( ) const

template<class C, class R = shared_object<std::vector<C> >>
 void topology::point< C, R >::resize ( int d )

Parameters:
 d the new size of the point.
Resize the size of the point.

Definition at line 162 of file point.h.

References topology::point< C, R >::data.

template<class C, class R = shared_object<std::vector<C> >>
 C topology::point< C, R >::operator[] ( unsigned i ) const

Access to the `operator[]`

Definition at line 166 of file point.h.

References topology::point< C, R >::data, and topology::point< C, R >::size().

template<class C, class R = shared_object<std::vector<C> >>
 C& topology::point< C, R >::operator[] ( unsigned i )

The `operator[]`

Definition at line 170 of file point.h.

References topology::point< C, R >::data, and topology::point< C, R >::size().

template<class C, class R = shared_object<std::vector<C> >>
 bool topology::point< C, R >::operator== ( const point< C, R > & p ) const

The `operator==`

Definition at line 173 of file point.h.

template<class C, class R = shared_object<std::vector<C> >>
 bool topology::point< C, R >::operator!= ( const point< C, R > & p )

The `operator!=`

Definition at line 176 of file point.h.

References topology::point< C, R >::data.

template<class C, class R = shared_object<std::vector<C> >>
 point topology::point< C, R >::operator= ( const point< C, R > & p )

The `operator=`

Definition at line 179 of file point.h.

References topology::point< C, R >::data, and topology::point< C, R >::size().

template<class C, class R = shared_object<std::vector<C> >>
 point topology::point< C, R >::operator+ ( point< C, R > & p ) const

The `operator+`

Definition at line 188 of file point.h.

template<class C, class R = shared_object<std::vector<C> >>
 point topology::point< C, R >::operator+= ( point< C, R > & p )

The `operator+=`

Definition at line 198 of file point.h.

References topology::point< C, R >::data, and topology::point< C, R >::size().

template<class C, class R = shared_object<std::vector<C> >>
 point topology::point< C, R >::operator- ( point< C, R > & p ) const

The `operator-`

Definition at line 207 of file point.h.

template<class C, class R = shared_object<std::vector<C> >>
 point topology::point< C, R >::operator-= ( point< C, R > & p )

The `operator-=`

Definition at line 217 of file point.h.

References topology::point< C, R >::data, and topology::point< C, R >::size().

template<class C, class R = shared_object<std::vector<C> >>
 point topology::point< C, R >::operator- ( ) const

The unary `operator-`

Definition at line 226 of file point.h.

template<class C, class R = shared_object<std::vector<C> >>
 point topology::point< C, R >::operator+ ( ) const

The unary `operator+`

Definition at line 235 of file point.h.

template<class C, class R = shared_object<std::vector<C> >>
 point topology::point< C, R >::operator * ( C cte ) const

The `operator*`

Definition at line 238 of file point.h.

template<class C, class R = shared_object<std::vector<C> >>
 point topology::point< C, R >::operator/ ( C cte ) const

The `operator/`

Definition at line 247 of file point.h.

template<class C, class R = shared_object<std::vector<C> >>
 bool topology::point< C, R >::operator< ( const point< C, R > & p ) const

Parameters:
 p a point.
The `operator<` allows us to sort a list of points (p1<p2 according the lexicographic order).

Definition at line 267 of file point.h.

References topology::point< C, R >::data, and topology::point< C, R >::size().

## Friends And Related Function Documentation

template<class C, class R = shared_object<std::vector<C> >>
 point operator * ( C cte, point< C, R > & p ) ` [friend]`

The left `operator*`

Definition at line 256 of file point.h.

template<class C, class R = shared_object<std::vector<C> >>
 point operator/ ( C cte, point< C, R > & p ) ` [friend]`

The left `operator/`

Definition at line 259 of file point.h.

## Member Data Documentation

template<class C, class R = shared_object<std::vector<C> >>
 R topology::point< C, R >::data

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

SYNAPS DOCUMENTATION