21 #ifndef ABSTRACT_H_INCLUDED 22 #define ABSTRACT_H_INCLUDED 34 #include <initializer_list> 62 class ContractionChain;
109 virtual void print(
int mode=0,
110 std::ostream& out=std::cout,
111 bool lib =
false)
const = 0;
113 virtual void printCode(
115 std::ostream& out=std::cout
118 static std::string regularName(std::string
const &name);
119 static std::string regularName(std::string_view name);
120 static std::string regularLiteral(std::string
const &name);
121 static std::string regularLiteral(std::string_view name);
123 virtual void printProp(std::ostream& fout = std::cout)
const;
136 virtual std::string
printLaTeX(
int mode=0)
const;
138 virtual std::vector<Parent> getSubSymbols()
const = 0;
142 virtual size_t memoryOverhead()
const;
152 virtual std::string
const &
getName()
const;
154 virtual std::string
const &getLatexName()
const;
161 virtual bool getElementary()
const;
163 virtual bool getAllDependencies()
const;
193 virtual int getDim()
const;
205 virtual int getOrderOf(
Expr_info expr)
const;
207 virtual bool isArbitrary()
const;
218 virtual bool isReal()
const;
220 virtual bool isPurelyImaginary()
const;
222 virtual bool isComplexConjugate()
const;
224 virtual bool isHermitianConjugate()
const;
230 virtual void setConjugated(
bool t_conjugated);
258 virtual long double getValue()
const;
260 virtual long double getDeltaPlus()
const;
262 virtual long double getDeltaMinus()
const;
270 virtual long long int getNum()
const;
273 virtual long long int getDenom()
const;
284 virtual int getNArgs(
int axis=0)
const;
286 virtual size_t size()
const;
288 virtual bool empty()
const;
293 virtual csl::vector_expr::iterator
begin();
298 virtual csl::vector_expr::iterator
end();
303 virtual csl::vector_expr::const_iterator
begin()
const;
308 virtual csl::vector_expr::const_iterator
end()
const;
324 virtual Expr const &
getArgument(
const std::vector<int>& indices)
const;
367 virtual bool operatorAppliesOn(
Expr_info expr)
const;
382 virtual std::vector<int>
getShape()
const;
388 virtual Expr getInfBoundary()
const;
390 virtual Expr getSupBoundary()
const;
392 virtual void setSupBoundary(
Expr const &t_inf);
394 virtual void setInfBoundary(
Expr const &t_inf);
410 virtual void resetIndexStructure();
434 virtual Tensor getPoint()
const;
463 virtual unique_Expr copy_unique()
const = 0;
465 virtual Expr deepCopy()
const;
467 virtual Expr refresh()
const;
469 virtual Expr deepRefresh()
const;
480 virtual void setName(
const std::string& t_name);
510 virtual void setValue(
long double t_value);
518 virtual void setElementary(
bool t_elementary);
520 virtual void setAllDependencies(
bool t_allDependencies);
522 virtual void addDependency(
Expr const& expr);
524 virtual void removeDependency(
Expr const& expr);
543 const std::vector<int>& indices);
545 virtual void setEmpty(
bool t_empty);
564 virtual void setVariable(
Expr const &t_variable);
579 virtual void insert(
const Expr& expr,
bool side=1);
585 virtual void setParent(
const Parent& t_parent);
596 const Index& indexToReplace,
597 const Index& newIndex,
598 bool refresh =
true)
const;
600 virtual std::optional<Expr> replaceIndices(
601 std::vector<Index>
const &indexToReplace,
602 std::vector<Index>
const &newIndex,
604 bool flipped =
false)
const;
606 virtual void replaceIndexInPlace(
607 Index const &oldIndex,
608 Index const &newIndex);
610 std::optional<Expr> contractIndex(
const Index& index)
const;
612 csl::vector_expr breakSpace(
613 const Space* brokenSpace,
614 const std::vector<const Space*>& newSpace)
const;
616 virtual csl::vector_expr breakSpace(
617 const Space* brokenSpace,
618 const std::vector<const Space*>& newSpace,
619 const std::vector<std::string>& indexNames)
const;
629 virtual void setPoint(
const Tensor& t_point);
667 virtual int permut(
int i1,
int i2);
705 virtual std::optional<Expr>
getTerm()
const;
726 std::vector<Expr>
const &factors,
727 std::vector<Expr> &exponents
764 std::map<Index,Index>& constraints,
765 bool keepAllCosntraints =
false)
const;
768 bool keepAllCosntraints =
false)
const;
827 const Expr& newExpression)
const;
860 virtual bool hasChainContractionProperty()
const;
862 virtual std::vector<ContractionChain> getContractionProperties()
const;
899 virtual std::optional<Expr>
evaluate(
900 csl::eval::mode user_mode = csl::eval::base)
const = 0;
919 virtual std::optional<Expr>
factor(
bool full=
false)
const;
925 virtual std::optional<Expr>
factor(
Expr_info factor,
bool full=
false)
const;
950 virtual std::optional<Expr>
collect(
951 std::vector<Expr>
const &factors,
988 virtual std::optional<Expr>
expand(
bool full=
false,
989 bool inPlace=
false)
const;
1000 std::function<
bool(
Expr const&)>
const& f,
1002 bool inPlace=
false)
const;
1031 virtual Expr& applySelfStructureOn(
Expr& expr)
const;
1033 virtual std::optional<Expr> getTransposed(
1035 bool applyProp =
true)
const;
1037 virtual std::optional<Expr> getTransposed(
1038 const std::vector<const Space*>& spaces,
1039 bool applyProp =
true)
const;
1041 virtual std::optional<Expr> getHermitianConjugate(
1042 const Space* space)
const;
1044 virtual std::optional<Expr> getHermitianConjugate(
1045 const std::vector<const Space*>& spaces)
const;
1076 bool leaveEmpty=
false)
const;
1188 const std::vector<std::vector<int>>& keepIndices)
const;
1191 std::vector<std::vector<int>>::const_iterator begin,
1192 std::vector<std::vector<int>>::const_iterator end)
const;
1214 virtual Expr trace(
int axis1,
int axis2)
const;
1221 virtual Expr hermitian()
const;
1244 virtual Expr getCanonicalPermutation()
const;
1250 virtual Expr applyDiracDelta(
const Expr&,
const Expr&)
const;
1269 virtual bool operator==(
double t_value)
const;
1277 virtual bool operator!=(
double t_value)
const;
1337 return *
this < expr.get();
1346 return *expr <
this;
1350 return *expr <
this;
1354 return (not this->
operator>(expr));
1363 return (not this->
operator<(expr));
1399 const Expr& leftOperand,
1400 const Expr& rightOperand,
1401 bool explicitSum =
false);
1411 Expr sum_s(
const csl::vector_expr& operands,
bool explicitSum =
false);
1449 Expr prod_s(
const csl::vector_expr& operands,
bool explicitProd=
false);
1486 Expr sqrt_s(
int number);
1505 Expr integral_s(
const Expr& leftOperand,
const Expr& rightOperand);
1506 Expr integral_s(
const Expr& leftOperand,
const Expr& rightOperand,
bool empty);
1507 Expr integral_s(
const Expr& leftOperand,
const Expr& rightOperand,
bool empty,
1508 const Expr& t_inf,
const Expr& t_sup);
1509 Expr integral_s(
const Expr& variable);
1512 Expr polynomial_s(
const Expr& expr,
const Expr& t_variable);
1514 Expr polynomial_s(
const csl::vector_expr& operands,
const Expr& t_variable);
1580 Expr (
long int value);
1581 Expr (
long long int value);
1582 Expr (
unsigned int value);
1583 Expr (
unsigned long int value);
1584 Expr (
unsigned long long int value);
1587 Expr (
double value);
1588 Expr (
long double value);
1595 inline csl::vector_expr::iterator
begin() {
1596 return (**this).begin();
1598 inline csl::vector_expr::iterator
end() {
1599 return (**this).end();
1601 inline csl::vector_expr::const_iterator
begin()
const {
1602 return (**this).begin();
1604 inline csl::vector_expr::const_iterator
end()
const {
1605 return (**this).end();
1608 template<
class Index>
1610 return (**
this)[std::forward<Index>(index)];
1613 template<
class Index>
1615 return (**
this)[std::forward<Index>(index)];
1618 Expr& operator+=(
Expr const &other) {
1619 return (*
this = *
this + other);
1622 Expr& operator-=(
Expr const &other) {
1623 return (*
this = *
this - other);
1626 Expr& operator*=(
Expr const &other) {
1627 return (*
this = *
this * other);
1630 Expr& operator/=(
Expr const &other) {
1631 return (*
this = *
this / other);
1635 DEFINE_SHARED_PTR_OPERATOR(
Expr)
1637 std::ostream& operator<<(std::ostream& fout,
const Expr& obj);
1681 inline Expr Abstract::copy()
const 1683 return copy_unique();
1687 return *
this == expr.get();
1691 return *
this == expr.get();
1695 return *
this == other.copy();
1699 return not (*
this == expr);
1708 return *
this != expr.get();
1712 return *
this != expr.get();
1716 return *
this != other.copy();
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 in...
Definition: abstract.cpp:940
virtual Expr addition_own(const Expr &expr) const
Contains implementation of special addition for Numerical- and Vectorial-types.
Definition: abstract.cpp:878
bool operator>(Expr_info expr) const
Compares the simplicity of the expression to another.
Definition: abstract.h:1345
virtual Expr const & operator[](int iArg) const
Access operator for multi-argument expressions, equivalent to the function getArgument().
Definition: abstract.cpp:1004
virtual ~Abstract()
Destructor.
Definition: abstract.h:96
virtual bool commutesWith(Expr_info expr, int sign=-1) const
Tells if the object commutes with expr.
Definition: abstract.cpp:926
virtual IndexStructure getFreeIndexStructure() const
Definition: abstract.cpp:254
virtual bool isIndexed() const
Definition: abstract.cpp:531
Expr prod_s(const Expr &leftOperand, const Expr &rightOperand, bool explicitProd=0)
Returns the product of the two operands, applying basic simplifications.
Definition: operations.cpp:2246
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. ...
Definition: abstract.cpp:609
virtual bool getValued() const
Tells if the expression is valued, i.e. is a function of numbers and valued literals (a Variable or C...
Definition: abstract.cpp:180
virtual bool operator<(Expr_info expr) const =0
Compares the simplicity of the expression to another.
virtual Parent getParent() const
For indicial expressions this function returns a pointer to the parent object of type TensorParent (n...
Definition: abstract.cpp:259
Namespace for csl library.
Definition: abreviation.h:34
virtual std::optional< Expr > suppressExponent(Expr const &factor, Expr const &exponent) const
Returns the expression where the factor factor^exponent has been suppressed.
Definition: abstract.cpp:784
virtual std::optional< Expr > getComplexModulus() const
Evaluates the modulus in the complex plane of the Abstract and returns it.
Definition: abstract.cpp:672
virtual csl::PrimaryType getPrimaryType() const =0
Gives the primary type of Abstract.
bool operator &=(const Expr &a, const Expr &b)
see Abstract::operator&=()
Index object that is used for indicial objects.
Definition: index.h:75
virtual IndexStructure getIndexStructure() const
Definition: abstract.cpp:222
virtual std::string const & getName() const
Returns the Abstract's name.
Definition: abstract.cpp:37
virtual Expr inverseMatrix() const
Calculates and returns the inverse of a 2D square matrix. The applied method is: A^{-1} = 1/det(A)*Co...
Definition: abstract.cpp:1194
virtual void setFullySymmetric()
Sets an Indicial object fully symmetric. Allows to set quickly a frequent property of tensors...
Definition: abstract.cpp:384
virtual long double getValue() const
Returns the value of the expression, if it has one explicitely. In particular, it will work only on N...
Definition: abstract.cpp:572
virtual Expr getNumericalFactor() const
Returns the numerical factor of the expression, i.e. returns C if the expression if of the form C*x (...
Definition: abstract.cpp:589
bool operator<=(const Expr &a, const Expr &b)
see Abstract::operator<=()
Definition: abstract.cpp:1416
virtual bool askTerm(Expr_info expr, bool exact=false) const
Check if expr can factor *this.
Definition: abstract.cpp:741
Type
Enum of the different types of Abstract (i.e. list of all possible specializations).
Definition: enum.h:47
virtual std::optional< Expr > expand(bool full=false, bool inPlace=false) const
Develops the Abstract.
Definition: abstract.cpp:746
virtual Expr getProduct() const
Calculates and returns the product of all elements in the Vectorial object.
Definition: abstract.cpp:1089
virtual long double evaluateScalar() const
Evaluates the value of the Abstract.
Definition: abstract.cpp:871
virtual Expr transpose() const
Calculates and returns the transpose of a 2D matrix.
Definition: abstract.cpp:1166
virtual int getOrder() const
Accessor to the order (integer) that defines certain types of expressions.
Definition: abstract.cpp:621
virtual std::set< std::pair< int, int > > getContractedPair() const
Definition: abstract.cpp:429
virtual void print(int mode=0, std::ostream &out=std::cout, bool lib=false) const =0
Displays the abstract in standard output.
Expr operator+(const Expr &a, const Expr &b)
Shortcut function that allows to use arithmetic operator + with Expr (== shared_ptr<Abstract>).
Definition: abstract.cpp:1298
bool operator|=(const Expr &a, const Expr &b)
see Abstract::operator|=()
virtual Expr suppressTerm(Expr_info expr) const
Remove a factor from an expr, that must have been determined before.
Definition: abstract.cpp:779
virtual int getParity(Expr_info t_variable) const
Returns the parity property of the expression with respect to t_variable.
Definition: abstract.cpp:960
virtual Expr getRegularExpression() const
Returns a regular expression from the polynomial, that is a sum where the different powers of the var...
Definition: abstract.cpp:965
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.
Definition: abstract.cpp:415
virtual long long int getNum() const
Definition: abstract.cpp:187
virtual std::vector< int > getShape() const
Accessor to the shape of the tensor in the form of a std::vector of integers.
Definition: abstract.cpp:436
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.
Definition: abstract.cpp:766
Definition: alloc_monitor.h:70
virtual Expr dot(const Expr &expr) const
Returns the dot product of two Vectorial expressions.
Definition: abstract.cpp:1075
Abstract()
Default Constructor.
Definition: abstract.h:92
virtual Expr trace() const
Definition: abstract.cpp:1152
virtual std::optional< Expr > expand_if(std::function< bool(Expr const &)> const &f, bool full=false, bool inPlace=false) const
Develops the Abstract.
Definition: abstract.cpp:750
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...
Definition: abstract.cpp:280
virtual Expr exponentiation_own(const Expr &expr) const
Contains implementation of special exponentiation for Numerical- and Vectorial-types.
Definition: abstract.cpp:899
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.
virtual bool hasContractionProperty(Expr_info B) const
Tells (for an Indicial type) if there is a special contraction property with B.
Definition: abstract.cpp:1037
virtual csl::vector_expr::iterator end()
Definition: abstract.cpp:468
virtual const std::vector< Equation * > & getProperties() const
Definition: abstract.cpp:87
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...
Definition: abstract.cpp:402
bool operator<(const Expr_c &expr) const
Compares the simplicity of the expression to another.
Definition: abstract.h:1336
File containing functions that are called by the program when something wrong happened: determines th...
virtual std::optional< Expr > getComplexArgument() const
Evaluates the argument in the complex plane of the Abstract and returns it.
Definition: abstract.cpp:677
virtual Index getIndex(int i=0) const
Definition: abstract.cpp:210
virtual std::optional< Expr > factor(bool full=false) const
Factors the Abstract.
Definition: abstract.cpp:757
virtual void operator=(double t_value)
Equivalent to the setValue() function.
Definition: abstract.cpp:972
bool operator>=(Expr_info expr) const
Compares the simplicity of the expression to another.
Definition: abstract.h:1362
Definition: diagonalization.h:34
virtual void setArgument(const Expr &expr, int iArg=0)
Sets the argument at position iArg (default=0).
Definition: abstract.cpp:830
Some of csl enumerations.
virtual void removeProperty(Equation *property)
Removes a property to the object.
Definition: abstract.cpp:378
ComplexProperty
Contains all possible complex properties of objects. Real, purely imaginary, or complex.
Definition: enum.h:127
virtual long long int getDenom() const
Definition: abstract.cpp:192
Definition: librarydependency.h:33
Expr fraction_s(const Expr &leftOperand, const Expr &rightOperand)
Returns the fraction of the two operands, applying basic simplifications.
Definition: operations.cpp:2393
virtual bool operator==(int t_value) const
Definition: abstract.cpp:988
virtual Expr tensordot(const Expr &expr) const
Returns the tensordot of two Vectorial expressions.
Definition: abstract.cpp:1068
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.
Definition: abstract.cpp:396
virtual std::optional< Expr > getRealPart() const
Evaluates the real part of the Abstract and returns it.
Definition: abstract.cpp:662
virtual void setValue(long double t_value)
Sets the value if there is one (for Numerical and Literal valued).
Definition: abstract.cpp:794
PrimaryType
Stores enumerations of types for Abstract objects.
Definition: enum.h:31
virtual int getNIndices() const
Definition: abstract.cpp:203
virtual csl::vector_expr getAlternateForms() const
Calculates and returns all possible alternate forms of the expression in terms of simplifications...
Definition: abstract.cpp:1017
void printExplicit(int mode=0) const
Displays explicitely the expression, with types of each component. This function is only used for deb...
Definition: abstract.cpp:154
virtual void setCommutable(bool t_commutable)
Allows the abstract to commute or not.
Definition: abstract.cpp:62
Expr pow_s(const Expr &leftOperand, const Expr &rightOperand)
Returns the exponentiation of the two operands, applying basic simplifications.
Definition: operations.cpp:2978
Expr minus_(const Expr &leftOperand, const Expr &rightOperand)
Returns the sum of the two operands (with a minus sign), applying basic simplifications.
Definition: operations.cpp:1030
virtual void setFullyAntiSymmetric()
Sets an Indicial object fully anti-symmetric. Allows to set quickly a frequent property of tensors...
Definition: abstract.cpp:390
virtual int getNContractedPairs() const
Returns the number of contracted pairs of indices in an Indicial expression.
Definition: abstract.cpp:408
Root class of the inheritance tree of abstracts.
Definition: abstract.h:76
virtual void setVectorArgument(const csl::vector_expr &t_argument)
Replaced the entire std::vector of argument.
Definition: abstract.cpp:859
virtual csl::vector_expr getFactors() const
Allows to get a std::vector of all terms than could factor the expression.
Definition: abstract.cpp:599
Expr operator/(const Expr &a, const Expr &b)
Shortcut function that allows to use arithmetic operator / with Expr (== shared_ptr<Abstract>).
Definition: abstract.cpp:1372
virtual int getNArgs(int axis=0) const
Returns the number of arguments of the expression. If the expression is a building block (AbstractBui...
Definition: abstract.cpp:197
Expr operator*(const Expr &a, const Expr &b)
Shortcut function that allows to use arithmetic operator * with Expr (== shared_ptr<Abstract>).
Definition: abstract.cpp:1351
virtual std::optional< Expr > findSubExpression(Expr_info subExpression, const Expr &newExpression) const
Searches a sub-expression and replaces it.
Definition: abstract.cpp:931
virtual void addProperty(Equation *property)
Adds a property to the object.
Definition: abstract.cpp:372
virtual Expr getSum() const
Calculates and returns the sum of all elements in the Vectorial object.
Definition: abstract.cpp:1082
virtual bool isBuildingBlock() const
Tells if the expression is a Building Block or not.
Definition: abstract.cpp:519
virtual Expr contraction(Expr_info B) const
Applies a special contraction of indices. Before calling this function we must check that there is in...
Definition: abstract.cpp:1054
Vector space that has a name, a dimension, a delta tensor and possibly a non-trivial metric...
Definition: space.h:64
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 in...
Base class for all parents (indicial, fields etc). All parents derive from this class.
Definition: parent.h:81
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 n...
Definition: abstract.cpp:640
Contains evaluation flags for csl.
virtual bool dependsExplicitlyOn(Expr_info expr) const
Check recursively if expr is present in the expression.
Definition: abstract.cpp:916
virtual Expr symmetrise() const
Calculates and returns the symmetrization of a 2D matrix.
Definition: abstract.cpp:1180
virtual Expr const & getArgument(int iArg=0) const
Definition: abstract.cpp:489
virtual bool isInteger() const
Tells if the expression is an integer. Either an Integer object directly, or a Float that has an inte...
Definition: abstract.cpp:568
virtual void setName(const std::string &t_name)
Change the name of the abstract.
Definition: abstract.cpp:57
virtual Expr multiplication_own(const Expr &expr, bool side=1) const
Contains implementation of special multiplication for Numerical- and Vectorial-types.
Definition: abstract.cpp:885
virtual bool getCommutable() const
Allows to know if the object commutes with all the others.
Definition: abstract.cpp:47
virtual int getNFactor() const
Definition: abstract.cpp:594
virtual int getSign() const
Definition: abstract.cpp:628
virtual bool dependsOn(Expr_info expr) const
Check recursively if the expression depends on expr.
Definition: abstract.cpp:906
virtual Expr determinant() const
Returns the determinant of the object if it corresponds to a square matrix (or a scalar), 0 else.
Definition: abstract.cpp:1145
virtual void setOperandPrivate(const Expr &operand, bool leaveEmpty)
Sets the operand of an operator.
Definition: abstract.cpp:848
Expr derivative_s(const Expr &leftOperand, const Expr &rightOperand, int order=1)
Returns the derivative of leftOperand wrt rightOperand, applying basic simplifications.
Definition: operations.cpp:3784
virtual Expr getSubVectorial(int iExcept) const
Allows to pick a part of a Vectorial expression, excluding the iExcept^{th} element.
Definition: abstract.cpp:1103
virtual Expr getImaginaryPart() const
Evaluates the imaginary part of the Abstract and returns it.
Definition: abstract.cpp:667
virtual int getDim() const
Gives the dimension of the object.
Definition: abstract.cpp:68
virtual Expr antisymmetrise() const
Calculates and returns the anti-symmetrization of a 2D matrix.
Definition: abstract.cpp:1187
virtual std::string printLaTeX(int mode=0) const
Creates a LaTeX output for the Abstract.
Definition: abstract.cpp:168
virtual Expr applyOperator(const Expr &operand, bool leaveEmpty=false) const
Apply the operator on an operand, iif the expression is an operator.
Definition: abstract.cpp:1022
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 ord...
Definition: abstract.cpp:950
Definition: equation.h:43
virtual bool operator!=(int t_value) const
Definition: abstract.cpp:978
virtual Expr getVariable() const
Accessor to the variable that defines certain types of expressions.
Definition: abstract.cpp:945
virtual csl::Type getType() const =0
Gives the type of Abstract.
virtual std::optional< Expr > getTerm() const
This function returns the same expression as *this but amputated of its numerical factor...
Definition: abstract.cpp:604
virtual void setOperand(const Expr &operand)
Sets the operand of an operator.
Definition: abstract.cpp:854
virtual csl::vector_expr getPermutations(bool optimize=true) const
Returns a std::vector of all possible permutations of an Indicial expression. The possible permutatio...
Definition: abstract.cpp:422
virtual Expr division_own(const Expr &expr) const
Contains implementation of special division for Numerical- and Polynomial-types. For polynomial...
Definition: abstract.cpp:892
virtual csl::vector_expr::iterator begin()
Definition: abstract.cpp:461
Definition: indicial.h:675
Manages a std::vector of Index, to be used by an TensorElement.
Definition: index.h:472
virtual bool isAnOperator() const
Tells if the expression is an operator (like a derivetive operator).
Definition: abstract.cpp:635
virtual std::optional< Expr > evaluate(csl::eval::mode user_mode=csl::eval::base) const =0
Evaluates the Abstract.
virtual std::optional< Expr > derive(Expr_info expr) const
Calculates the derivative of the Abstract wrt another.
Definition: abstract.cpp:774
virtual std::optional< Expr > getComplexConjugate() const
Calculates and returns the complex conjugate of the expression.
Definition: abstract.cpp:682
bool operator<=(const Expr_c &expr) const
Compares the simplicity of the expression to another.
Definition: abstract.h:1371
virtual void setIndexStructure(const IndexStructure &t_index)
Replaces the index structure of the object, that must be an Indicial expression.
Definition: abstract.cpp:331
virtual void insert(const Expr &expr, bool side=1)
Inserts an expression in a sum or a product.
Definition: abstract.cpp:735
virtual Expr getVectorialModulus() const
Returns the Vectorial modulus of the Vectorial object, that is defined here as the squared root of th...
Definition: abstract.cpp:1096
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...
Definition: abstract.cpp:1030
Expression type/.
Definition: abstract.h:1573
virtual const csl::vector_expr & getVectorArgument() const
Allows to get the entire std::vector of arguments of the expression.
Definition: abstract.cpp:441
virtual Expr getOperand() const
Returns the operand of an Operator.
Definition: abstract.cpp:654