CEPS  24.01
Cardiac ElectroPhysiology Simulator
CepsVertex Class Reference

Detailed Description

Definition at line 41 of file CepsVertex.hpp.

#include <CepsVertex.hpp>

Inheritance diagram for CepsVertex:
[legend]

Public Member Functions

 CepsVertex (const CepsReal &x=0.0, const CepsReal &y=0.0, const CepsReal &z=0.0)
 Constructor with coordinates. More...
 
 CepsVertex (const CepsReal3D &coor)
 Constructor with coordinates. More...
 
 CepsVertex (const CepsVertex &)=default
 Copy constructor. More...
 
 CepsVertex (CepsVertex &&) noexcept=default
 Copy constructor. More...
 
CepsVertexoperator= (const CepsVertex &)=default
 Assignment operator. More...
 
CepsVertexoperator= (CepsVertex &&) noexcept=default
 Assignment operator. More...
 
CepsVertexoperator= (const CepsMathVertices &vec)
 Assignment operator from Eigen format. More...
 
CepsVertexoperator= (const CepsReal3D &vec)
 Assignment operator. More...
 
virtual ~CepsVertex ()=default
 Destructor. More...
 
 operator CepsMathVertex () const
 Cast operator into CepsMathVertex. More...
 
void setX (const CepsReal &x)
 Set vertex x coordinate. More...
 
void setY (const CepsReal &y)
 Set vertex y coordinate. More...
 
void setZ (const CepsReal &z)
 Set vertex z coordinate. More...
 
void setCoordinate (const CepsUInt &dim, const CepsReal &coor)
 Set the three coordinates. More...
 
void setCoordinates (const CepsReal &x, const CepsReal &y=0., const CepsReal &z=0.)
 Set the 3 coordinates at once. More...
 
void setCoordinates (const CepsReal3D &coor)
 Set the three coordinates. More...
 
void setCoordinates (const CepsReal *coors, const CepsUInt &n)
 Set the three coordinates. More...
 
void scale (const CepsReal &scaleFactor)
 Scale all coordinates of this node. More...
 
const CepsRealx () const
 Vertex x coordinate. More...
 
const CepsRealy () const
 Vertex y coordinate. More...
 
const CepsRealz () const
 Vertex z coordinate. More...
 
CepsRealgetCoordinate (const CepsSize &dim)
 Get coordinate of dimension 0 1 2, read & write. More...
 
const CepsRealgetCoordinate (const CepsSize &dim) const
 Get coordinate of dimension 0 1 2, read only. More...
 
CepsRealoperator[] (const CepsUInt &dim)
 Get coordinate of dimension 0 1 2, read & write. More...
 
const CepsRealoperator[] (const CepsUInt &dim) const
 Get coordinate of dimension 0 1 2, read only. More...
 
CepsReal3DgetCoordinates ()
 Get three coordinates, read & write. More...
 
const CepsReal3DgetCoordinates () const
 Get three coordinates, read only. More...
 
CepsMathVertex getCoordinatesForEigen () const
 Get three coordinates. More...
 
CepsBool equals (const CepsVertex &vert, const CepsReal &errorFactor=1.0)
 Check for coordinates equality. More...
 
CepsReal norm2 (const CepsSize &dim=3) const
 Euclidian norm of coordinates. More...
 
CepsReal normp (const CepsInt &p, const CepsSize &dim=3) const
 Norm p (for p =-1, 1, 2, etc) with p=-1 gives the inf norm. More...
 
CepsReal dot (const CepsVertex &other, const CepsSize &dim=3) const
 Scalar product. dim restricts which components are used (1:(x), 2:(x,y), 3:(x,y,z)) More...
 

Private Attributes

CepsReal3D m_coor
 

Friends

std::ostream & operator<< (std::ostream &os, const CepsVertex &vertex)
 Display stream operator. More...
 

Constructor & Destructor Documentation

◆ CepsVertex() [1/4]

CepsVertex::CepsVertex ( const CepsReal x = 0.0,
const CepsReal y = 0.0,
const CepsReal z = 0.0 
)

Constructor with coordinates.

Definition at line 38 of file CepsVertex.cpp.

◆ CepsVertex() [2/4]

CepsVertex::CepsVertex ( const CepsReal3D coor)
explicit

Constructor with coordinates.

Definition at line 43 of file CepsVertex.cpp.

◆ CepsVertex() [3/4]

CepsVertex::CepsVertex ( const CepsVertex )
default

Copy constructor.

◆ CepsVertex() [4/4]

CepsVertex::CepsVertex ( CepsVertex &&  )
defaultnoexcept

Copy constructor.

◆ ~CepsVertex()

virtual CepsVertex::~CepsVertex ( )
virtualdefault

Destructor.

Member Function Documentation

◆ dot()

CepsReal CepsVertex::dot ( const CepsVertex other,
const CepsSize dim = 3 
) const

Scalar product. dim restricts which components are used (1:(x), 2:(x,y), 3:(x,y,z))

Definition at line 239 of file CepsVertex.cpp.

◆ equals()

CepsBool CepsVertex::equals ( const CepsVertex vert,
const CepsReal errorFactor = 1.0 
)

Check for coordinates equality.

