C++ mpi module for stochmagnet_main Package
Public Member Functions | Protected Member Functions | List of all members
EXPR_ParentNode Class Reference

This class is a parent node with children. More...

#include <EXPR_ParentNode.h>

Inheritance diagram for EXPR_ParentNode:
Inheritance graph
[legend]
Collaboration diagram for EXPR_ParentNode:
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...
 
void addChild (CORE_SharedPointer< EXPR_ChildNode > cNode)
 add the children More...
 
void addChild (CORE_UniquePointer< EXPR_ChildNode > cNode)
 add the children More...
 
const std::vector< CORE_SharedPointer< EXPR_ChildNode > > & getChildren () const
 get the children More...
 
std::vector< CORE_SharedPointer< EXPR_ChildNode > > & getChildren ()
 get the children More...
 
CORE_SharedPointer< EXPR_ChildNodegetSharedChild (const tIndex &i)
 get the shared child at index for writting More...
 
EXPR_ChildNodegetChild (const tIndex &i)
 get the child at index for writting More...
 
const EXPR_ChildNodegetChild (const tIndex &i) const
 get the child at index for readind More...
 
virtual void adimensionize (const tReal &L, std::map< tString, tBoolean > &alreadyComputed) override
 adimensionize the node More...
 
virtual void computeBoundingBox (std::map< tString, tBoolean > &alreadyComputed) override
 compute the bounding box of the geometry after applying the transformation cosidering only first child More...
 
virtual tBoolean isInside (std::array< tReal, 3 > M) const override
 return true if the point is in the bounding box of the first child node More...
 
virtual tString toString () const override
 return the string representation of this More...
 
- Public Member Functions inherited from EXPR_Node
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...
 
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...
 
- 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...
 

Protected Member Functions

 EXPR_ParentNode ()
 create the class
 
virtual ~EXPR_ParentNode ()
 delete the class
 
- Protected Member Functions inherited from EXPR_Node
 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

 

Additional Inherited Members

- Static Public Member Functions inherited from EXPR_Node
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...
 

Detailed Description

This class is a parent node with children.

Author
Stéphane Despréaux
Version
1.0

Member Function Documentation

◆ addChild() [1/2]

void EXPR_ParentNode::addChild ( CORE_SharedPointer< EXPR_ChildNode cNode)
inline

add the children

Parameters
[in]cNodechild to add

◆ addChild() [2/2]

void EXPR_ParentNode::addChild ( CORE_UniquePointer< EXPR_ChildNode cNode)
inline

add the children

Parameters
[in]cNodechild to add

◆ adimensionize()

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

adimensionize the node

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

Reimplemented from EXPR_Node.

◆ computeBoundingBox()

void EXPR_ParentNode::computeBoundingBox ( std::map< tString, tBoolean > &  alreadyComputed)
overridevirtual

compute the bounding box of the geometry after applying the transformation cosidering only first child

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

Itsets the bounding bo of the node to the the bounding box of the first child only

Implements EXPR_Node.

Reimplemented in EXPR_UnionOperator, EXPR_NotOperator, EXPR_IntersectionOperator, and EXPR_DifferenceOperator.

◆ getChild() [1/2]

EXPR_ChildNode* EXPR_ParentNode::getChild ( const tIndex &  i)
inline

get the child at index for writting

Parameters
[in]iindex of the child to get
Returns
null if there is no child at index i

◆ getChild() [2/2]

const EXPR_ChildNode* EXPR_ParentNode::getChild ( const tIndex &  i) const
inline

get the child at index for readind

Parameters
[in]iindex of the child to get
Returns
null if there is no child at index i

◆ getChildren() [1/2]

std::vector<CORE_SharedPointer<EXPR_ChildNode> >& EXPR_ParentNode::getChildren ( )
inline

get the children

Returns
the children list

◆ getChildren() [2/2]

const std::vector<CORE_SharedPointer<EXPR_ChildNode> >& EXPR_ParentNode::getChildren ( ) const
inline

get the children

Returns
the children list

◆ getContentsMemorySize()

virtual tMemSize EXPR_ParentNode::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_Node.

Reimplemented in EXPR_UnionOperator, EXPR_RootNode, EXPR_OperatorNode, EXPR_NotOperator, EXPR_IntersectionOperator, EXPR_InheritedNode, EXPR_GroupNode, and EXPR_DifferenceOperator.

◆ getMemorySize()

virtual tMemSize EXPR_ParentNode::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_Node.

Reimplemented in EXPR_UnionOperator, EXPR_RootNode, EXPR_OperatorNode, EXPR_NotOperator, EXPR_IntersectionOperator, EXPR_InheritedNode, EXPR_GroupNode, and EXPR_DifferenceOperator.

◆ getSharedChild()

CORE_SharedPointer<EXPR_ChildNode> EXPR_ParentNode::getSharedChild ( const tIndex &  i)
inline

get the shared child at index for writting

Parameters
[in]iindex of the child to get
Returns
null if there is no child at index i

◆ isInside()

tBoolean EXPR_ParentNode::isInside ( std::array< tReal, 3 >  M) const
overridevirtual

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

Parameters
[in]Mcoordinates of the point to test if inside
Returns
true if the point is inside its first child

Implements EXPR_Node.

Reimplemented in EXPR_UnionOperator, EXPR_NotOperator, EXPR_IntersectionOperator, and EXPR_DifferenceOperator.

◆ toString()

virtual tString EXPR_ParentNode::toString ( ) const
inlineoverridevirtual

return the string representation of this

Returns
the string representation of this It prints only the first child

Reimplemented from EXPR_Node.

Reimplemented in EXPR_UnionOperator, EXPR_NotOperator, EXPR_IntersectionOperator, EXPR_InheritedNode, EXPR_GroupNode, and EXPR_DifferenceOperator.


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