Root class of the inheritance tree of abstracts. More...
#include <abstract.h>

Public Member Functions | |
| Abstract () | |
| Default Constructor. More... | |
| virtual | ~Abstract () |
| Destructor. | |
| Expr | self () |
| virtual void | print (int mode=0, std::ostream &out=std::cout, bool lib=false) const =0 |
| Displays the abstract in standard output. More... | |
| virtual void | printCode (int mode=0, std::ostream &out=std::cout) const |
| virtual void | printProp (std::ostream &fout=std::cout) const |
| void | printExplicit (int mode=0) const |
| Displays explicitely the expression, with types of each component. This function is only used for debug. More... | |
| virtual std::string | printLaTeX (int mode=0) const |
| Creates a LaTeX output for the Abstract. More... | |
| virtual std::vector< Parent > | getSubSymbols () const =0 |
| virtual LibDependency | getLibDependency () const |
| virtual size_t | memoryOverhead () const |
| virtual std::string const & | getName () const |
| Returns the Abstract's name. More... | |
| virtual std::string const & | getLatexName () const |
| virtual bool | getCommutable () const |
| Allows to know if the object commutes with all the others. More... | |
| virtual bool | getElementary () const |
| virtual bool | getAllDependencies () const |
| virtual csl::PrimaryType | getPrimaryType () const =0 |
| Gives the primary type of Abstract. More... | |
| virtual csl::Type | getType () const =0 |
| Gives the type of Abstract. More... | |
| virtual int | getDim () const |
| Gives the dimension of the object. More... | |
| virtual bool | isBuildingBlock () const |
| Tells if the expression is a Building Block or not. More... | |
| virtual int | getOrderOf (Expr_info expr) const |
| virtual bool | isArbitrary () const |
| virtual bool | isIndexed () const |
| virtual const std::vector< Equation * > & | getProperties () const |
| virtual bool | isReal () const |
| virtual bool | isPurelyImaginary () const |
| virtual bool | isComplexConjugate () const |
| virtual bool | isHermitianConjugate () const |
| virtual csl::ComplexProperty | getComplexProperty () const |
| virtual void | setComplexProperty (csl::ComplexProperty prop) |
| virtual void | setConjugated (bool t_conjugated) |
| virtual bool | isInteger () const |
| Tells if the expression is an integer. Either an Integer object directly, or a Float that has an integer value. More... | |
| virtual bool | getValued () const |
| Tells if the expression is valued, i.e. is a function of numbers and valued literals (a Variable or Constant is not valued by default). More... | |
| virtual long double | getValue () const |
| Returns the value of the expression, if it has one explicitely. In particular, it will work only on Numbers and valued Literals, not on functions. More... | |
| virtual long double | getDeltaPlus () const |
| virtual long double | getDeltaMinus () const |
| virtual long long int | getNum () const |
| virtual long long int | getDenom () const |
| virtual int | getNArgs (int axis=0) const |
| Returns the number of arguments of the expression. If the expression is a building block (AbstractBuildingBlock), this function returns 0. More... | |
| virtual size_t | size () const |
| virtual bool | empty () const |
| virtual csl::vector_expr::iterator | begin () |
| virtual csl::vector_expr::iterator | end () |
| virtual csl::vector_expr::const_iterator | begin () const |
| virtual csl::vector_expr::const_iterator | end () const |
| virtual Expr const & | getArgument (int iArg=0) const |
| virtual Expr & | getArgument (int iArg=0) |
| virtual Expr const & | getArgument (const std::vector< int > &indices) const |
| Allows to get specific arguments of expressions in multiple dimensions, by giving the indices in each dimension. More... | |
| virtual Expr & | getArgument (const std::vector< int > &indices) |
| virtual const csl::vector_expr & | getVectorArgument () const |
| Allows to get the entire std::vector of arguments of the expression. More... | |
| virtual Expr | getVariable () const |
| Accessor to the variable that defines certain types of expressions. More... | |
| virtual int | getOrder () const |
| Accessor to the order (integer) that defines certain types of expressions. More... | |
| virtual int | getSign () const |
| virtual bool | isAnOperator () const |
| Tells if the expression is an operator (like a derivetive operator). More... | |
| virtual bool | isEmpty () const |
| Tells for a Derivative or an Integral if the argument is empty i.e. if the object must apply on the next argument encountered on the right. More... | |
| virtual bool | operatorAppliesOn (Expr_info expr) const |
| virtual Expr | getOperand () const |
| Returns the operand of an Operator. More... | |
| virtual std::vector< int > | getShape () const |
| Accessor to the shape of the tensor in the form of a std::vector of integers. More... | |
| virtual Expr | getInfBoundary () const |
| virtual Expr | getSupBoundary () const |
| virtual void | setSupBoundary (Expr const &t_inf) |
| virtual void | setInfBoundary (Expr const &t_inf) |
| virtual int | getNIndices () const |
| virtual Index | getIndex (int i=0) const |
| virtual void | resetIndexStructure () |
| virtual IndexStructure | getIndexStructure () const |
| IndexStructure | getIndexStructure (csl::Space const *space) const |
| virtual const IndexStructure & | getIndexStructureView () const |
| virtual IndexStructure & | getIndexStructureView () |
| virtual IndexStructure | getFreeIndexStructure () const |
| virtual Parent | getParent () const |
| For indicial expressions this function returns a pointer to the parent object of type TensorParent (not an expression). More... | |
| virtual Parent_info | getParent_info () const |
| virtual Tensor | getPoint () const |
| virtual int | getNContractedPairs () const |
| Returns the number of contracted pairs of indices in an Indicial expression. More... | |
| virtual csl::vector_expr | getPermutations (bool optimize=true) const |
| Returns a std::vector of all possible permutations of an Indicial expression. The possible permutations are determined from the posible symmetries and anti-symmetries of the object. More... | |
| virtual std::set< std::pair< int, int > > | getContractedPair () const |
| Expr | copy () const |
| virtual unique_Expr | copy_unique () const =0 |
| virtual Expr | deepCopy () const |
| virtual Expr | refresh () const |
| virtual Expr | deepRefresh () const |
| virtual void | setName (const std::string &t_name) |
| Change the name of the abstract. More... | |
| virtual void | setCommutable (bool t_commutable) |
| Allows the abstract to commute or not. More... | |
| virtual void | addProperty (Equation *property) |
| Adds a property to the object. More... | |
| virtual void | removeProperty (Equation *property) |
| Removes a property to the object. More... | |
| virtual void | setValue (long double t_value) |
| Sets the value if there is one (for Numerical and Literal valued). | |
| virtual void | setValue (Expr const &t_value) |
| virtual void | setElementary (bool t_elementary) |
| virtual void | setAllDependencies (bool t_allDependencies) |
| virtual void | addDependency (Expr const &expr) |
| virtual void | removeDependency (Expr const &expr) |
| virtual void | setArgument (const Expr &expr, int iArg=0) |
| Sets the argument at position iArg (default=0). More... | |
| virtual void | setArgument (const Expr &expr, const std::vector< int > &indices) |
| Sets the argument at position {i,j,...} for multi-dimensions expressions. More... | |
| virtual void | setEmpty (bool t_empty) |
| virtual void | setOperand (const Expr &operand) |
| Sets the operand of an operator. More... | |
| virtual void | setOperandPrivate (const Expr &operand, bool leaveEmpty) |
| Sets the operand of an operator. More... | |
| virtual void | setVectorArgument (const csl::vector_expr &t_argument) |
| Replaced the entire std::vector of argument. More... | |
| virtual void | setVariable (Expr const &t_variable) |
| virtual void | insert (const Expr &expr, bool side=1) |
| Inserts an expression in a sum or a product. More... | |
| virtual void | setParent (const Parent &t_parent) |
| virtual std::optional< Expr > | replaceIndex (const Index &indexToReplace, const Index &newIndex, bool refresh=true) const |
| For indicial expressions, this function searches indexToContract and replaces it with newIndex. More... | |
| virtual std::optional< Expr > | replaceIndices (std::vector< Index > const &indexToReplace, std::vector< Index > const &newIndex, bool refresh=true, bool flipped=false) const |
| virtual void | replaceIndexInPlace (Index const &oldIndex, Index const &newIndex) |
| std::optional< Expr > | contractIndex (const Index &index) const |
| csl::vector_expr | breakSpace (const Space *brokenSpace, const std::vector< const Space *> &newSpace) const |
| virtual csl::vector_expr | breakSpace (const Space *brokenSpace, const std::vector< const Space *> &newSpace, const std::vector< std::string > &indexNames) const |
| virtual void | setIndexStructure (const IndexStructure &t_index) |
| Replaces the index structure of the object, that must be an Indicial expression. More... | |
| virtual void | setPoint (const Tensor &t_point) |
| virtual void | setFullySymmetric () |
| Sets an Indicial object fully symmetric. Allows to set quickly a frequent property of tensors. This function then erases all properties of symmetry / antisymmetry and sets fullySymmetric to True. | |
| virtual void | setFullyAntiSymmetric () |
| Sets an Indicial object fully anti-symmetric. Allows to set quickly a frequent property of tensors. This function then erases all properties * of symmetry / antisymmetry and sets fullyAntiSymmetric to True. | |
| virtual void | addSymmetry (int i1, int i2) |
| Add a symmetry between the i1^{th} and the i2^{th} indices. If those indices are anti-symmetric, an error is thrown. More... | |
| virtual void | addAntiSymmetry (int i1, int i2) |
| Add an anti-symmetry between the i1^{th} and the i2^{th} indices. If those indices are symmetric, an error is thrown. More... | |
| virtual int | permut (int i1, int i2) |
| Tries to permut indices at place i1 and i2. If those two indices have a symmetry property, indices are swaped and the symmetry is returned. Else the fnuction does nothing and returns 0. More... | |
| virtual Expr | getNumericalFactor () const |
| Returns the numerical factor of the expression, i.e. returns C if the expression if of the form C*x (x having a numerical factor equal to 1), and return 1 else. More... | |
| virtual int | getNFactor () const |
| virtual csl::vector_expr | getFactors () const |
| Allows to get a std::vector of all terms than could factor the expression. More... | |
| virtual std::optional< Expr > | getTerm () const |
| This function returns the same expression as *this but amputated of its numerical factor. Example: (4*cos(x) -> cos(x)). More... | |
| virtual void | getExponents (std::vector< Expr > const &factors, std::vector< Expr > &exponents) const |
| Fills in a vector the exponents corresponding to some factors for the expression. More... | |
| virtual bool | checkIndexStructure (const std::vector< Index > &t_index) const |
| Checks the compatibility of the index structure of an Indicial expression with another. In a sum, two terms must have exaclty the same index structure. More... | |
| virtual bool | checkIndexStructure (const std::initializer_list< Index > &index) const |
| Checks the compatibility of the index structure of an Indicial expression with another. In a sum, two terms must have exaclty the same index structure. More... | |
| virtual bool | compareWithDummy (Expr_info expr, std::map< Index, Index > &constraints, bool keepAllCosntraints=false) const |
| Comparison disregarding name of dummy indices, i.e. the two expressions * are equals even if dummy indices have not the same names in *this and * expr. More... | |
| bool | compareWithDummy (Expr_info expr, bool keepAllCosntraints=false) const |
| virtual int | getParity (Expr_info t_variable) const |
| Returns the parity property of the expression with respect to t_variable. More... | |
| virtual bool | askTerm (Expr_info expr, bool exact=false) const |
| Check if expr can factor *this. More... | |
| virtual bool | dependsOn (Expr_info expr) const |
| Check recursively if the expression depends on expr. More... | |
| virtual bool | dependsOn (Parent_info parent) const |
| virtual bool | dependsExplicitlyOn (Expr_info expr) const |
| Check recursively if expr is present in the expression. More... | |
| virtual bool | dependsExplicitlyOn (Parent_info parent) const |
| virtual bool | commutesWith (Expr_info expr, int sign=-1) const |
| Tells if the object commutes with expr. More... | |
| virtual std::optional< Expr > | findSubExpression (Expr_info subExpression, const Expr &newExpression) const |
| Searches a sub-expression and replaces it. More... | |
| virtual int | isPolynomial (Expr_info expr) const |
| Determines if the expression is a mononomial term in expr, i.e. a term of the form C*expr^n with C independent of expr, n integer. More... | |
| virtual bool | matchShape (Expr_info expr, bool exact=false) const |
| In the case of a vectorial-type expression, this function checks if the shape of expr matches itself. More... | |
| virtual bool | hasContractionProperty (Expr_info B) const |
| Tells (for an Indicial type) if there is a special contraction property with B. More... | |
| virtual bool | hasChainContractionProperty () const |
| virtual std::vector< ContractionChain > | getContractionProperties () const |
| virtual Expr | contraction (Expr_info B) const |
| Applies a special contraction of indices. Before calling this function we must check that there is indeed a contraction by calling the function hasContractionProperty(). More... | |
| virtual Expr | contraction (const csl::vector_expr &chain) const |
| virtual long double | evaluateScalar () const |
| Evaluates the value of the Abstract. More... | |
| virtual std::optional< Expr > | evaluate (csl::eval::mode user_mode=csl::eval::base) const =0 |
| Evaluates the Abstract. More... | |
| virtual std::optional< Expr > | derive (Expr_info expr) const |
| Calculates the derivative of the Abstract wrt another. More... | |
| virtual std::optional< Expr > | factor (bool full=false) const |
| Factors the Abstract. More... | |
| virtual std::optional< Expr > | factor (Expr_info factor, bool full=false) const |
| Factors the Abstract wrt a particular Abstract. More... | |
| virtual std::optional< Expr > | collect (std::vector< Expr > const &factors, bool full=false) const |
| Collects terms in sum according to some factors given by the user. More... | |
| virtual Expr | suppressTerm (Expr_info expr) const |
| Remove a factor from an expr, that must have been determined before. More... | |
| virtual std::optional< Expr > | suppressExponent (Expr const &factor, Expr const &exponent) const |
| Returns the expression where the factor factor^exponent has been suppressed. More... | |
| virtual std::optional< Expr > | expand (bool full=false, bool inPlace=false) const |
| Develops the Abstract. More... | |
| virtual std::optional< Expr > | expand_if (std::function< bool(Expr const &)> const &f, bool full=false, bool inPlace=false) const |
| Develops the Abstract. More... | |
| virtual std::optional< Expr > | getRealPart () const |
| Evaluates the real part of the Abstract and returns it. More... | |
| virtual Expr | getImaginaryPart () const |
| Evaluates the imaginary part of the Abstract and returns it. More... | |
| virtual std::optional< Expr > | getComplexModulus () const |
| Evaluates the modulus in the complex plane of the Abstract and returns it. More... | |
| virtual std::optional< Expr > | getComplexArgument () const |
| Evaluates the argument in the complex plane of the Abstract and returns it. More... | |
| virtual std::optional< Expr > | getComplexConjugate () const |
| Calculates and returns the complex conjugate of the expression. More... | |
| virtual Expr & | applySelfStructureOn (Expr &expr) const |
| virtual std::optional< Expr > | getTransposed (const Space *space, bool applyProp=true) const |
| virtual std::optional< Expr > | getTransposed (const std::vector< const Space *> &spaces, bool applyProp=true) const |
| virtual std::optional< Expr > | getHermitianConjugate (const Space *space) const |
| virtual std::optional< Expr > | getHermitianConjugate (const std::vector< const Space *> &spaces) const |
| virtual std::optional< Expr > | getPolynomialTerm (Expr_info t_variable, int order) const |
| Calculates and returns the polynomial term corresponding to *this with the variable t_variable at order order. In particular, this function assumes that the checks have already been made with the function isPolynomial(). More... | |
| virtual csl::vector_expr | getAlternateForms () const |
| Calculates and returns all possible alternate forms of the expression in terms of simplifications. For example 1-sin^2(x) is one of the alternate forms of cos^2(x). More... | |
| virtual Expr | applyOperator (const Expr &operand, bool leaveEmpty=false) const |
| Apply the operator on an operand, iif the expression is an operator. More... | |
| virtual Expr | addition_own (const Expr &expr) const |
| Contains implementation of special addition for Numerical- and Vectorial-types. More... | |
| virtual Expr | multiplication_own (const Expr &expr, bool side=1) const |
| Contains implementation of special multiplication for Numerical- and Vectorial-types. More... | |
| virtual Expr | division_own (const Expr &expr) const |
| Contains implementation of special division for Numerical- and Polynomial-types. For polynomial, the euclidean division of two polynomials is implemented. More... | |
| virtual Expr | exponentiation_own (const Expr &expr) const |
| Contains implementation of special exponentiation for Numerical- and Vectorial-types. More... | |
| virtual Expr | getRegularExpression () const |
| Returns a regular expression from the polynomial, that is a sum where the different powers of the variable appear explicitely. More... | |
| virtual Expr | tensordot (const Expr &expr) const |
| Returns the tensordot of two Vectorial expressions. More... | |
| virtual Expr | dot (const Expr &expr) const |
| Returns the dot product of two Vectorial expressions. More... | |
| virtual Expr | getSum () const |
| Calculates and returns the sum of all elements in the Vectorial object. More... | |
| virtual Expr | getProduct () const |
| Calculates and returns the product of all elements in the Vectorial object. More... | |
| virtual Expr | getVectorialModulus () const |
| Returns the Vectorial modulus of the Vectorial object, that is defined here as the squared root of the sum of element squared. Example: {A_{11}^2+A_{12}^2+}. More... | |
| virtual Expr | getSubVectorial (int iExcept) const |
| Allows to pick a part of a Vectorial expression, excluding the iExcept^{th} element. More... | |
| virtual Expr | getSubVectorial (int iExcept, int jExcept) const |
| Allows to pick a part of a Vectorial expression, excluding the [iExcept^{th},jExcept^{th}] element (useful for matrices). More... | |
| virtual Expr | getSubVectorial (const std::vector< int > &exceptions) const |
| Allows to pick a part of a Vectorial expression, excluding the iExcept^{th} element. More... | |
| virtual Expr | getSubVectorial (const std::vector< std::vector< int >> &keepIndices) const |
| virtual Expr | getSubVectorial (std::vector< std::vector< int >>::const_iterator begin, std::vector< std::vector< int >>::const_iterator end) const |
| virtual Expr | determinant () const |
| Returns the determinant of the object if it corresponds to a square matrix (or a scalar), 0 else. More... | |
| virtual Expr | trace () const |
| virtual Expr | trace (int axis1, int axis2) const |
| Calculates the trace over the axis axis1 and axis2 of a tensor. axis1 and axis2 can be the same, in which case the trace just corresponds to the sum over this particular axis. More... | |
| virtual Expr | transpose () const |
| Calculates and returns the transpose of a 2D matrix. More... | |
| virtual Expr | hermitian () const |
| virtual Expr | symmetrise () const |
| Calculates and returns the symmetrization of a 2D matrix. More... | |
| virtual Expr | antisymmetrise () const |
| Calculates and returns the anti-symmetrization of a 2D matrix. More... | |
| virtual Expr | inverseMatrix () const |
| Calculates and returns the inverse of a 2D square matrix. The applied method is: A^{-1} = 1/det(A)*Com(A)^T. More... | |
| virtual Expr | getCanonicalPermutation () const |
| virtual Expr | applyDiracDelta (const Expr &, const Expr &) const |
| virtual void | operator= (double t_value) |
| Equivalent to the setValue() function. More... | |
| virtual bool | operator== (int t_value) const |
| virtual bool | operator== (double t_value) const |
| virtual bool | operator!= (int t_value) const |
| virtual bool | operator!= (double t_value) const |
| virtual bool | operator== (Expr_info expr) const =0 |
| Compares the Abstract with another. More... | |
| int | testDummy (Expr_info expr) const |
| bool | operator== (const Expr_c &expr) const |
| bool | operator== (const Expr &expr) const |
| bool | operator== (const Abstract &other) const |
| bool | operator!= (Expr_info expr) const |
| bool | operator!= (const Expr_c &expr) const |
| Compares the Abstract with another. More... | |
| bool | operator!= (const Expr &expr) const |
| bool | operator!= (const Abstract &other) const |
| virtual Expr const & | operator[] (int iArg) const |
| Access operator for multi-argument expressions, equivalent to the function getArgument(). More... | |
| virtual Expr & | operator[] (int iArg) |
| Access operator for multi-argument expressions, returns a reference so this function is not const. More... | |
| virtual bool | operator< (Expr_info expr) const =0 |
| Compares the simplicity of the expression to another. More... | |
| bool | operator< (const Expr_c &expr) const |
| Compares the simplicity of the expression to another. More... | |
| bool | operator> (Expr_info expr) const |
| Compares the simplicity of the expression to another. More... | |
| bool | operator> (const Expr_c &expr) const |
| bool | operator<= (Expr_info expr) const |
| bool | operator>= (Expr_info expr) const |
| Compares the simplicity of the expression to another. More... | |
| bool | operator<= (const Expr_c &expr) const |
| Compares the simplicity of the expression to another. More... | |
| bool | operator>= (const Expr_c &expr) const |
Root class of the inheritance tree of abstracts.
Contains all functions that derived class needs. In particular all documented functions of the class Abstract are specialized in all the derived classes.
|
inline |
Default Constructor.
Initializes name empty and commutable to True.
|
virtual |
Add an anti-symmetry between the i1^{th} and the i2^{th} indices. If those indices are symmetric, an error is thrown.
| i1 | Position of the first index. |
| i2 | Position of the second index. |
Contains implementation of special addition for Numerical- and Vectorial-types.
| expr | Right operrand of the addition. |
Reimplemented in csl::Complex, csl::IntFraction, csl::Polynomial, csl::Float, csl::AbstractVectorial, csl::Integer, and csl::NumericalEval.
|
virtual |
Adds a property to the object.
| property | The new property to add in props. |
Reimplemented in csl::TensorElement, and csl::AbstractLiteral.
|
virtual |
Add a symmetry between the i1^{th} and the i2^{th} indices. If those indices are anti-symmetric, an error is thrown.
| i1 | Position of the first index. |
| i2 | Position of the second index. |
|
virtual |
Calculates and returns the anti-symmetrization of a 2D matrix.
Reimplemented in csl::Matrix, and csl::AbstractVectorial.
Apply the operator on an operand, iif the expression is an operator.
| operand | Operand of the operator. |
|
virtual |
Check if expr can factor *this.
In almost every case this corresponds just to the comparison ** *this == expr**. For Prod, Pow, Fraction types (all that are multiplicative) we must check if the factor hides in a product.
| expr | Factor to search in the expression. |
Reimplemented in csl::TensorElement, csl::Pow, csl::Prod, and csl::Sum.
|
virtual |
Reimplemented in csl::AbstractMultiFunc, and csl::AbstractVectorial.
|
virtual |
Reimplemented in csl::AbstractMultiFunc, and csl::AbstractVectorial.
|
virtual |
Checks the compatibility of the index structure of an Indicial expression with another. In a sum, two terms must have exaclty the same index structure.
| t_index | A std::vector of Index to compare. |
Reimplemented in csl::TensorElement.
|
virtual |
Checks the compatibility of the index structure of an Indicial expression with another. In a sum, two terms must have exaclty the same index structure.
| t_index | A std::initializer_list of Index to compare. |
|
virtual |
Collects terms in sum according to some factors given by the user.
This function allows the factor with some specific scalar variables. For example,
can be factored in two ways. Either with
which gives
; or with
which gives
. With the collect function it is possible to choose precisely the set of variables that will be factored to express results in a standard way.
| factors | Factors to search in the expression. |
| full | Boolean (default = false) that tells if the collection must be recursive (full expression depth). |
Reimplemented in csl::AbstractMultiFunc, csl::TDerivativeElement, csl::AbstractDuoFunc, csl::Sum, and csl::AbstractFunc.
|
virtual |
Tells if the object commutes with expr.
| expr |
Reimplemented in csl::AbstractMultiFunc, csl::AbstractDuoFunc, csl::Variable, csl::TensorFieldElement, csl::AbstractFunc, csl::ScalarField, csl::AbstractVectorial, and csl::AbstractBuildingBlock.
|
virtual |
Comparison disregarding name of dummy indices, i.e. the two expressions * are equals even if dummy indices have not the same names in *this and * expr.
| expr | Expression to compare. |
| constraints | List of existing constraints between indices (it is modified in the function). |
Reimplemented in csl::IProd, csl::ISum, csl::TensorElement, csl::TDerivativeElement, csl::VectorIntegral, csl::TensorFieldElement, csl::AbstractFunc, and csl::Scalar.
Applies a special contraction of indices. Before calling this function we must check that there is indeed a contraction by calling the function hasContractionProperty().
| B | Expression with which *this contracts. |
Reimplemented in csl::TensorElement.
|
virtual |
Check recursively if expr is present in the expression.
| expr | Expression to search. |
Reimplemented in csl::TensorElement, csl::Integral, csl::AbstractMultiFunc, csl::TDerivativeElement, csl::AbstractDuoFunc, csl::TensorFieldElement, csl::AbstractFunc, csl::AbstractIntegral, csl::AbstractVectorial, csl::AbstractField, and csl::AbstractNumerical.
|
virtual |
Check recursively if the expression depends on expr.
| expr | Expression to search. |
Reimplemented in csl::TensorElement, csl::Integral, csl::AbstractMultiFunc, csl::TDerivativeElement, csl::AbstractDuoFunc, csl::Variable, csl::TensorFieldElement, csl::AbstractFunc, csl::AbstractIntegral, csl::Constant, csl::AbstractVectorial, csl::AbstractField, and csl::AbstractNumerical.
Calculates the derivative of the Abstract wrt another.
It is possible to derive wrt any complicated expr. In this case however, the calculation is not always mathematically correct. The program just searches for equal Abstract or Abstract with the same name. In particular dx/d(exp(x))=0.
| expr | Expression wrt which we derive. |
Reimplemented in csl::DiracDelta, csl::Factorial, csl::ATanh, csl::ASinh, csl::ACosh, csl::Tanh, csl::Sinh, csl::TensorElement, csl::Cosh, csl::Angle, csl::Integral, csl::ATan, csl::Derivative, csl::ASin, csl::ACos, csl::Pow, csl::Tan, csl::Imaginary, csl::Complex, csl::Prod, csl::Sin, csl::IntFactorial, csl::IntFraction, csl::Cos, csl::Variable, csl::Log, csl::Polynomial, csl::Float, csl::Exp, csl::Constant, csl::Integer, csl::AbstractIntegral, csl::Sum, csl::Commutator, csl::NumericalEval, and csl::Abs.
|
virtual |
Returns the determinant of the object if it corresponds to a square matrix (or a scalar), 0 else.
Reimplemented in csl::Matrix.
Contains implementation of special division for Numerical- and Polynomial-types. For polynomial, the euclidean division of two polynomials is implemented.
| expr | Right operrand of the division. |
Reimplemented in csl::Complex, csl::IntFraction, csl::Polynomial, csl::Float, csl::Integer, and csl::NumericalEval.
Returns the dot product of two Vectorial expressions.
| expr | The right operand of the dot product. |
Reimplemented in csl::AbstractVectorial.
|
virtual |
Reimplemented in csl::AbstractMultiFunc, and csl::AbstractVectorial.
|
virtual |
Reimplemented in csl::AbstractMultiFunc, and csl::AbstractVectorial.
|
pure virtual |
Evaluates the Abstract.
Replaces all variables by their value and evaluating. This function must be used instead of evaluateScalar() when treating not only real scalars.* In particular (x=2, y=3) x+iy evaluates to 3+ 3i whereas evaluateScalar() would return 3.
Implemented in csl::Factorial, csl::ATanh, csl::ASinh, csl::IProd, csl::ACosh, csl::Tanh, csl::Sinh, csl::TensorElement, csl::Cosh, csl::Angle, csl::Integral, csl::ATan, csl::Derivative, csl::ASin, csl::ACos, csl::Pow, csl::Tan, csl::Imaginary, csl::Complex, csl::Sin, csl::Prod, csl::IntFactorial, csl::Cos, csl::IntFraction, csl::Variable, csl::Log, csl::Polynomial, csl::TensorFieldElement, csl::Float, csl::AbstractFunc, csl::Exp, csl::Constant, csl::AbstractIntegral, csl::ScalarField, csl::Integer, csl::Commutator, csl::Sum, csl::ImaginaryPart, csl::AbstractElement, csl::NumericalEval, csl::Arbitrary, csl::Abs, csl::AbstractVectorial, csl::RealPart, and csl::Scalar.
|
virtual |
Evaluates the value of the Abstract.
Tries to replace all variables by a real value. If it is not possible (for example treating a Vector or an Imaginary) the considered object is replaced by 0. A warning message is displayed in the case of i.
Reimplemented in csl::Factorial, csl::ATanh, csl::ASinh, csl::ACosh, csl::Tanh, csl::Sinh, csl::Cosh, csl::Angle, csl::ATan, csl::Derivative, csl::ASin, csl::ACos, csl::Pow, csl::Tan, csl::Imaginary, csl::Complex, csl::Sin, csl::Prod, csl::IntFactorial, csl::Cos, csl::IntFraction, csl::Variable, csl::Log, csl::Polynomial, csl::Float, csl::Exp, csl::Constant, csl::Integer, csl::Commutator, csl::Sum, csl::Abs, and csl::NumericalEval.
|
virtual |
Develops the Abstract.
This function concerns only products (and exponents) that will be flatten to give at the end a sum of independant terms.
| full | If true the expandment is recursive through all the Abstract. |
Reimplemented in csl::Pow, csl::AbstractMultiFunc, csl::Prod, csl::TDerivativeElement, csl::AbstractDuoFunc, csl::Exp, csl::AbstractVectorial, csl::AbstractFunc, and csl::AbstractBuildingBlock.
|
virtual |
Develops the Abstract.
This function concerns only products (and exponents) that will be flatten to give at the end a sum of independant terms.
| f | Functions that returns a boolean that determines which arguments must be expanded in products. |
| full | If true the expandment is recursive through all the Abstract. |
Reimplemented in csl::Pow, csl::AbstractMultiFunc, csl::Prod, csl::TDerivativeElement, csl::AbstractDuoFunc, csl::Exp, csl::AbstractVectorial, and csl::AbstractFunc.
Contains implementation of special exponentiation for Numerical- and Vectorial-types.
| expr | exponent. |
Reimplemented in csl::Complex, csl::IntFraction, csl::Float, csl::Integer, and csl::NumericalEval.
|
virtual |
Factors the Abstract.
This function tries to factor the Abstract wrt any factor. This will be more involved in calculation than the other factorizing function that takes the factor as a parameter. So this function must be used only if we don't know the factors we want at the end.
| full | If true the factorization is recursive through all the Abstract. |
Reimplemented in csl::ISum, csl::AbstractMultiFunc, csl::TDerivativeElement, csl::AbstractDuoFunc, csl::Polynomial, csl::AbstractVectorial, csl::Sum, csl::AbstractFunc, and csl::AbstractBuildingBlock.
Factors the Abstract wrt a particular Abstract.
| factor | Abstract wrt which we try to factor. |
| full | If true the factorization is recursive through all the Abstract. |
Reimplemented in csl::AbstractMultiFunc, csl::TDerivativeElement, csl::AbstractDuoFunc, csl::AbstractVectorial, csl::Sum, csl::AbstractFunc, and csl::AbstractBuildingBlock.
|
virtual |
Searches a sub-expression and replaces it.
| subExpression | Expression to search. |
| newExpression | Expression that replaces subExpression if it is found. |
Reimplemented in csl::AbstractMultiFunc, csl::Prod, csl::AbstractDuoFunc, csl::AbstractFunc, and csl::AbstractBuildingBlock.
|
virtual |
Calculates and returns all possible alternate forms of the expression in terms of simplifications. For example 1-sin^2(x) is one of the alternate forms of cos^2(x).
Those alternate forms are then compared in terms of simplicity, this allows automatic simplification. Alternates are tried to simplify, and the bests are chosed. More details and algorithms in file alternateForms.cpp.
Reimplemented in csl::Tanh, csl::Sinh, csl::TensorElement, csl::Cosh, csl::Pow, csl::Tan, csl::Prod, csl::Sin, csl::Cos, and csl::Sum.
|
virtual |
Reimplemented in csl::AbstractMultiFunc, csl::TDerivativeElement, csl::AbstractDuoFunc, csl::AbstractVectorial, and csl::AbstractFunc.
|
virtual |
Allows to get specific arguments of expressions in multiple dimensions, by giving the indices in each dimension.
Reimplemented in csl::AbstractVectorial.
|
virtual |
Allows to know if the object commutes with all the others.
Reimplemented in csl::AbstractMultiFunc, csl::AbstractDuoFunc, csl::Variable, csl::Constant, csl::AbstractElement, and csl::AbstractFunc.
|
virtual |
Evaluates the argument in the complex plane of the Abstract and returns it.
Reimplemented in csl::DiracDelta, csl::Tanh, csl::Sinh, csl::Cosh, csl::ASin, csl::ACos, csl::Tan, csl::Complex, csl::Imaginary, csl::AbstractMultiFunc, csl::Sin, csl::Prod, csl::Cos, csl::AbstractDuoFunc, csl::Log, csl::Exp, csl::AbstractFunc, and csl::Sum.
|
virtual |
Calculates and returns the complex conjugate of the expression.
Reimplemented in csl::TensorElement, csl::Complex, csl::AbstractMultiFunc, csl::TDerivativeElement, csl::AbstractDuoFunc, csl::ImaginaryPart, csl::AbstractFunc, csl::AbstractVectorial, csl::Complexified, and csl::RealPart.
|
virtual |
Evaluates the modulus in the complex plane of the Abstract and returns it.
Reimplemented in csl::DiracDelta, csl::Tanh, csl::Sinh, csl::Cosh, csl::ASin, csl::ACos, csl::Tan, csl::Complex, csl::Imaginary, csl::AbstractMultiFunc, csl::Sin, csl::Prod, csl::Cos, csl::AbstractDuoFunc, csl::Log, csl::Exp, csl::AbstractVectorial, csl::AbstractFunc, csl::Sum, and csl::AbstractBuildingBlock.
|
virtual |
|
virtual |
Reimplemented in csl::IntFraction.
|
virtual |
Gives the dimension of the object.
Allows to know if we are manipulating a pure scalar (i.e. that can have a real value) or something else. There is the particular case of the Imaginary i that is considered as a scalar for simplicity but in reality cannot be evaluated with a real. Example: 1 + i cannot be reduced.
Reimplemented in csl::AbstractVectorial.
|
virtual |
Fills in a vector the exponents corresponding to some factors for the expression.
For example, an expression like
will have exponents
for the set of factors
factors and exponents must of course be of the same size. Otherwise the behaviour is undefined.
can appear.
(this will return a factor 0 for
).| factors | Factors. |
| exponents | Exponents (out variable, modified during the run). |
|
virtual |
|
virtual |
|
virtual |
Evaluates the imaginary part of the Abstract and returns it.
Reimplemented in csl::DiracDelta, csl::Tanh, csl::Sinh, csl::Cosh, csl::ASin, csl::ACos, csl::Tan, csl::Complex, csl::Imaginary, csl::AbstractMultiFunc, csl::Sin, csl::Prod, csl::Cos, csl::AbstractDuoFunc, csl::Log, csl::Exp, csl::AbstractVectorial, csl::AbstractFunc, csl::Sum, and csl::Complexified.
|
virtual |
| i | Spot of the index to get. |
Reimplemented in csl::TensorElement.
|
virtual |
Reimplemented in csl::IProd, csl::ISum, csl::TensorElement, csl::TDerivativeElement, csl::VectorIntegral, csl::AbstractDuoFunc, csl::Polynomial, csl::AbstractFunc, and csl::Scalar.
|
virtual |
Returns the Abstract's name.
Reimplemented in csl::Variable, csl::Constant, csl::AbstractElement, csl::Arbitrary, and csl::AbstractVectorial.
|
virtual |
Returns the number of arguments of the expression. If the expression is a building block (AbstractBuildingBlock), this function returns 0.
Reimplemented in csl::AbstractMultiFunc, csl::AbstractDuoFunc, csl::AbstractFunc, and csl::AbstractVectorial.
|
virtual |
Returns the number of contracted pairs of indices in an Indicial expression.
|
virtual |
|
virtual |
Reimplemented in csl::TensorElement.
|
virtual |
Reimplemented in csl::IntFraction, and csl::Arbitrary.
|
virtual |
Returns the numerical factor of the expression, i.e. returns C if the expression if of the form C*x (x having a numerical factor equal to 1), and return 1 else.
Reimplemented in csl::Pow, csl::Prod, csl::Sum, and csl::AbstractNumerical.
|
virtual |
Returns the operand of an Operator.
Reimplemented in csl::Integral, csl::Derivative, csl::TDerivativeElement, csl::AbstractIntegral, csl::ImaginaryPart, and csl::RealPart.
|
virtual |
Accessor to the order (integer) that defines certain types of expressions.
Reimplemented in csl::Derivative, and csl::Polynomial.
|
virtual |
For indicial expressions this function returns a pointer to the parent object of type TensorParent (not an expression).
Reimplemented in csl::VectorIntegral, csl::Variable, csl::Constant, and csl::AbstractElement.
|
virtual |
Returns the parity property of the expression with respect to t_variable.
| t_variable. |
Reimplemented in csl::DiracDelta, csl::Factorial, csl::ATanh, csl::ASinh, csl::ACosh, csl::Tanh, csl::Sinh, csl::Cosh, csl::Angle, csl::Integral, csl::ATan, csl::Derivative, csl::ASin, csl::Pow, csl::ACos, csl::Tan, csl::Prod, csl::Sin, csl::Cos, csl::Variable, csl::Log, csl::Polynomial, csl::Exp, csl::Constant, csl::Sum, csl::Commutator, and csl::Abs.
|
virtual |
Returns a std::vector of all possible permutations of an Indicial expression. The possible permutations are determined from the posible symmetries and anti-symmetries of the object.
Reimplemented in csl::TensorElement.
Calculates and returns the polynomial term corresponding to *this with the variable t_variable at order order. In particular, this function assumes that the checks have already been made with the function isPolynomial().
| t_variable | Variable of the polynomial. Order of *this in t_variable. |
Reimplemented in csl::Pow, csl::Prod, csl::AbstractElement, and csl::AbstractBuildingBlock.
|
pure virtual |
Gives the primary type of Abstract.
In the program this function is very often called. It allows different functions to know what type of expr they are manipulating (single number, scalar function with one argument, with multiple argumments, a Vector, etc) in order to do special treatments or simplifications.
Implemented in csl::TensorElement, csl::Imaginary, csl::AbstractMultiFunc, csl::IntFactorial, csl::AbstractDuoFunc, csl::Variable, csl::TensorFieldElement, csl::Constant, csl::AbstractField, csl::AbstractVectorial, csl::Arbitrary, csl::AbstractFunc, csl::AbstractLiteral, and csl::AbstractNumerical.
|
virtual |
Calculates and returns the product of all elements in the Vectorial object.
Reimplemented in csl::AbstractVectorial.
|
virtual |
Reimplemented in csl::TensorElement, and csl::AbstractLiteral.
|
virtual |
Evaluates the real part of the Abstract and returns it.
Reimplemented in csl::DiracDelta, csl::Tanh, csl::Sinh, csl::Cosh, csl::ASin, csl::ACos, csl::Tan, csl::Complex, csl::Imaginary, csl::AbstractMultiFunc, csl::Sin, csl::Prod, csl::Cos, csl::AbstractDuoFunc, csl::Log, csl::Exp, csl::AbstractVectorial, csl::AbstractFunc, csl::Sum, csl::Complexified, and csl::AbstractBuildingBlock.
|
virtual |
Returns a regular expression from the polynomial, that is a sum where the different powers of the variable appear explicitely.
Reimplemented in csl::Polynomial.
|
virtual |
Accessor to the shape of the tensor in the form of a std::vector of integers.
Reimplemented in csl::AbstractVectorial.
|
virtual |
Reimplemented in csl::Commutator.
|
virtual |
Allows to pick a part of a Vectorial expression, excluding the iExcept^{th} element.
| iExcept | Element to ignore. |
Reimplemented in csl::Vector.
|
virtual |
Allows to pick a part of a Vectorial expression, excluding the [iExcept^{th},jExcept^{th}] element (useful for matrices).
| iExcept | Element of the first axis to ignore. |
| jExcept | Element of the second axis to ignore. |
Reimplemented in csl::Matrix.
|
virtual |
Allows to pick a part of a Vectorial expression, excluding the iExcept^{th} element.
| iExcept | Element to ignore. |
Reimplemented in csl::AbstractVectorial.
|
virtual |
Calculates and returns the sum of all elements in the Vectorial object.
Reimplemented in csl::AbstractVectorial.
|
virtual |
This function returns the same expression as *this but amputated of its numerical factor. Example: (4*cos(x) -> cos(x)).
Reimplemented in csl::Pow, csl::Prod, csl::Sum, csl::AbstractNumerical, and csl::AbstractBuildingBlock.
|
pure virtual |
Gives the type of Abstract.
In the program this function is very often called. It allows different functions to know what type of expr they are manipulating (cos, product, number, etc) in order to do special treatments or simplifications.
Implemented in csl::DiracDelta, csl::Factorial, csl::ATanh, csl::ASinh, csl::ACosh, csl::Tanh, csl::Sinh, csl::Cosh, csl::TensorElement, csl::Angle, csl::Integral, csl::ATan, csl::Derivative, csl::ASin, csl::ACos, csl::Pow, csl::Tan, csl::Imaginary, csl::Complex, csl::Sin, csl::IntFactorial, csl::AbstractMultiFunc, csl::Prod, csl::HighDTensor, csl::Cos, csl::IntFraction, csl::TDerivativeElement, csl::VectorIntegral, csl::Matrix, csl::Log, csl::Polynomial, csl::AbstractDuoFunc, csl::Variable, csl::TensorFieldElement, csl::Vector, csl::Float, csl::ScalarIntegral, csl::Exp, csl::ScalarField, csl::Commutator, csl::Constant, csl::Integer, csl::ImaginaryPart, csl::Arbitrary, csl::NumericalEval, csl::Sum, csl::Abs, csl::RealPart, and csl::Scalar.
|
virtual |
Returns the value of the expression, if it has one explicitely. In particular, it will work only on Numbers and valued Literals, not on functions.
Reimplemented in csl::IntFactorial, csl::Variable, csl::Constant, and csl::NumericalEval.
|
virtual |
Tells if the expression is valued, i.e. is a function of numbers and valued literals (a Variable or Constant is not valued by default).
Reimplemented in csl::Variable, and csl::Constant.
|
virtual |
Accessor to the variable that defines certain types of expressions.
Reimplemented in csl::Integral, csl::Derivative, csl::VectorIntegral, csl::Polynomial, and csl::ScalarIntegral.
|
virtual |
Allows to get the entire std::vector of arguments of the expression.
Reimplemented in csl::AbstractMultiFunc, and csl::AbstractVectorial.
|
virtual |
Returns the Vectorial modulus of the Vectorial object, that is defined here as the squared root of the sum of element squared. Example: {A_{11}^2+A_{12}^2+}.
Reimplemented in csl::AbstractVectorial.
|
virtual |
Tells (for an Indicial type) if there is a special contraction property with B.
| B | Expression with which we test if there is a special contraction. |
Reimplemented in csl::TensorElement.
|
virtual |
Inserts an expression in a sum or a product.
Allows to insert an element in a sum or product without comparing all existing terms. This saves time when inserting element by element. The side parameter allows to insert to the left (side = 0) or to the right (side = 1) in products (useful when considering non commutating expressions.
| expr | Expression to insert. |
| side | Side of insertion for Prod expressions. |
|
virtual |
Calculates and returns the inverse of a 2D square matrix. The applied method is: A^{-1} = 1/det(A)*Com(A)^T.
Reimplemented in csl::Matrix.
|
virtual |
Tells if the expression is an operator (like a derivetive operator).
|
virtual |
Tells if the expression is a Building Block or not.
Building blocks are derived classes that cannot contain further expressions, i.e. expressions that are the leafs of the recursive tree reprensent mathematical expressions: numerical or pure literal objects (variable, constant etc).
Reimplemented in csl::AbstractBuildingBlock.
|
virtual |
Tells for a Derivative or an Integral if the argument is empty i.e. if the object must apply on the next argument encountered on the right.
|
virtual |
Reimplemented in csl::IProd, csl::ISum, csl::TensorElement, csl::AbstractMultiFunc, csl::Prod, csl::VectorIntegral, csl::AbstractDuoFunc, csl::Polynomial, csl::TensorFieldElement, csl::AbstractFunc, csl::Sum, and csl::Scalar.
|
virtual |
Tells if the expression is an integer. Either an Integer object directly, or a Float that has an integer value.
Reimplemented in csl::Float, and csl::Integer.
|
virtual |
Determines if the expression is a mononomial term in expr, i.e. a term of the form C*expr^n with C independent of expr, n integer.
| expr | Variable of the supposed mononomial. |
Reimplemented in csl::Pow, csl::AbstractMultiFunc, csl::Prod, csl::AbstractDuoFunc, csl::AbstractFunc, and csl::AbstractElement.
|
virtual |
In the case of a vectorial-type expression, this function checks if the shape of expr matches itself.
If exact is true, the function search an exact match i.e. either the two shapes are exactly equal or one of the two objects is a scalar. If exact is false, this function only search for a possible dot product between the two expressions, and see if the last axis of *this matches the first of expr (or if one of the two objects is scalar also). Then, a product _k (*this)[i,j,...,k]*expr[k,l,m,...] is possible.
| expr | Expression of which we compare the shape. |
| exact | Boolean than specifies if we need an exact match or not. |
Reimplemented in csl::AbstractVectorial.
Contains implementation of special multiplication for Numerical- and Vectorial-types.
| expr | Right operrand of the product. |
Reimplemented in csl::Complex, csl::IntFraction, csl::Polynomial, csl::Float, csl::AbstractVectorial, csl::Integer, and csl::NumericalEval.
|
virtual |
|
virtual |
|
inline |
|
pure virtual |
Compares the simplicity of the expression to another.
| expr | Expression to compare. |
Implemented in csl::AbstractMultiFunc, csl::AbstractDuoFunc, and csl::Scalar.
|
inline |
Compares the simplicity of the expression to another.
| expr | Expression to compare. |
|
inline |
Compares the simplicity of the expression to another.
| expr | Expression to compare. |
|
virtual |
Equivalent to the setValue() function.
| t_value | The new value of the expression. |
Reimplemented in csl::IntFraction, csl::Variable, csl::Float, and csl::Constant.
|
virtual |
|
virtual |
|
pure virtual |
Compares the Abstract with another.
Here if two Abstracts have the same name, the function will return true even if they are not mathematically equal. So beware not to name different things the same way.
| expr | Abstract to compare. |
Implemented in csl::DiracDelta, csl::IProd, csl::ISum, csl::TensorElement, csl::Angle, csl::Integral, csl::Derivative, csl::Pow, csl::Imaginary, csl::Complex, csl::Prod, csl::IntFactorial, csl::TDerivativeElement, csl::IntFraction, csl::Variable, csl::VectorIntegral, csl::Polynomial, csl::Float, csl::TensorFieldElement, csl::ScalarIntegral, csl::AbstractVectorial, csl::AbstractFunc, csl::Constant, csl::Sum, csl::Integer, csl::ScalarField, csl::Commutator, csl::ImaginaryPart, csl::NumericalEval, csl::Complexified, csl::Arbitrary, csl::RealPart, and csl::Scalar.
|
inline |
Compares the simplicity of the expression to another.
| expr | Expression to compare. |
|
inline |
Compares the simplicity of the expression to another.
| expr | Expression to compare. |
|
virtual |
Access operator for multi-argument expressions, equivalent to the function getArgument().
| iArg | Index of the argument to get. |
Reimplemented in csl::AbstractMultiFunc, csl::TDerivativeElement, csl::AbstractDuoFunc, csl::AbstractVectorial, and csl::AbstractFunc.
|
virtual |
Access operator for multi-argument expressions, returns a reference so this function is not const.
| iArg | Index of the argument to get. |
Reimplemented in csl::AbstractMultiFunc, csl::TDerivativeElement, csl::AbstractDuoFunc, csl::AbstractVectorial, and csl::AbstractFunc.
|
virtual |
Tries to permut indices at place i1 and i2. If those two indices have a symmetry property, indices are swaped and the symmetry is returned. Else the fnuction does nothing and returns 0.
| i1 | Position of the first index. |
| i2 | Position of the second index. |
|
pure virtual |
Displays the abstract in standard output.
| mode | Tells if the Abstract is printed alone (default) or in another expr. |
Implemented in csl::DiracDelta, csl::Factorial, csl::ATanh, csl::ASinh, csl::ACosh, csl::Tanh, csl::Sinh, csl::TensorElement, csl::Cosh, csl::Angle, csl::Integral, csl::ATan, csl::Derivative, csl::ASin, csl::ACos, csl::Pow, csl::Tan, csl::Imaginary, csl::Complex, csl::Sin, csl::Prod, csl::IntFactorial, csl::Cos, csl::IntFraction, csl::TDerivativeElement, csl::VectorIntegral, csl::Variable, csl::Log, csl::Polynomial, csl::TensorFieldElement, csl::Float, csl::ScalarIntegral, csl::Exp, csl::Constant, csl::ScalarField, csl::Integer, csl::Commutator, csl::ImaginaryPart, csl::Sum, csl::Arbitrary, csl::NumericalEval, csl::Abs, csl::AbstractVectorial, csl::RealPart, and csl::Scalar.
| void csl::Abstract::printExplicit | ( | int | mode = 0 | ) | const |
Displays explicitely the expression, with types of each component. This function is only used for debug.
| mode | Mode of printing. |
|
virtual |
Creates a LaTeX output for the Abstract.
| mode | Tells if the Abstract is printed alone (default) or in another expr. |
Reimplemented in csl::DiracDelta, csl::Factorial, csl::ATanh, csl::ASinh, csl::ACosh, csl::Tanh, csl::Sinh, csl::TensorElement, csl::Cosh, csl::Angle, csl::Integral, csl::ATan, csl::Derivative, csl::ASin, csl::ACos, csl::Pow, csl::Tan, csl::Imaginary, csl::Complex, csl::Sin, csl::Prod, csl::IntFactorial, csl::Cos, csl::IntFraction, csl::TDerivativeElement, csl::VectorIntegral, csl::Variable, csl::Log, csl::Polynomial, csl::TensorFieldElement, csl::Float, csl::ScalarIntegral, csl::Exp, csl::Constant, csl::ScalarField, csl::Integer, csl::Commutator, csl::Sum, csl::ImaginaryPart, csl::Arbitrary, csl::NumericalEval, csl::Abs, csl::AbstractVectorial, csl::RealPart, and csl::Scalar.
|
virtual |
Removes a property to the object.
| property | Property to remove from props. |
Reimplemented in csl::TensorElement, and csl::AbstractLiteral.
|
virtual |
For indicial expressions, this function searches indexToContract and replaces it with newIndex.
| indexToContract | Index that is newly contracted. |
| newIndex | Dummy new index that replaces indexToContract in the expression. |
Reimplemented in csl::IProd, csl::ISum, csl::TensorElement, csl::AbstractMultiFunc, csl::TDerivativeElement, csl::AbstractDuoFunc, and csl::AbstractFunc.
|
virtual |
Sets the argument at position iArg (default=0).
| expr | Expression that replaces the argument. |
| iArg | the position of the argument to change. |
Reimplemented in csl::IProd, csl::AbstractMultiFunc, csl::TDerivativeElement, csl::AbstractDuoFunc, csl::AbstractVectorial, and csl::AbstractFunc.
|
virtual |
Sets the argument at position {i,j,...} for multi-dimensions expressions.
| expr | Expression that replaces the argument. |
| indices | An std::vector containing the series of indices corresponding to the argument to replace. |
Reimplemented in csl::AbstractVectorial.
|
virtual |
Allows the abstract to commute or not.
| t_commutable | Must be true if the abstract can commute. |
Reimplemented in csl::Variable, csl::Constant, and csl::AbstractElement.
|
virtual |
Replaces the index structure of the object, that must be an Indicial expression.
| t_index | A std::vector of Index which takes the place of the structure index. |
Reimplemented in csl::TensorElement, and csl::TDerivativeElement.
|
virtual |
Change the name of the abstract.
| t_name | Replaces name. |
Reimplemented in csl::Variable, csl::Constant, and csl::AbstractElement.
|
virtual |
Sets the operand of an operator.
| operand | New operand. |
Reimplemented in csl::Integral, csl::Derivative, csl::TDerivativeElement, csl::AbstractIntegral, csl::ImaginaryPart, and csl::RealPart.
|
virtual |
Sets the operand of an operator.
| operand | New operand. |
| leaveEmpty | Boolean that tells if the operator must stay empty (if true, then it will again apply later) or not (if false). |
|
virtual |
Replaced the entire std::vector of argument.
| t_argument | std::vector of expressions to copy. |
Reimplemented in csl::AbstractMultiFunc, and csl::AbstractVectorial.
|
virtual |
Returns the expression where the factor factor^exponent has been suppressed.
This function works the same manner as getExponents().
| factor | Factor to suppress. |
| exponent | Exponent of the factor to suppress. |
Remove a factor from an expr, that must have been determined before.
| factor | Expression to remove |
Reimplemented in csl::IProd, csl::Integral, csl::Pow, csl::Prod, csl::Sum, and csl::AbstractIntegral.
|
virtual |
Calculates and returns the symmetrization of a 2D matrix.
Reimplemented in csl::Matrix, and csl::AbstractVectorial.
Returns the tensordot of two Vectorial expressions.
| expr | The right operand of the tensordot |
Reimplemented in csl::AbstractVectorial.
|
virtual |
Reimplemented in csl::Matrix.
|
virtual |
Calculates the trace over the axis axis1 and axis2 of a tensor. axis1 and axis2 can be the same, in which case the trace just corresponds to the sum over this particular axis.
| axis1 | First axis to contract. |
| axis2 | Second axis to contract. |
Reimplemented in csl::AbstractVectorial.
|
virtual |
Calculates and returns the transpose of a 2D matrix.
Reimplemented in csl::Matrix.
1.8.13