SLIP  1.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Protected Attributes | Friends | List of all members
slip::DPoint2d< T > Class Template Reference

Difference of Point2D class, specialization of DPoint<CoordType,DIM> with DIM = 2. More...

#include <Array2d.hpp>

Inheritance diagram for slip::DPoint2d< T >:
Inheritance graph

Public Types

typedef DPoint2d< CoordType > self
 
typedef DPoint< CoordType, 2 > base
 
typedef CoordType value_type
 
typedef value_typedpointer
 
typedef const value_typeconst_dpointer
 
typedef value_typereference
 
typedef const value_typeconst_reference
 
typedef
std::random_access_iterator_tag 
iterator_category
 

Public Member Functions

std::string name () const
 Returns the name of the class. More...
 
std::size_t dim () const
 Returns the dimension of the DPoint. More...
 
std::size_t size () const
 Returns the dimension of the DPoint. More...
 
std::size_t max_size () const
 Returns the maximal size of the DPoint. More...
 
bool empty () const
 Returns true if dimension of the DPoint is 0. More...
 
const block< value_type, DIM > & coord () const
 Return the coordinates of the DPoint. More...
 
void swap (self &other)
 Swaps two DPoint. More...
 
Constructors & Destructors
 DPoint2d ()
 Constructs a DPoint2d. More...
 
 DPoint2d (const CoordType *array)
 Constructs a DPoint from a CoordType array. More...
 
 DPoint2d (const CoordType &dx1, const CoordType &dx2)
 Constructs a DPoint2d. More...
 
Element access operators
void dx1 (const CoordType &dx)
 Accessor of the first coordinate of DPoint2d. More...
 
CoordType & dx1 ()
 Accessor/Mutator of the first coordinate of DPoint2d. More...
 
const CoordType & dx1 () const
 Accessor/Mutator of the first coordinate of DPoint2d. More...
 
void dx2 (const CoordType &dx)
 Accessor of the second coordinate of DPoint2d. More...
 
CoordType & dx2 ()
 Accessor/Mutator of the second coordinate of DPoint2d. More...
 
const CoordType & dx2 () const
 Accessor/Mutator of the second coordinate of DPoint2d. More...
 
void set_coord (const CoordType &dx1, const CoordType &dx2)
 Accessor/Mutator of the coordinates of DPoint2d. More...
 
Element access operators
reference operator[] (const std::size_t i)
 Returns the i'th coordinate of the DPoint. More...
 
const_reference operator[] (const std::size_t i) const
 Returns the i'th row of the DPoint. More...
 
Comparison operators
bool operator== (const self &other) const
 compare two DPoint. More...
 
bool operator!= (const self &other) const
 compare two DPoint. More...
 
Arithmetic operators
self operator- () const
 negate all the coordinates of a DPoint More...
 
self operator- (const self &other) const
 substract the coordinates of a two DPoint More...
 
selfoperator+= (const self &other)
 add the coordinates of a DPoint to the DPoint More...
 
self operator+ (const self &other) const
 add the coordinates of a two DPoint More...
 
selfoperator-= (const self &other)
 substract the coordinates of a DPoint to the DPoint More...
 

Protected Attributes

block< value_type, DIM > coord_
 The coordinates of the dpoint are stored in this block. More...
 

Friends

class boost::serialization::access
 

Detailed Description

template<class T>
class slip::DPoint2d< T >

Difference of Point2D class, specialization of DPoint<CoordType,DIM> with DIM = 2.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Julien Dombre <dombre_AT_sic.univ-poitiers.fr>
Version
0.0.2
Date
2014/04/02
Since
1.0.0
Parameters
CoordTypeType of the coordinates of the DPoint2d

Definition at line 129 of file Array2d.hpp.

Member Typedef Documentation

template<class T>
typedef DPoint<CoordType,2> slip::DPoint2d< T >::base

Definition at line 107 of file DPoint2d.hpp.

typedef const value_type* slip::DPoint< CoordType, DIM >::const_dpointer
inherited

Definition at line 114 of file DPoint.hpp.

typedef const value_type& slip::DPoint< CoordType, DIM >::const_reference
inherited

Definition at line 116 of file DPoint.hpp.

typedef value_type* slip::DPoint< CoordType, DIM >::dpointer
inherited

Definition at line 113 of file DPoint.hpp.

typedef std::random_access_iterator_tag slip::DPoint< CoordType, DIM >::iterator_category
inherited

Definition at line 121 of file DPoint.hpp.

typedef value_type& slip::DPoint< CoordType, DIM >::reference
inherited

Definition at line 115 of file DPoint.hpp.

template<class T>
typedef DPoint2d<CoordType> slip::DPoint2d< T >::self

Definition at line 106 of file DPoint2d.hpp.

typedef CoordType slip::DPoint< CoordType, DIM >::value_type
inherited

Definition at line 112 of file DPoint.hpp.

Constructor & Destructor Documentation

template<typename CoordType >
slip::DPoint2d< CoordType >::DPoint2d ( )
inline

Constructs a DPoint2d.

Definition at line 206 of file DPoint2d.hpp.

template<typename CoordType >
slip::DPoint2d< CoordType >::DPoint2d ( const CoordType *  array)
inline

Constructs a DPoint from a CoordType array.

Parameters
array

Definition at line 214 of file DPoint2d.hpp.

template<typename CoordType >
slip::DPoint2d< CoordType >::DPoint2d ( const CoordType &  dx1,
const CoordType &  dx2 
)
inline

Constructs a DPoint2d.

Parameters
dx1first coordinate of the DPoint2d
dx2second coordinate of the DPoint2d

