C++ main module for stochmagnet Package  1.0
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
CORE_Array< T, I > Class Template Reference

this class describes an array of values T of dynamical size with algebrical operators and I is an implemented class which implements the following polymorphic methods: More...

#include <CORE_Array.h>

Inheritance diagram for CORE_Array< T, I >:
Inheritance graph
[legend]
Collaboration diagram for CORE_Array< T, I >:
Collaboration graph
[legend]

Public Member Functions

virtual tMemSize getMemorySize () const override
 return the memory size of the class and the memory size of all its attributes/associations More...
 
template<int N>
auto sbegin ()
 return begin stride iterator for writing More...
 
template<int N>
auto send ()
 return end N-stride iterator for writing More...
 
template<int N>
constexpr auto csbegin () const
 return begin N-stride const iterator for writing More...
 
template<int N>
constexpr auto csend () const
 return end N-stride const iterator for writing More...
 
const T & get (const tIndex &i) const
 get the i-th element for reading More...
 
T & get (const tIndex &i)
 get the i-th element for writting More...
 
const T * getValues () const
 get the values of the array for reading More...
 
T * getValues ()
 get the values of the array More...
 
Selfoperator= (const T &v)
 fill the values of the array with v More...
 
Selfoperator= (std::initializer_list< T > values)
 build an array by a copy of c More...
 
template<size_t N, typename Q >
Selfoperator= (const std::array< Q, N > &values)
 build an array by a copy of c More...
 
template<typename Q >
Selfoperator= (const std::valarray< Q > &values)
 build an array by a copy of c More...
 
template<typename Q >
Selfoperator= (const std::vector< Q > &values)
 build an array by a copy of c More...
 
template<typename Q , class I1 >
Selfoperator= (const CORE_Array< Q, I1 > &cpy)
 build an array by a copy of cpy More...
 
Selfoperator= (const Self &cpy)
 build an array by a copy of cpy More...
 
template<typename Q , class I1 >
Selfoperator= (CORE_Array< Q, I1 > &&cpy)
 build an array by a copy of cpy More...
 
Selfoperator= (Self &&cpy)
 build an array by a copy of cpy More...
 
template<typename Q >
void copy (const tIndex &n, const Q *vs)
 initialize the array to the values of pointer of size n More...
 
template<typename Q , size_t N>
void copy (const tIndex &n, const std::array< Q, N > &vs)
 initialize the array to the values of array of size N More...
 
template<typename Q >
void copy (const tIndex &n, const std::valarray< Q > &vs)
 initialize the array to the values of val array More...
 
template<typename Q >
void copy (const tIndex &n, const std::vector< Q > &vs)
 initialize the array to the values of vector More...
 
void copy (const tIndex &n, const std::initializer_list< T > &vs)
 initialize the array to the values of list More...
 
void copy (const tIndex &n, std::initializer_list< T > &&vs)
 initialize the array to the values of list More...
 
template<typename Q , class I1 >
void copy (const CORE_Array< Q, I1 > &cpy)
 copy the container More...
 
template<typename Q , class I1 >
void copy (CORE_Array< Q, I1 > &&cpy)
 copy the conatiner : mv is destroyed after this More...
 
void initialize (const T &v)
 randomize the field More...
 
void uniformRandomize ()
 randomize the field More...
 
void uniformRandomize (const T &min, const T &max)
 randomize the field More...
 
I & operator+= (const T &v)
 add operator More...
 
I & operator-= (const T &v)
 sub operator More...
 
I & operator*= (const T &v)
 multiplicator operator More...
 
I & operator/= (const T &v)
 divisor operator More...
 
I & operator%= (const T &v) requires core_functions
 modulo operator More...
 
template<typename Q , class I1 >
I & operator-= (const CORE_Array< Q, I1 > &v)
 array sub operator More...
 
template<typename Q , class I1 >
I & operator*= (const CORE_Array< Q, I1 > &v)
 array multiply operator More...
 
template<typename Q , class I1 >
I & operator/= (const CORE_Array< Q, I1 > &v)
 array divisor operator More...
 
template<typename LambdaFct >
void transform (LambdaFct &&F)
 transform the transform element with the lambda function Ti = F(Ti) More...
 
template<typename LambdaFct >
void transform (LambdaFct &&F, const Self &X)
 transform the transform element with the lambda function Ti = F(Xi) More...
 
template<typename LambdaFct >
void transform (LambdaFct &&F, const Self &X, const Self &Y)
 transform the transform element with the lambda function Ti = F(Xi,Yi) More...
 
