C++ mpi module for stochmagnet_main Package
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
EXPR_Node Class Referenceabstract

This class is a base class of the binary tree. More...

#include <EXPR_Node.h>

Inheritance diagram for EXPR_Node:
Inheritance graph
[legend]
Collaboration diagram for EXPR_Node:
Collaboration graph
[legend]

Public Member Functions

virtual tMemSize getMemorySize () const override
 return the memory size of the class More...
 
virtual tMemSize getContentsMemorySize () const override
 return nthe memory size of the included associations More...
 
virtual void copy (const EXPR_Node &node)
 copy More...
 
void setAlpha (std::initializer_list< tReal > &&alpha)
 set the matrix alpha by row More...
 
void setBeta (std::initializer_list< tReal > &&beta)
 set the constant by column More...
 
void addToBeta (std::initializer_list< tReal > &&beta)
 add to the constant by column More...
 
const std::array< tReal, 3 > & getBeta () const
 get the beta value More...
 
const std::array< tReal, 9 > & getAlpha () const
 get the alpha value More...
 
void leftComposition (const std::array< tReal, 9 > &A, const std::array< tReal, 3 > &B)
 compose by the affine function \( (A.x+B) \circ (\alpha. x +\beta) \) More...
 
void leftComposition (const std::array< tReal, 9 > &A)
 compose by the affine function \( (A.x) \circ (\alpha. x +\beta) \) More...
 
void rotation (const tReal &theta)
 compute the rotation of the geometry with angle theta and k-axis More...
 
void rotation (const tReal &theta, const tReal &Ax, const tReal &Ay, const tReal &Az)
 compute the rotation of the geometry with angle theta and axis (Ax,Ay,Az) More...
 
void rotation (const tReal &theta, const tReal &Ax, const tReal &Ay, const tReal &Az, const tReal &Cx, const tReal &Cy, const tReal &Cz)
 compute the rotation of the geometry with angle theta and axis (Ax,Ay,Az)a and center (Cx,Cy,Cz) More...
 
void translate (const std::array< tReal, 3 > &T)
 translate the geometry More...
 
virtual void adimensionize (const tReal &L, std::map< tString, tBoolean > &alreadyComputed)
 adimensionize the node More...
 
virtual void computeBoundingBox (std::map< tString, tBoolean > &alreadyComputed)=0
 compute the bounding box of the node More...
 
const std::array< tReal, 3 > & getBoundingBoxMinPoint () const
 get the min point bounding box of the node for reading More...
 
const std::array< tReal, 3 > & getBoundingBoxMaxPoint () const
 get the max point bounding box of the node for reading More...
 
std::array< tReal, 3 > & getBoundingBoxMinPoint ()
 get the min point bounding box of the node for writing More...
 
std::array< tReal, 3 > & getBoundingBoxMaxPoint ()
 get the max point bounding box of the node for writing More...
 
tBoolean isInsideBoundingBox (const std::array< tReal, 3 > &P) const
 return true if the point P is in the bounding box More...
 
virtual tBoolean isInside (std::array< tReal, 3 > M) const =0
 return true if the point is in the bounding box of the node More...
 
virtual tString toString () const override
 return the string representation of this More...
 
- Public Member Functions inherited from CORE_Object
template<class T >
std::shared_ptr< T > getSharedPointer ()
 return the shared pointer for this More...
 
template<class T >
std::shared_ptr< const T > getConstSharedPointer () const
 return a const shared pointer for this More...
 
template<class T >
tBoolean isInstanceOf () const
 test if the clas T is an instance of this class More...
 
tString getClassName () const
 return the name of the class More...
 
tString getPointerString () const
 retrun the pointer of the class as a string More...
 
tString getIdentityString () const
 retrun the string identification of the class More...
 

Static Public Member Functions

static void SetEpsilon (const tReal &eps)
 set the tolerance error More...
 
static const tReal & GetEpsilon ()
 get the tolerance error More...
 
- Static Public Member Functions inherited from CORE_Object
static tBoolean EnableMemoryStack (const tBoolean &isMemoryChecked)
 enable the memory stack More...
 