Definition at line 220 of file DPoint2d.hpp.

Member Function Documentation

const block<value_type,DIM>& slip::DPoint< CoordType, DIM >::coord ( ) const
inherited

Return the coordinates of the DPoint.

std::size_t slip::DPoint< CoordType, DIM >::dim ( ) const
inherited

Returns the dimension of the DPoint.

Returns
the dimension (number of coordinates) of the DPoint
template<typename CoordType >
void slip::DPoint2d< CoordType >::dx1 ( const CoordType &  dx)
inline

Accessor of the first coordinate of DPoint2d.

Parameters
dxfirst coordinate of the DPoint2d

Definition at line 229 of file DPoint2d.hpp.

template<typename CoordType >
CoordType & slip::DPoint2d< CoordType >::dx1 ( )
inline

Accessor/Mutator of the first coordinate of DPoint2d.

Returns
reference to the first coordinate of the DPoint2d

Definition at line 233 of file DPoint2d.hpp.

template<typename CoordType >
const CoordType & slip::DPoint2d< CoordType >::dx1 ( ) const
inline

Accessor/Mutator of the first coordinate of DPoint2d.

Returns
reference to the first coordinate of the DPoint2d

Definition at line 237 of file DPoint2d.hpp.

template<typename CoordType >
void slip::DPoint2d< CoordType >::dx2 ( const CoordType &  dx)
inline

Accessor of the second coordinate of DPoint2d.

Parameters
dxsecond coordinate of the DPoint2d

Definition at line 241 of file DPoint2d.hpp.

template<typename CoordType >
CoordType & slip::DPoint2d< CoordType >::dx2 ( )
inline

Accessor/Mutator of the second coordinate of DPoint2d.

Returns
reference to the second coordinate of the DPoint2d

Definition at line 245 of file DPoint2d.hpp.

template<typename CoordType >
const CoordType & slip::DPoint2d< CoordType >::dx2 ( ) const
inline

Accessor/Mutator of the second coordinate of DPoint2d.

Returns
reference to the second coordinate of the DPoint2d

Definition at line 249 of file DPoint2d.hpp.

bool slip::DPoint< CoordType, DIM >::empty ( ) const
inherited

Returns true if dimension of the DPoint is 0.

Returns
true if the dimension of the DPoint is 0, false else
std::size_t slip::DPoint< CoordType, DIM >::max_size ( ) const
inherited

Returns the maximal size of the DPoint.

Returns
the dimension (number of coordinates) of the DPoint
template<typename CoordType >
std::string slip::DPoint2d< CoordType >::name ( ) const
inline

Returns the name of the class.

Definition at line 261 of file DPoint2d.hpp.

bool slip::DPoint< CoordType, DIM >::operator!= ( const self other) const
inherited

compare two DPoint.

Parameters
otherDPoint to compare
Returns
true if the two dpoint don't have the same coordinates
self slip::DPoint< CoordType, DIM >::operator+ ( const self other) const
inherited

add the coordinates of a two DPoint

Parameters
otherDPoint to add with
Returns
a DPoint
self& slip::DPoint< CoordType, DIM >::operator+= ( const self other)
inherited

add the coordinates of a DPoint to the DPoint

Parameters
otherDPoint to add with
Returns
a DPoint
self slip::DPoint< CoordType, DIM >::operator- ( ) const
inherited

negate all the coordinates of a DPoint

Returns
a DPoint with negate coordinates
self slip::DPoint< CoordType, DIM >::operator- ( const self other) const
inherited

substract the coordinates of a two DPoint

Parameters
otherDPoint to add with
Returns
a DPoint
self& slip::DPoint< CoordType, DIM >::operator-= ( const self other)
inherited

substract the coordinates of a DPoint to the DPoint

Parameters
otherDPoint to add with
Returns
a DPoint
bool slip::DPoint< CoordType, DIM >::operator== ( const self other) const
inherited

compare two DPoint.

Parameters
otherDPoint to compare
Returns
true if the two dpoint have the same coordinates
reference slip::DPoint< CoordType, DIM >::operator[] ( const std::size_t  i)
inherited

Returns the i'th coordinate of the DPoint.

Parameters
iindex of the coordinate to return
Returns
value of the i'th row of the DPoint.
Precondition
0 <= i < dim
const_reference slip::DPoint< CoordType, DIM >::operator[] ( const std::size_t  i) const
inherited

Returns the i'th row of the DPoint.

Parameters
iindex of the coordinate to return
Returns
value of the i'th row of the DPoint
Precondition
0 <= i < dim
template<typename CoordType >
void slip::DPoint2d< CoordType >::set_coord ( const CoordType &  dx1,
const CoordType &  dx2 
)
inline

Accessor/Mutator of the coordinates of DPoint2d.

Parameters
dx1First displacement coordinate.
dx2Second displacement coordinate.

Definition at line 253 of file DPoint2d.hpp.

std::size_t slip::DPoint< CoordType, DIM >::size ( ) const
inherited

Returns the dimension of the DPoint.

Returns
the dimension (number of coordinates) of the DPoint
void slip::DPoint< CoordType, DIM >::swap ( self other)
inherited

Swaps two DPoint.

Parameters
otherDPoint to swap with

Friends And Related Function Documentation

template<class T>
friend class boost::serialization::access
friend

Definition at line 187 of file DPoint2d.hpp.

Member Data Documentation

block<value_type,DIM> slip::DPoint< CoordType, DIM >::coord_
protectedinherited

The coordinates of the dpoint are stored in this block.

Definition at line 321 of file DPoint.hpp.


The documentation for this class was generated from the following files: