68 #ifdef TENSOR_MOVE_SEMANTIC
79 const Scalar&
at(
int)
const;
91 assert ((idx(0)>=0) && (idx(0)<
ndim)) ;
int get_ndim() const
Returns the number of dimensions.
int get_size(int i) const
Returns the size of a given dimension.
Describes the tensorial basis used by the various tensors.
Class that gives the position inside a multi-dimensional Array.
The Space class is an ensemble of domains describing the whole space of the computation.
int get_ndim() const
Returns the number of dimensions.
const Scalar & operator()() const
Read only for a Scalar.
virtual Tensor & operator=(const Tensor &)
Assignment to a Tensor.
int valence
Valence of the tensor (0 = scalar, 1 = vector, etc...)
Array< int > type_indice
1D array of integers of size valence containing the type of each index: COV for a covariant one and C...
Scalar & set()
Read/write for a Scalar.
const Space & espace
The Space.
A class derived from Tensor to deal specificaly with objects of valence 1 (and so also 1-forms).
int get_index_type() const
Returns the type of the objects (CON or COV)
const Scalar & at(int) const
Readonly access to a component.
Vector(const Space &sp, FILE *ff)
Constructor from file.
Vector & operator=(const Vector &)
Assignment to another Vector.
Vector(const Vector &a)
Copy constructor.
virtual Array< int > indices(int place) const
Gives the values of the indices corresponding to a location in the array used for storage of the comp...
Scalar & set(const Array< int > &ind)
Returns the value of a component (read/write version).
void annule_hard() override
Sets the Tensor to zero (hard version ; no logical state used).
virtual int position(const Index &idx) const
Gives the location of a given component in the array used for storage (Index version).
Vector(const Tensor &a)
Constructor from a Tensor .
Vector(const Space &sp, int tipe, const Base_tensor &ba)
Standard constructor.
virtual int position(const Array< int > &idx) const
Gives the location of a given component in the array used for storage (Array version).