void swap (Self &a)
 swap the contents of the array More...
 
void swap (const tIndex &i, const tIndex &j)
 swap the two elements of the array More...
 
void normalize ()
 normalize the array More...
 
template<typename Q , class I1 >
void axpy (const Q &alpha, const CORE_Array< Q, I1 > &X, const T &beta)
 compute This=beta.This+ alpha .X More...
 
tBoolean isNANContained () const
 return true if one value is Not A Number More...
 
void sum (T &s) const
 Computes the sum of all the elements. More...
 
void prod (T &p) const
 return the produc of all the elements More...
 
template<typename Q , class I1 >
T & scalarProduct (const CORE_Array< Q, I1 > &X, T &s) const
 return the scalar product More...
 
tReal l2Norm2 () const
 compute the L2 norm squared More...
 
tReal l2Norm () const
 compute the L2 norm More...
 
template<typename Q , class I1 >
tReal l2Distance2 (const CORE_Array< Q, I1 > &X) const
 compute the L2 distance squared More...
 
template<typename Q , class I1 >
tReal l2Distance (const CORE_Array< Q, I1 > &X) const
 compute the L2 distance More...
 
tReal linfNorm (tIndex &i) const
 compute the L infinity norm More...
 
template<typename Q , class I1 >
tReal linfDistance (const CORE_Array< Q, I1 > &X, tIndex &i) const
 compute the Linfinitty norm More...
 
void setSize (const tIndex &n)
 set the size of the container More...
 
tIndex getSize () const
 return the size of the container More...
 
void resize (const tIndex &n)
 modify the size of the array and keep its old values More...
 
const T & operator[] (const tIndex &i) const
 get the i-th element for reading. Do not verify the bounds More...
 
T & operator[] (const tIndex &i)
 get the i-th element for writting. Do not verify the bounds More...
 
constexpr auto cbegin () const
 return begin iterator for reading More...
 
constexpr auto cend () const
 return end iterator for reading More...
 
auto begin ()
 return begin iterator for writing More...
 
auto end ()
 return end iterator for writing More...
 
auto rbegin ()
 return reverse begin iterator for writing More...
 
auto rend ()
 return reverse end iterator for writing More...
 
constexpr auto crbegin () const
 return reverse begin iterator for reading More...
 
constexpr auto crend () const
 return reverse end iterator for reading More...
 
tString getDataTypeName () const
 get the type of data More...
 
virtual tString toString () const override
 return the string representation of the object node More...
 
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...
 
virtual tMemSize getContentsMemorySize () const
 return nthe memory size of the included associations 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 tBoolean EnableMemoryStack (const tBoolean &isMemoryChecked)
 enable the memory stack More...
 
static void EnableMemoryStack ()
 enable the memory stack More...
 
static void DisableMemoryStack ()
 disable the memory stack More...
 
static tBoolean IsMemoryStackEnabled ()
 return trur if the memory stack is enabled More...
 
static tString MemoryStackToString ()
 get the memory stack in string More...
 
static tIndex GetRegisteredClassesNumber ()
 get the memory stack in string More...
 

Protected Member Functions

 CORE_Array ()
 instanciation method of a class More...
 
virtual ~CORE_Array ()
 destroy an instance of class More...
 

Private Types

typedef CORE_Array< T, I > Self
 

Private Member Functions

template<class T >
std::shared_ptr< T > setThis (std::unique_ptr< T, CORE_Object::Delete > &up)
 set the shared pointer from an unique pointer More...
 

Private Attributes

std::weak_ptr< CORE_ObjectmThis
 

Detailed Description

template<typename T, class I>
class CORE_Array< T, I >

this class describes an array of values T of dynamical size with algebrical operators and I is an implemented class which implements the following polymorphic methods:

Member Typedef Documentation

◆ Self

template<typename T , class I >
typedef CORE_Array<T,I> CORE_Array< T, I >::Self
private

Constructor & Destructor Documentation

◆ CORE_Array()

template<typename T , class I >
CORE_Array< T, I >::CORE_Array ( )
inlineprotected

instanciation method of a class

◆ ~CORE_Array()

template<typename T , class I >
virtual CORE_Array< T, I >::~CORE_Array ( )
inlineprotectedvirtual

destroy an instance of class

Member Function Documentation

◆ axpy()

template<typename T , class I >
template<typename Q , class I1 >
void CORE_Array< T, I >::axpy ( const Q &  alpha,
const CORE_Array< Q, I1 > &  X,
const T &  beta 
)
inline

compute This=beta.This+ alpha .X