Parameters
[in]vertthe vertex to check against
[in]errorFactorestimate of the accumulated error by iterative computation. Default to 1.0 (no accumulation)

Definition at line 191 of file CepsVertex.cpp.

◆ getCoordinate() [1/2]

CepsReal & CepsVertex::getCoordinate ( const CepsSize dim)

Get coordinate of dimension 0 1 2, read & write.

Definition at line 143 of file CepsVertex.cpp.

◆ getCoordinate() [2/2]

const CepsReal & CepsVertex::getCoordinate ( const CepsSize dim) const

Get coordinate of dimension 0 1 2, read only.

Definition at line 152 of file CepsVertex.cpp.

◆ getCoordinates() [1/2]

CepsReal3D & CepsVertex::getCoordinates ( )

Get three coordinates, read & write.

Definition at line 173 of file CepsVertex.cpp.

◆ getCoordinates() [2/2]

const CepsReal3D & CepsVertex::getCoordinates ( ) const

Get three coordinates, read only.

Definition at line 179 of file CepsVertex.cpp.

◆ getCoordinatesForEigen()

CepsMathVertex CepsVertex::getCoordinatesForEigen ( ) const

Get three coordinates.

Definition at line 185 of file CepsVertex.cpp.

◆ norm2()

CepsReal CepsVertex::norm2 ( const CepsSize dim = 3) const

Euclidian norm of coordinates.

Definition at line 201 of file CepsVertex.cpp.

◆ normp()

CepsReal CepsVertex::normp ( const CepsInt p,
const CepsSize dim = 3 
) const

Norm p (for p =-1, 1, 2, etc) with p=-1 gives the inf norm.

Parameters
porder
dimdimension to consider
Returns
CepsReal

Definition at line 217 of file CepsVertex.cpp.

◆ operator CepsMathVertex()

CepsVertex::operator CepsMathVertex ( ) const

Cast operator into CepsMathVertex.

Returns
CepsMathVertex

Definition at line 48 of file CepsVertex.cpp.

◆ operator=() [1/4]

CepsVertex& CepsVertex::operator= ( CepsVertex &&  )
defaultnoexcept

Assignment operator.

◆ operator=() [2/4]

CepsVertex& CepsVertex::operator= ( const CepsMathVertices vec)

Assignment operator from Eigen format.

◆ operator=() [3/4]

CepsVertex& CepsVertex::operator= ( const CepsReal3D vec)

Assignment operator.

◆ operator=() [4/4]

CepsVertex& CepsVertex::operator= ( const CepsVertex )
default

Assignment operator.

◆ operator[]() [1/2]

CepsReal & CepsVertex::operator[] ( const CepsUInt dim)

Get coordinate of dimension 0 1 2, read & write.

Definition at line 161 of file CepsVertex.cpp.

◆ operator[]() [2/2]

const CepsReal & CepsVertex::operator[] ( const CepsUInt dim) const

Get coordinate of dimension 0 1 2, read only.

Definition at line 167 of file CepsVertex.cpp.

◆ scale()

void CepsVertex::scale ( const CepsReal scaleFactor)

Scale all coordinates of this node.

Definition at line 110 of file CepsVertex.cpp.

◆ setCoordinate()

void CepsVertex::setCoordinate ( const CepsUInt dim,
const CepsReal coor 
)

Set the three coordinates.

Definition at line 76 of file CepsVertex.cpp.

◆ setCoordinates() [1/3]

void CepsVertex::setCoordinates ( const CepsReal x,
const CepsReal y = 0.,
const CepsReal z = 0. 
)

Set the 3 coordinates at once.

Definition at line 86 of file CepsVertex.cpp.

◆ setCoordinates() [2/3]

void CepsVertex::setCoordinates ( const CepsReal coors,
const CepsUInt n 
)

Set the three coordinates.

Definition at line 100 of file CepsVertex.cpp.

◆ setCoordinates() [3/3]

void CepsVertex::setCoordinates ( const CepsReal3D coor)

Set the three coordinates.

Definition at line 93 of file CepsVertex.cpp.

◆ setX()

void CepsVertex::setX ( const CepsReal x)

Set vertex x coordinate.

Definition at line 55 of file CepsVertex.cpp.

◆ setY()

void CepsVertex::setY ( const CepsReal y)

Set vertex y coordinate.

Definition at line 62 of file CepsVertex.cpp.

◆ setZ()

void CepsVertex::setZ ( const CepsReal z)

Set vertex z coordinate.

Definition at line 69 of file CepsVertex.cpp.

◆ x()

const CepsReal & CepsVertex::x ( ) const

Vertex x coordinate.

Definition at line 125 of file CepsVertex.cpp.

◆ y()

const CepsReal & CepsVertex::y ( ) const

Vertex y coordinate.

Definition at line 131 of file CepsVertex.cpp.

◆ z()

const CepsReal & CepsVertex::z ( ) const

Vertex z coordinate.

Definition at line 137 of file CepsVertex.cpp.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const CepsVertex vertex 
)
friend

Display stream operator.

Operator overloading that enables output operation on a stream.

Parameters
osstream
vertexthe vertex to view

Definition at line 253 of file CepsVertex.cpp.

Field Documentation

◆ m_coor

CepsReal3D CepsVertex::m_coor
private

Definition at line 201 of file CepsVertex.hpp.


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