|
C++ mpi module for stochmagnet_main Package
|
this class describes an field. A field is composed by More...
#include <CORE_Field.h>


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... | |
| virtual tMemSize | getContentsMemorySize () const override |
| return the memory size of the included associations More... | |
| void | setElementsNumber (const tInteger &n) |
| set the number of element of the container More... | |
| void | fitToElementsNumber (const tInteger &n) |
| set the number of element of the container without erasing values More... | |
| tIndex | getElementsNumber () const |
| return the number values of the container More... | |
| void | setSize (const tIndex &n) |
| set the number of values of the container More... | |
| void | resize (const tIndex &n) |
| set the number of values of the container More... | |
| tIndex | getSize () const |
| return the number values of the container More... | |
| K | getDimension () const |
| get the dimension of the field More... | |
| const T & | operator[] (const tIndex &i) const |
| get the i-th value for reading. More... | |
| T & | operator[] (const tIndex &i) |
| get the i-th value for writting. More... | |
| const T & | operator() (const tInteger &i, const K &d) const |
| get the i-th element for reading. Do not verify the bounds More... | |
| T & | operator() (const tInteger &i, const K d) |
| get the i-th element for writting. Do not verify the bounds More... | |
| const T * | operator() (const tInteger &i) const |
| get the i-th element for reading. Do not verify the bounds More... | |
| T * | operator() (const tInteger &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... | |
| auto | sbegin () |
| return begin stride iterator for writing More... | |
| auto | send () |
| return end N-stride iterator for writing More... | |
| constexpr auto | csbegin () const |
| return begin N-stride const iterator for writing More... | |
| constexpr auto | csend () const |
| return end N-stride const iterator for writing More... | |
| const T & | get (const tIndex &i, const K &d) const |
| get the d-th coordinate of the i-th element for reading More... | |
| T & | get (const tIndex &i, const K &d) |
| get the d-th coordinate of 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... | |
| const S & | getStorage () const |
| get the storage More... | |
| S & | getStorage () |
| get the storage More... | |
| Self & | operator= (const T &v) |
| fill the values of the field with v More... | |
| Self & | operator= (const std::initializer_list< T > &values) |
| build an field by a copy of c More... | |
| Self & | operator= (std::initializer_list< T > &&values) |
| build an field by a copy of c More... | |
| template<size_t N, typename Q > | |
| Self & | operator= (const std::array< Q, N > &values) |
| build an field by a copy of c More... | |
| template<typename Q > | |
| Self & | operator= (const std::array< Q, D > &values) |
| build an field by a copy of c More... | |
| template<typename Q > | |
| Self & | operator= (const std::valarray< Q > &values) |
| build an field by a copy of c More... | |
| template<typename Q > | |
| Self & | operator= (const std::vector< Q > &values) |
| build an field by a copy of c More... | |
| Self & | operator= (const Self &cpy) |
| build a field by a copy of cpy More... | |
| Self & | operator= (Self &&cpy) |
| build an field by a copy of cpy More... | |
| template<typename Q , class S1 , class I1 > | |
| Self & | operator= (const CORE_Field< Q, K, D, S1, I1 > &cpy) |
| build a field by a copy of cpy More... | |
| template<typename Q , class S1 , class I1 > | |
| Self & | operator= (CORE_Field< Q, K, D, S1, I1 > &&cpy) |
| build an field by a copy of cpy More... | |
| template<typename Q > | |
| void | copy (const tIndex &n, const Q *vs) |
| initialize the field to the values of pointer of size n More... | |
| template<typename Q , size_t N> | |
| void | copy (const std::array< Q, N > &vs) |
| initialize the field at eche element with Vs More... | |
| template<typename Q > | |
| void | copy (const std::array< Q, D > &vs) |
| initialize the field to the values of array of size D More... | |
| template<typename Q > | |
| void | copy (const std::valarray< Q > &vs) |
| initialize the field to the values of val array More... | |
| template<typename Q > | |
| void | copy (std::valarray< Q > &&vs) |
| initialize the field to the values of val array More... | |
| template<typename Q > | |
| void | copy (const std::vector< Q > &vs) |
| initialize the field to the values of vector More... | |
| void | copy (const std::initializer_list< T > &vs) |
| initialize the field to the values of list More... | |
| void | copy (std::initializer_list< T > &&vs) |
| initialize the field to the values of list More... | |
| template<typename Q , class S1 , class I1 > | |
| void | copy (const CORE_Field< Q, K, D, S1, I1 > &cpy) |
| copy the the field More... | |
| template<typename Q , class S1 , class I1 > | |
| void | copy (CORE_Field< Q, K, D, S1, I1 > &&cpy) |
| copy the field : mv is destroyed after this More... | |
| void | initialize (const T &v) |
| initialize the field to v More... | |
| template<typename Q > | |
| void | initialize (const std::array< Q, D > &vs) |
| initialize the field to the values of array of size D More... | |
| void | setUniformRandomizeSeed (const tULLInt &seed) |
| set the uniform randomize seed More... | |
| void | setUniformRandomizeSeed () |
| set the uniform randomize seed | |
| void | uniformRandomize (const T &min, const T &max) |
| randomize the field More... | |
| Self & | operator+= (const T &v) |
| add operator More... | |
| Self & | operator-= (const T &v) |
| sub operator More... | |
| Self & | operator*= (const T &v) |
| multiplicator operator More... | |
| Self & | operator/= (const T &v) |
| divisor operator More... | |
| Self & | operator%= (const T &v) requires functions_type |
| modulo operator More... | |
| template<typename T1 , class S1 , class I1 > | |
| Self & | operator-= (const CORE_Field< T1, K, D, S1, I1 > &v) |
| array sub operator More... | |
| template<typename T1 , class S1 , class I1 > | |
| Self & | operator*= (const CORE_Field< T1, K, D, S1, I1 > &v) |
| array multiply operator More... | |
| template<typename T1 , class S1 , class I1 > | |
| Self & | operator/= (const CORE_Field< T1, K, D, S1, 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... | |
| template<typename LambdaFct > | |
| void | elementsTransform (LambdaFct &&F) |
| apply the transform element with the lambda function Xid = F(Xid) More... | |
| void | swap (CORE_Array< T, I > &a) |
| swap the contents of the array More... | |
| void | swap (CORE_Field< T, K, D, S, I > &a) |
| swap the contents of the array More... | |
| void | normalize () |
| normalize all the elements of the field return false if the method is not compatible with the floating point type | |
| template<typename Q , class S1 , class I1 > | |
| void | axpy (const Q &alpha, const CORE_Field< Q, K, D, S1, 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... | |
| template<class I1 > | |
| void | mod2 (CORE_Array< T, I1 > &X) const |
| return the norm2 array per each element More... | |
| tReal | linfNorm (tIndex &i) const |
| compute the L infinity norm More... | |
| template<typename Q , class I1 > | |
| tReal | linfDistance (const CORE_Field< Q, K, D, S, I1 > &X, tIndex &i) const |
| compute the Linfinitty norm More... | |
| void | sum (T &s) const |
| return the sum of all the elements More... | |
| void | prod (T &p) const |
| return the produc of all the elements More... | |
| template<class Q , class S1 , class I1 > | |
| T & | scalarProduct (const CORE_Field< Q, K, D, S1, I1 > &X, T &s) const |
| return the scalar product More... | |
| template<class Q , class S1 , class I1 > | |
| T & | scalarProduct (const std::valarray< Q > &weights, const CORE_Field< Q, K, D, S1, I1 > &X, T &s) const |
| return the scalar product More... | |
| void | min (T &m) const requires functions_type |
| return the min value of all the elements More... | |
| tBoolean | loadFromFile (const tString &filename, tString &comment, tInt &retCode) |
| load the field from a txt file with the format : More... | |
| virtual tString | toString () const override |
| return the string representation of the object node More... | |
Public Member Functions inherited from CORE_Collection< T, I > | |
| 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 | |
| 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... | |
| template<typename LambdaFct > | |
| void | transform (LambdaFct &&F) |
| transform the transform element with the lambda function Ti = F(Ti) More... | |
| tString | getDataTypeName () const |
| get the type of data 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 | |
| CORE_Field () | |
| instanciation method of a class | |
| virtual | ~CORE_Field () |
| destroy an instance of class | |
Protected Member Functions inherited from CORE_Collection< T, I > | |
| CORE_Collection () | |
| build an array of T* | |
| virtual | ~CORE_Collection () |
| destroy an array of T* | |
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 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... | |
this class describes an field. A field is composed by
| T | : type of element of this |
| K | : type of dimension |
| D | : dimension of each element of the array |
| S | : implemented storage class |
| I | : implemented class of this |
I is an implemented class which implements the following polymorphic methods:
|
inline |
compute This=beta.This+ alpha .X
| [in] | alpha | alpha parameter |
| [in] | X | X array |
| [in] | beta | : beta parameter |
|
inline |
return begin iterator for writing
|
inlineconstexpr |
return begin iterator for reading
|
inlineconstexpr |
return end iterator for reading
|
inline |
copy the the field
| [in] | cpy | : field to copy |
|
inline |
initialize the field to the values of array of size D
| [in] | vs | : values to copy |
|
inline |
initialize the field at eche element with Vs
| [in] | vs | : values to copy |
|
inline |
initialize the field to the values of list
| [in] | vs | : values of the field |
|
inline |
initialize the field to the values of val array
| [in] | vs | : values of the field |
|
inline |
initialize the field to the values of vector
| [in] | vs | : values of the field |
|
inline |
initialize the field to the values of pointer of size n
| [in] | n | : size of vs |
| [in] | vs | : values of the field |
|
inline |
copy the field : mv is destroyed after this
| [in] | cpy | :field to move |
|
inline |
initialize the field to the values of list
| [in] | vs | : values of the field |
|
inline |
initialize the field to the values of val array
| [in] | vs | : values of the field |
|
inlineconstexpr |
return reverse begin iterator for reading
|
inlineconstexpr |
return reverse end iterator for reading
|
inlineconstexpr |
return begin N-stride const iterator for writing
|
inlineconstexpr |
return end N-stride const iterator for writing
|
inline |
apply the transform element with the lambda function Xid = F(Xid)
| [in] | F | : lambda function with one variable |
|
inline |
return end iterator for writing
|
inline |
set the number of element of the container without erasing values
| [in] | n | : number of new elements of the container |
|
inline |
get the d-th coordinate of the i-th element for writting
| [in] | i | index of the element |
| [in] | d | d-coordinate of the element |
|
inline |
get the d-th coordinate of the i-th element for reading
| [in] | i | index of the element |
| [in] | d | d-coordinate of the element |
|
inlineoverridevirtual |
return the memory size of the included associations
Reimplemented from CORE_Object.
|
inline |
get the dimension of the field
|
inline |
return the number values of the container
|
inlineoverridevirtual |
return the memory size of the class and the memory size of all its attributes/associations
Reimplemented from CORE_Collection< T, I >.
Reimplemented in OMP_ValField< T, K, D >, OMP_PtrField< T, K, D >, CORE_StdValField< T, K, D >, CORE_StdPtrField< T, K, D >, SM_Field< T, K, D >, and SM_Field< tReal, tDimension, SM_Constants::DIM >.
|
inline |
return the number values of the container
|
inline |
get the storage
|
inline |
get the storage
|
inline |
get the values of the array
|
inline |
get the values of the array for reading
|
inline |
initialize the field to the values of array of size D
| [in] | vs | : values to copy |
|
inline |
initialize the field to v
| [in] | v | : constant value of the field |
|
inline |
return true if one value is Not A Number
|
inline |
compute the Linfinitty norm
|
inline |
compute the L infinity norm
|
inline |
load the field from a txt file with the format :
N dim v[0] v[1].... V[dim*N-1]
| [in] | filename | : the file name to load the data |
| [out] | comment | : return the comment |
| [out] | retCode | : return code : 1 : the loading has succeeded 0 : the file is not big enough -1 : no size given -2 : bad size or dimension -3 : file does not exist |
|
inline |
return the min value of all the elements
| [out] | m | : the returned min values of all the elements |
return the max value of all the elements
| [out] | m | : the returned max values of all the elements |
sort the element
| [in] | order | 'i' or 'd' |
sort the element
| [in] | order | 'i' or 'd' |
| [in] | k | the coordinates to sort |
save the field into a txt file
| [in] | fileName | the file name to save the data |
The file format is as follow:
N dim v[0] v[1] ..V[dim-1] v[dim].... ....V[dim*N-1]
save the field into a txt file
| [in] | comments | : without # |
| [in] | filename | the file name to save the data |
| [in] | nDigits | : precision for writing the data |
The file format is as follow:
N dim v[0] v[1] ..V[dim-1] v[dim].... ....V[dim*N-1]
load the field from a txt file with the format :
N dim v[0] v[1].... V[dim*N-1]
| [in] | fileName | : the file name to load the data 0 : the file is not big enough -1 : no size given -2 : bad size or dimension -3 : file does not exist |
|
inline |
return the norm2 array per each element
| [out] | X | : the vector to make the product X[i]=|Ti|^2 |
|
inline |
modulo operator
| [in] | v | modulo value |
and operator
| [in] | v | and value |
or operator
| [in] | v | and value |
complementary operator
| [in] | v | complementary value |
left shift operator
| [in] | v | left shift value |
right shift operator
| [in] | v | left shift value |
array add operator
| [in] | v | array to multiply |
|
inline |
get the i-th element for writting. Do not verify the bounds
| [in] | i | index of the element |
|
inline |
get the i-th element for reading. Do not verify the bounds
| [in] | i | index of the element |
|
inline |
get the i-th element for reading. Do not verify the bounds
| [in] | i | index of the element |
| [in] | d | : index of the coordinate of the element |
|
inline |
get the i-th element for writting. Do not verify the bounds
| [in] | i | index of the element |
| [in] | d | : index of the coordinate of the element |
|
inline |
array multiply operator
| [in] | v | array to multiply |
|
inline |
multiplicator operator
| [in] | v | multiplicator value |
|
inline |
add operator
| [in] | v | : add value |
|
inline |
array sub operator
| [in] | v | array to multiply |
|
inline |
sub operator
| [in] | v | : sub value |
|
inline |
array divisor operator
| [in] | v | array to multiply |
|
inline |
divisor operator
| [in] | v | divisor value |
|
inline |
build a field by a copy of cpy
| [in] | cpy | : field to copy |
|
inline |
build a field by a copy of cpy
| [in] | cpy | : field to copy |
|
inline |
build an field by a copy of c
| [in] | values | values to copy |
|
inline |
build an field by a copy of c
| [in] | values | values to copy |
|
inline |
build an field by a copy of c
| [in] | values | values to copy |
|
inline |
build an field by a copy of c
| [in] | values | values to copy |
|
inline |
build an field by a copy of c
| [in] | values | values to copy |
|
inline |
fill the values of the field with v
| [in] | v | : value to fill |
|
inline |
build an field by a copy of cpy
| [in] | cpy | : field to copy |
|
inline |
build an field by a copy of cpy
| [in] | cpy | : field to copy |
|
inline |
build an field by a copy of c
| [in] | values | values to copy |
|
inline |
get the i-th value for writting.
| [in] | i | index of the value |
|
inline |
get the i-th value for reading.
| [in] | i | index of the value |
|
inline |
return the produc of all the elements
| [out] | p | the returned values of the product of all the elements |
|
inline |
return reverse begin iterator for writing
|
inline |
return reverse end iterator for writing
|
inline |
set the number of values of the container
| [in] | n | : number of values of the container |
|
inline |
return begin stride iterator for writing
|
inline |
return the scalar product
| [in] | X | : argument vector |
| [out] | s | : the scalar product |
|
inline |
return the scalar product
| [in] | weights | : weight of each element |
| [in] | X | : argument field |
| [out] | s | : the scalar product |
|
inline |
return end N-stride iterator for writing
|
inline |
set the number of element of the container
| [in] | n | : number of elements of the container |
|
inline |
set the number of values of the container
| [in] | n | : number of values of the container |
|
inline |
set the uniform randomize seed
| [in] | seed | : seed; |
|
inline |
return the sum of all the elements
| [out] | s | the returned values of the sum of all the elements |
|
inline |
swap the contents of the array
| [in] | a | the array with witch the contents is swap |
|
inline |
swap the contents of the array
| [in] | a | the array with witch the contents is swap |
|
inlineoverridevirtual |
return the string representation of the object node
Reimplemented from CORE_Collection< T, I >.
|
inline |
transform the transform element with the lambda function Ti = F(Ti)
| [in] | F | : lambda function with one variable |
|
inline |
transform the transform element with the lambda function Ti = F(Xi)
| [in] | F | : lambda function with one variable |
| [in] | X | : argument of F |
|
inline |
transform the transform element with the lambda function Ti = F(Xi,Yi)
| [in] | F | : lambda function with one variable |
| [in] | X | : first argument of F |
| [in] | Y | : second argument of F |
|
inline |
randomize the field
| [in] | min | : min value of the random generation |
| [in] | max | : max value of the random generation |