static void EnableMemoryStack ()
 enable the memory stack
 
static void DisableMemoryStack ()
 disable the memory stack
 
static tBoolean IsMemoryStackEnabled ()
 return trur if the memory stack is enabled
 
static tString MemoryStackToString ()
 get the memory stack in string More...
 
static tIndex GetRegisteredClassesNumber ()
 get the memory stack in string More...
 

Protected Member Functions

 EXPR_Node ()
 create the class
 
virtual ~EXPR_Node ()
 delete the class
 
void apply (std::array< tReal, 3 > &P) const
 apply the transformation to point P \( Q:=F(P)=mAlpha.P+mBeta \) More...
 
tBoolean apply (const std::array< tReal, 3 > &P, std::array< tReal, 3 > &Q) const
 apply the transformation to point P \( Q:=F(P)=mAlpha.P+mBeta \) More...
 
void applyInverse (std::array< tReal, 3 > &P) const
 apply the inverse transformation to point P \( Q:=F^{-1}(P)=\alpha^{-1}.(P-\beta) \) More...
 
tBoolean applyInverse (const std::array< tReal, 3 > &P, std::array< tReal, 3 > &Q) const
 apply the inverse transformation to point P \( Q:=F^{-1}(P)=\alpha^{-1}.(P-\beta) \) More...
 
void linearTransformBoundingBox (std::array< tReal, 3 > &P, std::array< tReal, 3 > &Q) const
 compute the bounding box after transformation More...
 
- Protected Member Functions inherited from EXPR_Object
 EXPR_Object (void)
 create the class
 
virtual ~EXPR_Object (void)
 delete the class
 
- Protected Member Functions inherited from CORE_Object
 CORE_Object ()
 build an instance of the object
 
virtual ~CORE_Object ()
 destroy the instance of object std

 

Detailed Description

This class is a base class of the binary tree.

Author
Stephane Despreaux
Version
1.0

Member Function Documentation

◆ addToBeta()

void EXPR_Node::addToBeta ( std::initializer_list< tReal > &&  beta)
inline

add to the constant by column

Parameters
[in]betatranslation value to add

◆ adimensionize()

void EXPR_Node::adimensionize ( const tReal &  L,
std::map< tString, tBoolean > &  alreadyComputed 
)
virtual

adimensionize the node

Parameters
[in]L: the reference length
[in,out]alreadComputedidentity of the root node whose adimenionization has already been computed

Reimplemented in EXPR_VariableNode, EXPR_ParentNode, and EXPR_ElementaryGeometryNode.

◆ apply() [1/2]

tBoolean EXPR_Node::apply ( const std::array< tReal, 3 > &  P,
std::array< tReal, 3 > &  Q 
) const
inlineprotected

apply the transformation to point P \( Q:=F(P)=mAlpha.P+mBeta \)

Parameters
[in]P: the point to transform
[out]Qthe transformed point
Returns
false if Q=P

◆ apply() [2/2]

void EXPR_Node::apply ( std::array< tReal, 3 > &  P) const
inlineprotected

apply the transformation to point P \( Q:=F(P)=mAlpha.P+mBeta \)

Parameters
[in,out]P: in input the point to transform, in output the tranformed point

◆ applyInverse() [1/2]

tBoolean EXPR_Node::applyInverse ( const std::array< tReal, 3 > &  P,
std::array< tReal, 3 > &  Q 
) const
inlineprotected

apply the inverse transformation to point P \( Q:=F^{-1}(P)=\alpha^{-1}.(P-\beta) \)

Parameters
[in]P: the point to transform
[out]Qthe transformed point
Returns
false if P!=Q

◆ applyInverse() [2/2]

void EXPR_Node::applyInverse ( std::array< tReal, 3 > &  P) const
inlineprotected

apply the inverse transformation to point P \( Q:=F^{-1}(P)=\alpha^{-1}.(P-\beta) \)

Parameters
[in,out]P: in input the point to transform, in output, the transform point

◆ computeBoundingBox()

virtual void EXPR_Node::computeBoundingBox ( std::map< tString, tBoolean > &  alreadyComputed)
pure virtual

compute the bounding box of the node

Parameters
[in,out]alreadComputedidentity of the root node whose bounding box has already been computed

Implemented in EXPR_VariableNode, EXPR_UnionOperator, EXPR_ParentNode, EXPR_NotOperator, EXPR_IntersectionOperator, EXPR_ElementaryGeometryNode, and EXPR_DifferenceOperator.

◆ copy()

virtual void EXPR_Node::copy ( const EXPR_Node node)
inlinevirtual

copy

Parameters
nodethe node to copy

Reimplemented in EXPR_Paver, EXPR_Ellipsoid, EXPR_ElementaryGeometryNode, and EXPR_Cylinder.

◆ getAlpha()

const std::array<tReal,9>& EXPR_Node::getAlpha ( ) const
inline

get the alpha value

Returns
the alpha vector of size 9

◆ getBeta()

const std::array<tReal,3>& EXPR_Node::getBeta ( ) const
inline

get the beta value

Returns
the beta vector of size 3

◆ getBoundingBoxMaxPoint() [1/2]

std::array<tReal,3>& EXPR_Node::getBoundingBoxMaxPoint ( )
inline

get the max point bounding box of the node for writing

Returns
the max point of the bounding box of the node

◆ getBoundingBoxMaxPoint() [2/2]

const std::array<tReal,3>& EXPR_Node::getBoundingBoxMaxPoint ( ) const
inline

get the max point bounding box of the node for reading

Returns
the max point of the bounding box of the node

◆ getBoundingBoxMinPoint() [1/2]

std::array<tReal,3>& EXPR_Node::getBoundingBoxMinPoint ( )
inline

get the min point bounding box of the node for writing

Returns
the min point of the bounding box of the node

◆ getBoundingBoxMinPoint() [2/2]

const std::array<tReal,3>& EXPR_Node::getBoundingBoxMinPoint ( ) const
inline

get the min point bounding box of the node for reading

Returns
the min point of the bounding box of the node

◆ getContentsMemorySize()

virtual tMemSize EXPR_Node::getContentsMemorySize ( ) const
inlineoverridevirtual

return nthe memory size of the included associations

Returns
the memory size of the storage in bytes 1 Kb = 1024 bytes 1 Mb = 1024 Kb 1 Gb = 1024 Mb 1 Tb = 1024 Gb 1 Hb = 1024 Tb

Reimplemented from EXPR_Object.

Reimplemented in EXPR_VariableNode, EXPR_UnionOperator, EXPR_RootNode, EXPR_Paver, EXPR_ParentNode, EXPR_OperatorNode, EXPR_NotOperator, EXPR_LeafNode, EXPR_IntersectionOperator, EXPR_InheritedNode, EXPR_GroupNode, EXPR_EmptyNode, EXPR_Ellipsoid, EXPR_ElementaryGeometryNode, EXPR_DifferenceOperator, EXPR_Cylinder, and EXPR_ChildNode.

◆ GetEpsilon()

static const tReal& EXPR_Node::GetEpsilon ( )
inlinestatic

get the tolerance error

Returns
the tolerance error

◆ getMemorySize()

virtual tMemSize EXPR_Node::getMemorySize ( ) const
inlineoverridevirtual

return the memory size of the class

Returns
the memory size of the class in bytes 1 octet = 1 byte 1 Ko = 1024 bytes 1 Mo = 1024 Ko 1 Go = 1024 Mo

Reimplemented from EXPR_Object.

Reimplemented in EXPR_VariableNode, EXPR_UnionOperator, EXPR_RootNode, EXPR_Paver, EXPR_ParentNode, EXPR_OperatorNode, EXPR_NotOperator, EXPR_LeafNode, EXPR_IntersectionOperator, EXPR_InheritedNode, EXPR_GroupNode, EXPR_EmptyNode, EXPR_Ellipsoid, EXPR_ElementaryGeometryNode, EXPR_DifferenceOperator, EXPR_Cylinder, and EXPR_ChildNode.