Parameters
[in]alphaalpha parameter
[in]XX array
(in]beta : beta parameter

Referenced by CORE_Test::testArray().

Here is the caller graph for this function:

◆ begin()

template<typename T , class I >
auto CORE_Collection< T, I >::begin ( )
inlineinherited

return begin iterator for writing

Returns
begin iterator

Referenced by CORE_StdValArray< T >::AXPY(), CORE_StdValArray< T >::Sum(), CORE_StdPtrArray< T >::Transform(), and CORE_StdValArray< T >::Transform().

Here is the caller graph for this function:

◆ cbegin()

template<typename T , class I >
constexpr auto CORE_Collection< T, I >::cbegin ( ) const
inlineconstexprinherited

◆ cend()

template<typename T , class I >
constexpr auto CORE_Collection< T, I >::cend ( ) const
inlineconstexprinherited

return end iterator for reading

Returns
end iterator

Referenced by CORE_StdValArray< T >::AXPY(), CORE_Test::testArray(), CORE_Collection< T, I >::toString(), CORE_StdPtrArray< T >::Transform(), and CORE_StdValArray< T >::Transform().

Here is the caller graph for this function:

◆ copy() [1/8]

template<typename T , class I >
template<typename Q , class I1 >
void CORE_Array< T, I >::copy ( const CORE_Array< Q, I1 > &  cpy)
inline

copy the container

Parameters
[in]cpy: container to copy

References CORE_Array< T, I >::copy().

Here is the call graph for this function:

◆ copy() [2/8]

template<typename T , class I >
template<typename Q >
void CORE_Array< T, I >::copy ( const tIndex n,
const Q *  vs 
)
inline

initialize the array to the values of pointer of size n

Parameters
[in]n: size of vs
[in]vs: values of the array

Referenced by CORE_Array< T, I >::copy(), CORE_Array< T, I >::operator=(), and CORE_Test::testArray().

Here is the caller graph for this function:

◆ copy() [3/8]

template<typename T , class I >
template<typename Q , size_t N>
void CORE_Array< T, I >::copy ( const tIndex n,
const std::array< Q, N > &  vs 
)
inline

initialize the array to the values of array of size N

Parameters
[in]vs: values of the array

References CORE_Array< T, I >::copy().

Here is the call graph for this function:

◆ copy() [4/8]

template<typename T , class I >
void CORE_Array< T, I >::copy ( const tIndex n,
const std::initializer_list< T > &  vs 
)
inline

initialize the array to the values of list

Parameters
[in]vs: values of the array

References CORE_Array< T, I >::copy().

Here is the call graph for this function:

◆ copy() [5/8]

template<typename T , class I >
template<typename Q >
void CORE_Array< T, I >::copy ( const tIndex n,
const std::valarray< Q > &  vs 
)
inline

initialize the array to the values of val array

Parameters
[in]vs: values of the array

References CORE_Array< T, I >::copy().

Here is the call graph for this function:

◆ copy() [6/8]

template<typename T , class I >
template<typename Q >
void CORE_Array< T, I >::copy ( const tIndex n,
const std::vector< Q > &  vs 
)
inline

initialize the array to the values of vector

Parameters
[in]vs: values of the array

References CORE_Array< T, I >::copy().

Here is the call graph for this function:

◆ copy() [7/8]

template<typename T , class I >
void CORE_Array< T, I >::copy ( const tIndex n,
std::initializer_list< T > &&  vs 
)
inline

initialize the array to the values of list

Parameters
[in]vs: values of the array

References CORE_Array< T, I >::copy().

Here is the call graph for this function:

◆ copy() [8/8]

template<typename T , class I >
template<typename Q , class I1 >
void CORE_Array< T, I >::copy ( CORE_Array< Q, I1 > &&  cpy)
inline

copy the conatiner : mv is destroyed after this

Parameters
[in]cpy:container to move

◆ crbegin()

template<typename T , class I >
constexpr auto CORE_Collection< T, I >::crbegin ( ) const
inlineconstexprinherited

return reverse begin iterator for reading

Returns
begin iterator

◆ crend()

template<typename T , class I >
constexpr auto CORE_Collection< T, I >::crend ( ) const
inlineconstexprinherited

return reverse end iterator for reading

Returns
end iterator

◆ csbegin()

template<typename T , class I >
template<int N>
constexpr auto CORE_Array< T, I >::csbegin ( ) const
inlineconstexpr

return begin N-stride const iterator for writing

Returns
begin stride const iterator

◆ csend()

template<typename T , class I >
template<int N>
constexpr auto CORE_Array< T, I >::csend ( ) const
inlineconstexpr

return end N-stride const iterator for writing

Returns
end stride const iterator

References CORE_Collection< T, I >::getSize().

Here is the call graph for this function:

◆ DisableMemoryStack()

static void CORE_Object::DisableMemoryStack ( )
inlinestaticinherited

disable the memory stack

Referenced by CORE_Object::EnableMemoryStack().

Here is the caller graph for this function:

◆ EnableMemoryStack() [1/2]

static void CORE_Object::EnableMemoryStack ( )
inlinestaticinherited

enable the memory stack

Referenced by CORE_Object::EnableMemoryStack(), and CORE_Run::SetDebugOptions().

Here is the caller graph for this function:

◆ EnableMemoryStack() [2/2]

static tBoolean CORE_Object::EnableMemoryStack ( const tBoolean isMemoryChecked)
inlinestaticinherited

enable the memory stack

Parameters
[in]isMemoryChecked: true to verify memory allocation of CORE_Object classes
Returns
true if the memroy is checked

References CORE_Object::DisableMemoryStack(), CORE_Object::EnableMemoryStack(), and CORE_Object::IsMemoryStackEnabled().

Here is the call graph for this function:

◆ end()

template<typename T , class I >
auto CORE_Collection< T, I >::end ( )
inlineinherited

return end iterator for writing

Returns
end iterator

Referenced by CORE_StdValArray< T >::Sum().

Here is the caller graph for this function:

◆ get() [1/2]

template<typename T , class I >
T& CORE_Array< T, I >::get ( const tIndex i)
inline

get the i-th element for writting

Parameters
[in]iindex of the element

◆ get() [2/2]

template<typename T , class I >
const T& CORE_Array< T, I >::get ( const tIndex i) const
inline

get the i-th element for reading

Parameters
[in]iindex of the element

Referenced by CORE_Test::testArray().

Here is the caller graph for this function:

◆ getClassName()

tString CORE_Object::getClassName ( ) const
inlineinherited

return the name of the class

Returns
the string name of the class

Referenced by CORE_Object::getIdentityString(), and CORE_Test::testTypes().

Here is the caller graph for this function:

◆ getConstSharedPointer()

template<class T >
std::shared_ptr<const T> CORE_Object::getConstSharedPointer ( ) const
inlineinherited

return a const shared pointer for this

Returns
the shared pointer as a type T

References CORE_Object::mThis.

◆ getContentsMemorySize()

virtual tMemSize CORE_Object::getContentsMemorySize ( ) const
inlinevirtualinherited

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 in CORE_VectorList< T, I >, CORE_VectorList< tString, CORE_StringsList >, CORE_ValArray< T, I >, CORE_ValArray< T, CORE_StdValArray< T > >, CORE_Run, CORE_PtrArray< T, I >, CORE_PtrArray< T, CORE_StdPtrArray< T > >, CORE_Field< T, K, D, S, I >, CORE_Field< T, K, D, CORE_StdPtrArray< T >, CORE_StdPtrField< T, K, D > >, CORE_Field< T, K, D, CORE_StdValArray< T >, CORE_StdValField< T, K, D > >, CORE_ClassFactory, SMS_STDUniformFunction, SMS_STDNormalFunction, SMS_BoostUniformFunction, SMS_BoostNormalFunction, SM_ZeemanOperator, SM_XDMF, SM_VTK, SM_System, SM_Output, SM_Operator, SM_Network, SM_DemagnetizedOperator, SM_Beam, CORE_StringsList, and CORE_Out.

Referenced by CORE_Out::getContentsMemorySize(), SM_Beam::getContentsMemorySize(), SM_Network::getContentsMemorySize(), SM_Operator::getContentsMemorySize(), SM_Output::getContentsMemorySize(), SM_System::getContentsMemorySize(), SM_VTK::getContentsMemorySize(), SMS_BoostNormalFunction::getContentsMemorySize(), SMS_BoostUniformFunction::getContentsMemorySize(), SMS_STDNormalFunction::getContentsMemorySize(), SMS_STDUniformFunction::getContentsMemorySize(), CORE_ClassFactory::getContentsMemorySize(), CORE_PtrArray< T, I >::getContentsMemorySize(), CORE_ValArray< T, I >::getContentsMemorySize(), CORE_VectorList< T, I >::getContentsMemorySize(), CORE_Object::getMemorySize(), SM_ConstantNoiseRateFunction::getMemorySize(), SM_InverseNoiseRateFunction::getMemorySize(), SM_LandauLifschitzFunction::getMemorySize(), SM_NoiseRateFunction::getMemorySize(), SM_Object::getMemorySize(), SM_StochasticFunction::getMemorySize(), SM_TemplatedNoiseRateFunction< DerivedClass >::getMemorySize(), SM_TimeStepper::getMemorySize(), SMS_BoostRandomFunction::getMemorySize(), CORE_Array< T, I >::getMemorySize(), CORE_Chrono::getMemorySize(), CORE_Collection< T, I >::getMemorySize(), CORE_IO::getMemorySize(), CORE_List< T, K, I >::getMemorySize(), CORE_OptionsReader::getMemorySize(), CORE_OutputFile::getMemorySize(), and CORE_Test::getMemorySize().