◆ isInside()

virtual tBoolean EXPR_Node::isInside ( std::array< tReal, 3 >  M) const
pure virtual

return true if the point is in the bounding box of the node

Parameters
[in]Mcoordinates of the point to test if inside
Returns
true if the point is inside the node

Implemented in EXPR_VariableNode, EXPR_UnionOperator, EXPR_NotOperator, EXPR_IntersectionOperator, EXPR_ElementaryGeometryNode, EXPR_DifferenceOperator, and EXPR_ParentNode.

◆ isInsideBoundingBox()

tBoolean EXPR_Node::isInsideBoundingBox ( const std::array< tReal, 3 > &  P) const
inline

return true if the point P is in the bounding box

Parameters
[in]P: the point to test
Returns
true if the the point is in the bounding box

◆ leftComposition() [1/2]

void EXPR_Node::leftComposition ( const std::array< tReal, 9 > &  A)
inline

compose by the affine function \( (A.x) \circ (\alpha. x +\beta) \)

Parameters
A[in]: matrix of size 3x3 order by rows

◆ leftComposition() [2/2]

void EXPR_Node::leftComposition ( const std::array< tReal, 9 > &  A,
const std::array< tReal, 3 > &  B 
)
inline

compose by the affine function \( (A.x+B) \circ (\alpha. x +\beta) \)

Parameters
[in]A: matrix of size 3x3 ordered by rows
[in]B: vector of size 3
[in]W: work vector of size 3

◆ linearTransformBoundingBox()

void EXPR_Node::linearTransformBoundingBox ( std::array< tReal, 3 > &  P,
std::array< tReal, 3 > &  Q 
) const
protected

compute the bounding box after transformation

Parameters
[in]Pmin point of the initial bounding box
[in]Qmax point of the initial bounding box

◆ rotation() [1/3]

void EXPR_Node::rotation ( const tReal &  theta)
inline

compute the rotation of the geometry with angle theta and k-axis

Parameters
[in]thetarotation angle

◆ rotation() [2/3]

void EXPR_Node::rotation ( const tReal &  theta,
const tReal &  Ax,
const tReal &  Ay,
const tReal &  Az 
)
inline

compute the rotation of the geometry with angle theta and axis (Ax,Ay,Az)

Parameters
thetarotation angle
[in]Ax: x-coordinate of the axe
[in]Ay: y-coordinate of the axe
[in]Az: z-coordinate of the axe

◆ rotation() [3/3]

void EXPR_Node::rotation ( const tReal &  theta,
const tReal &  Ax,
const tReal &  Ay,
const tReal &  Az,
const tReal &  Cx,
const tReal &  Cy,
const tReal &  Cz 
)
inline

compute the rotation of the geometry with angle theta and axis (Ax,Ay,Az)a and center (Cx,Cy,Cz)

Parameters
[in]thetarotation angle
[in]Ax: x-coordinate of the axe
[in]Ay: y-coordinate of the axe
[in]Az: z-coordinate of the axe
[in]Cx: x-coordinate of the center
[in]Cy: y-coordinate of the center
[in]Cz: z-coordinate of the center

◆ setAlpha()

void EXPR_Node::setAlpha ( std::initializer_list< tReal > &&  alpha)
inline

set the matrix alpha by row

Parameters
[alpha: the matrix of size 9

◆ setBeta()

void EXPR_Node::setBeta ( std::initializer_list< tReal > &&  beta)
inline

set the constant by column

Parameters
[in]betatranslation value

◆ SetEpsilon()

static void EXPR_Node::SetEpsilon ( const tReal &  eps)
inlinestatic

set the tolerance error

Parameters
[in]epstolerance error

◆ toString()

tString EXPR_Node::toString ( ) const
overridevirtual

◆ translate()

void EXPR_Node::translate ( const std::array< tReal, 3 > &  T)
inline

translate the geometry

Parameters
[in]Tx: x-coordinate of the translation
[in]Ty: y-coordinate of the translation
[in]Tz: z-coordinate of the translation

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