Here is the caller graph for this function:

◆ getDataTypeName()

template<typename T , class I >
tString CORE_Collection< T, I >::getDataTypeName ( ) const
inlineinherited

get the type of data

Returns
the type of data as string

Referenced by SM_XDMF::writeVertices().

Here is the caller graph for this function:

◆ getIdentityString()

tString CORE_Object::getIdentityString ( ) const
inlineinherited

retrun the string identification of the class

Returns
the string identity of the class

References CORE_Object::getClassName(), and core_functions::pointerToString().

Referenced by CORE_Test::testArray(), CORE_Test::testField(), CORE_Test::testTypes(), CORE_Object::toString(), CORE_ClassFactory::toString(), and CORE_Field< T, K, D, S, I >::toString().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getMemorySize()

template<typename T , class I >
virtual tMemSize CORE_Array< T, I >::getMemorySize ( ) const
inlineoverridevirtual

return the memory size of the class and the memory size of all its attributes/associations

Returns
the memory size of the class and the memory size of its attributes/associations in bytes 1 octet = 1 byte 1 Ko = 1024 bytes 1 Mo = 1024 Ko 1 Go = 1024 Mo

Reimplemented from CORE_Collection< T, I >.

Reimplemented in CORE_ValArray< T, I >, CORE_ValArray< T, CORE_StdValArray< T > >, CORE_StdValArray< T >, CORE_StdPtrArray< T >, CORE_PtrArray< T, I >, and CORE_PtrArray< T, CORE_StdPtrArray< T > >.

References CORE_Object::getContentsMemorySize().

Referenced by CORE_Test::testArray().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getPointerString()

tString CORE_Object::getPointerString ( ) const
inlineinherited

retrun the pointer of the class as a string

Returns
the pointer of the calss as a string

References core_functions::pointerToString().

Here is the call graph for this function:

◆ GetRegisteredClassesNumber()

static tIndex CORE_Object::GetRegisteredClassesNumber ( )
inlinestaticinherited

get the memory stack in string

Returns
the string representation of the memory stack

◆ getSharedPointer()

template<class T >
std::shared_ptr<T> CORE_Object::getSharedPointer ( )
inlineinherited

return the shared pointer for this

Returns
the shared pointer as a type T

References CORE_Object::mThis.

◆ getSize()

template<typename T , class I >
tIndex CORE_Collection< T, I >::getSize ( ) const
inlineinherited

◆ getValues() [1/2]

template<typename T , class I >
T* CORE_Array< T, I >::getValues ( )
inline

get the values of the array

Returns
the values of the array

References CORE_Array< T, I >::getValues().

Here is the call graph for this function:

◆ getValues() [2/2]

template<typename T , class I >
const T* CORE_Array< T, I >::getValues ( ) const
inline

◆ initialize()

template<typename T , class I >
void CORE_Array< T, I >::initialize ( const T &  v)
inline

randomize the field

Referenced by CORE_Array< T, I >::operator=().

Here is the caller graph for this function:

◆ isInstanceOf()

template<class T >
tBoolean CORE_Object::isInstanceOf ( ) const
inlineinherited

test if the clas T is an instance of this class

Returns
true if the object is an instance of T

Referenced by SM_Beam::templatedSimulate().

Here is the caller graph for this function:

◆ IsMemoryStackEnabled()

static tBoolean CORE_Object::IsMemoryStackEnabled ( )
inlinestaticinherited

return trur if the memory stack is enabled

Referenced by CORE_Object::EnableMemoryStack(), and main().

Here is the caller graph for this function:

◆ isNANContained()

template<typename T , class I >
tBoolean CORE_Array< T, I >::isNANContained ( ) const
inline

return true if one value is Not A Number

Returns
false if all the values is a Number

◆ l2Distance()

template<typename T , class I >
template<typename Q , class I1 >
tReal CORE_Array< T, I >::l2Distance ( const CORE_Array< Q, I1 > &  X) const
inline

compute the L2 distance

Returns
the L2 dista,ce \( \sqrt{L2Distance2(X)} \)

References CORE_Array< T, I >::l2Distance2().

Referenced by CORE_Test::testArray().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ l2Distance2()

template<typename T , class I >
template<typename Q , class I1 >
tReal CORE_Array< T, I >::l2Distance2 ( const CORE_Array< Q, I1 > &  X) const
inline

compute the L2 distance squared

Parameters
[in]XX array
Returns
\( \sum_{i=0}^{n-1} |T_i-X_i|^2 \)

Referenced by CORE_Array< T, I >::l2Distance().

Here is the caller graph for this function:

◆ l2Norm()

template<typename T , class I >
tReal CORE_Array< T, I >::l2Norm ( ) const
inline

compute the L2 norm

Returns
the L2 norm \( \sqrt{L2Norm2()} \)

References CORE_Array< T, I >::l2Norm2().

Here is the call graph for this function:

◆ l2Norm2()

template<typename T , class I >
tReal CORE_Array< T, I >::l2Norm2 ( ) const
inline

compute the L2 norm squared

Returns
\( \sum_{i=0}^{n-1} |T_i|^2 \)

Referenced by CORE_Array< T, I >::l2Norm().

Here is the caller graph for this function:

◆ linfDistance()

template<typename T , class I >
template<typename Q , class I1 >
tReal CORE_Array< T, I >::linfDistance ( const CORE_Array< Q, I1 > &  X,
tIndex i 
) const
inline

compute the Linfinitty norm

Returns
the max of |T_i-X_i| and i

Referenced by CORE_Test::testArray().

Here is the caller graph for this function:

◆ linfNorm()

template<typename T , class I >
tReal CORE_Array< T, I >::linfNorm ( tIndex i) const
inline

compute the L infinity norm

Returns
the max of |T_i| and i

◆ MemoryStackToString()

static tString CORE_Object::MemoryStackToString ( )
inlinestaticinherited

get the memory stack in string

Returns
the string representation of the memory stack

Referenced by main().

Here is the caller graph for this function:

◆ normalize()

template<typename T , class I >
void CORE_Array< T, I >::normalize ( )
inline

normalize the array

◆ operator%=()

template<typename T , class I >
I& CORE_Array< T, I >::operator%= ( const T &  v)
inline

modulo operator

Parameters
[in]vmodulo value

and operator

Parameters
[in]vand value

or operator

Parameters
[in]vand value

complementary operator

Parameters
[in]vcomplementary value

left shift operator

Parameters
[in]vleft shift value

right shift operator

Parameters
[in]vleft shift value

array add operator

Parameters
[in]varray to multiply

◆ operator*=() [1/2]

template<typename T , class I >
template<typename Q , class I1 >
I& CORE_Array< T, I >::operator*= ( const CORE_Array< Q, I1 > &  v)
inline

array multiply operator

Parameters
[in]varray to multiply

◆ operator*=() [2/2]

template<typename T , class I >
I& CORE_Array< T, I >::operator*= ( const T &  v)
inline

multiplicator operator

Parameters
[in]vmultiplicator value

◆ operator+=()

template<typename T , class I >
I& CORE_Array< T, I >::operator+= ( const T &  v)
inline

add operator

Parameters
[in]v:addvalue

◆ operator-=() [1/2]

template<typename T , class I >
template<typename Q , class I1 >
I& CORE_Array< T, I >::operator-= ( const CORE_Array< Q, I1 > &  v)
inline

array sub operator

Parameters
[in]varray to multiply

◆ operator-=() [2/2]

template<typename T , class I >
I& CORE_Array< T, I >::operator-= ( const T &  v)
inline

sub operator

Parameters
[in]v:subvalue

◆ operator/=() [1/2]

template<typename T , class I >
template<typename Q , class I1 >
I& CORE_Array< T, I >::operator/= ( const CORE_Array< Q, I1 > &  v)
inline

array divisor operator

Parameters
[in]varray to multiply

◆ operator/=() [2/2]

template<typename T , class I >
I& CORE_Array< T, I >::operator/= ( const T &  v)
inline

divisor operator

Parameters
[in]vdivisor value

◆ operator=() [1/9]

template<typename T , class I >
template<typename Q , class I1 >
Self& CORE_Array< T, I >::operator= ( const CORE_Array< Q, I1 > &  cpy)
inline

build an array by a copy of cpy

Parameters
[in]cpy: array to copy

References CORE_Array< T, I >::copy().

Here is the call graph for this function:

◆ operator=() [2/9]

template<typename T , class I >
Self& CORE_Array< T, I >::operator= ( const Self cpy)
inline

build an array by a copy of cpy

Parameters
[in]cpy: array to copy

References CORE_Array< T, I >::copy().

Here is the call graph for this function:

◆ operator=() [3/9]

template<typename T , class I >
template<size_t N, typename Q >
Self& CORE_Array< T, I >::operator= ( const std::array< Q, N > &  values)
inline

build an array by a copy of c

Parameters
[in]valuesvalues to copy

References CORE_Array< T, I >::copy().

Here is the call graph for this function:

◆ operator=() [4/9]

template<typename T , class I >
template<typename Q >
Self& CORE_Array< T, I >::operator= ( const std::valarray< Q > &  values)
inline

build an array by a copy of c

Parameters
[in]valuesvalues to copy

References CORE_Array< T, I >::copy().

Here is the call graph for this function:

◆ operator=() [5/9]

template<typename T , class I >
template<typename Q >
Self& CORE_Array< T, I >::operator= ( const std::vector< Q > &  values)
inline

build an array by a copy of c

Parameters
[in]valuesvalues to copy

References CORE_Array< T, I >::copy().

Here is the call graph for this function:

◆ operator=() [6/9]

template<typename T , class I >
Self& CORE_Array< T, I >::operator= ( const T &  v)
inline

fill the values of the array with v

Parameters
[in]v: value to fill

References CORE_Array< T, I >::initialize().

Here is the call graph for this function:

◆ operator=() [7/9]

template<typename T , class I >
template<typename Q , class I1 >
Self& CORE_Array< T, I >::operator= ( CORE_Array< Q, I1 > &&  cpy)
inline

build an array by a copy of cpy

Parameters
[in]cpy: array to copy ( in mirror with th ecopy operator)

References CORE_Array< T, I >::copy().

Here is the call graph for this function:

◆ operator=() [8/9]

template<typename T , class I >
Self& CORE_Array< T, I >::operator= ( Self &&  cpy)
inline

build an array by a copy of cpy

Parameters
[in]cpy: array to copy ( in mirror with th ecopy operator)

References CORE_Array< T, I >::copy().

Here is the call graph for this function:

◆ operator=() [9/9]

template<typename T , class I >
Self& CORE_Array< T, I >::operator= ( std::initializer_list< T >  values)
inline

build an array by a copy of c

Parameters
[in]valuesvalues to copy

References CORE_Array< T, I >::copy().

Here is the call graph for this function:

◆ operator[]() [1/2]

template<typename T , class I >
T& CORE_Collection< T, I >::operator[] ( const tIndex i)
inlineinherited

get the i-th element for writting. Do not verify the bounds

Parameters
[in]iindex of the element

◆ operator[]() [2/2]

template<typename T , class I >
const T& CORE_Collection< T, I >::operator[] ( const tIndex i) const
inlineinherited

get the i-th element for reading. Do not verify the bounds

Parameters
[in]iindex of the element

◆ prod()

template<typename T , class I >
void CORE_Array< T, I >::prod ( T &  p) const
inline

return the produc of all the elements

Parameters
[out]p: the product of all the elements

Referenced by CORE_Test::testArray().

Here is the caller graph for this function:

◆ rbegin()

template<typename T , class I >
auto CORE_Collection< T, I >::rbegin ( )
inlineinherited

return reverse begin iterator for writing

Returns
begin iterator

◆ rend()

template<typename T , class I >
auto CORE_Collection< T, I >::rend ( )
inlineinherited

return reverse end iterator for writing

Returns
end iterator

◆ resize()

template<typename T , class I >
void CORE_Collection< T, I >::resize ( const tIndex n)
inlineinherited

modify the size of the array and keep its old values

◆ sbegin()

template<typename T , class I >
template<int N>
auto CORE_Array< T, I >::sbegin ( )
inline

return begin stride iterator for writing

Returns
begin stride iterator

◆ scalarProduct()

template<typename T , class I >
template<typename Q , class I1 >
T& CORE_Array< T, I >::scalarProduct ( const CORE_Array< Q, I1 > &  X,
T &  s 
) const
inline

return the scalar product

Parameters
|in]X : argument vector
[out]

◆ send()

template<typename T , class I >
template<int N>
auto CORE_Array< T, I >::send ( )
inline

return end N-stride iterator for writing

Returns
end stride iterator

References CORE_Collection< T, I >::getSize().

Here is the call graph for this function:

◆ setSize()

template<typename T , class I >
void CORE_Collection< T, I >::setSize ( const tIndex n)
inlineinherited

set the size of the container

Parameters
[in]n:size of the container

Referenced by CORE_StdPtrField< T, K, D >::mod2(), CORE_StdValField< T, K, D >::mod2(), CORE_Test::testArray(), CORE_StdPtrArray< T >::Transform(), CORE_StdValArray< T >::Transform(), and CORE_Test::uniformRandomTest().

Here is the caller graph for this function:

◆ setThis()

template<class T >
std::shared_ptr<T> CORE_Object::setThis ( std::unique_ptr< T, CORE_Object::Delete > &  up)
inlineprivateinherited

set the shared pointer from an unique pointer

Parameters
[in,out]upunique pointer of the class at input, points to null pointer at output
Returns
the shared pointer of the class

Method only calledby the friend class CORE_ClassFactory::NewSharedInstance()

References CORE_Object::mThis.

◆ sum()

template<typename T , class I >
void CORE_Array< T, I >::sum ( T &  s) const
inline

Computes the sum of all the elements.

Parameters
[out]s: the sum of all the elements

Referenced by CORE_Test::testArray(), and CORE_Test::uniformRandomTest().

Here is the caller graph for this function:

◆ swap() [1/2]

template<typename T , class I >
void CORE_Array< T, I >::swap ( const tIndex i,
const tIndex j 
)
inline

swap the two elements of the array

Parameters
[in]i: index to swap
[in]j: index to swap

References CORE_Array< T, I >::swap().

Here is the call graph for this function:

◆ swap() [2/2]

template<typename T , class I >
void CORE_Array< T, I >::swap ( Self a)
inline

swap the contents of the array

Parameters
[in]athe array with witch the contents is swap

Referenced by CORE_Array< T, I >::swap(), and CORE_Test::testArray().

Here is the caller graph for this function:

◆ toString()

template<typename T , class I >
virtual tString CORE_Collection< T, I >::toString ( ) const
inlineoverridevirtualinherited

return the string representation of the object node

Returns
the string representation of the object node

Reimplemented from CORE_Object.

Reimplemented in CORE_Field< T, K, D, S, I >, CORE_Field< T, K, D, CORE_StdPtrArray< T >, CORE_StdPtrField< T, K, D > >, and CORE_Field< T, K, D, CORE_StdValArray< T >, CORE_StdValField< T, K, D > >.

References CORE_Collection< T, I >::cbegin(), CORE_Collection< T, I >::cend(), and CORE_Object::toString().

Here is the call graph for this function:

◆ transform() [1/3]

template<typename T , class I >
template<typename LambdaFct >
void CORE_Array< T, I >::transform ( LambdaFct &&  F)
inline

transform the transform element with the lambda function Ti = F(Ti)

Parameters
[in]F: lambda function with one variable

Referenced by CORE_Array< T, I >::transform(), and CORE_Test::uniformRandomTest().

Here is the caller graph for this function:

◆ transform() [2/3]

template<typename T , class I >
template<typename LambdaFct >
void CORE_Array< T, I >::transform ( LambdaFct &&  F,
const Self X 
)
inline

transform the transform element with the lambda function Ti = F(Xi)

Parameters
[in]F: lambda function with one variable
[in]X: argument of F

References CORE_Array< T, I >::transform().

Here is the call graph for this function:

◆ transform() [3/3]

template<typename T , class I >
template<typename LambdaFct >
void CORE_Array< T, I >::transform ( LambdaFct &&  F,
const Self X,
const Self Y 
)
inline

transform the transform element with the lambda function Ti = F(Xi,Yi)

Parameters
[in]F: lambda function with one variable
[in]X: first argument of F
[in]Y: second argument of F

References CORE_Array< T, I >::transform().

Here is the call graph for this function:

◆ uniformRandomize() [1/2]

template<typename T , class I >
void CORE_Array< T, I >::uniformRandomize ( )
inline

randomize the field

Referenced by CORE_Test::testArray(), CORE_Array< T, I >::uniformRandomize(), and CORE_Test::uniformRandomTest().

Here is the caller graph for this function:

◆ uniformRandomize() [2/2]

template<typename T , class I >
void CORE_Array< T, I >::uniformRandomize ( const T &  min,
const T &  max 
)
inline

randomize the field

References core_functions::max(), core_functions::min(), and CORE_Array< T, I >::uniformRandomize().

Here is the call graph for this function:

Member Data Documentation

◆ mThis

std::weak_ptr<CORE_Object> CORE_Object::mThis
privateinherited

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