Namespace for csl library. More...
Data Structures | |
| class | Abbrev |
| class | Abbreviation |
| class | Abs |
| Final specialization of AbstractFunc, the abs function. More... | |
| class | Abstract |
| Root class of the inheritance tree of abstracts. More... | |
| class | AbstractBuildingBlock |
| Abstract class from which derive all building blocks of exprs, i.e. objects not function of further exprs: the leafs of the recursive tree. More... | |
| class | AbstractDuoFunc |
| Handle functions of multiple arguments. In the case of the call of a simplification function, if recursive, the function will be first applied on all the arguments, then to the function itself. More... | |
| class | AbstractElement |
| Base class for all elements. Objects that are constructed by a parent (see AbstractParent) when the user give it what is needed to create the element (indices, space-time point etc). More... | |
| class | AbstractField |
| class | AbstractFunc |
| Base class for scalar functions of one argument. More... | |
| class | AbstractIntegral |
| class | AbstractLiteral |
| Abstract class from which derive literal building blocks: Constant, Variable, Imaginary and IntFactorial. More... | |
| class | AbstractMultiFunc |
| Handle functions of multiple arguments. In the case of the call of a simplification function, if recursive, the function will be first applied on all the arguments, then to the function itself. More... | |
| class | AbstractNumerical |
| Abstract class from which derive numerical types, i.e. Float, Integer, IntFraction. More... | |
| class | AbstractParent |
| Base class for all parents (indicial, fields etc). All parents derive from this class. More... | |
| class | AbstractVectorial |
| class | ACos |
| Final specialization of AbstractFunc, the acos function. More... | |
| class | ACosh |
| Final specialization of AbstractFunc, the acosh function. More... | |
| class | Angle |
| Handles a angle of 2 arguments. More... | |
| class | Arbitrary |
| Arbitrary object that can enter mathematical expressions. More... | |
| class | ASin |
| Final specialization of AbstractFunc, the asin function. More... | |
| class | ASinh |
| Final specialization of AbstractFunc, the asinh function. More... | |
| class | ATan |
| Final specialization of AbstractFunc, the atan function. More... | |
| class | ATanh |
| Final specialization of AbstractFunc, the atanh function. More... | |
| struct | canDecay |
| class | Commutator |
| Object that represents a commutator or an anti-commutator, thus is derived from AbstractDuoFunc that handles two arguments -> [A,B]. More... | |
| class | Comparator |
| Bunch of functions that allow to do comparisons with Arbitrary expressions or expressions with dummy objects (summed indices or variables). This is a static class, in the sense that all methods and attributes are static i.e. independant of any isntance of the class. There is then no Comparator object constructed, the class just allows to centralize all variables and functions useful for those comparisons. More... | |
| class | Complex |
| class | Complexified |
| class | Constant |
| Handle an object with a name and a value. More... | |
| class | ConstantParent |
| class | ContractionChain |
| class | Cos |
| Final specialization of AbstractFunc, the cos function. More... | |
| class | Cosh |
| Final specialization of AbstractFunc, the cosh function. More... | |
| class | DeltaParent |
| Specialization of TensorParent for a kronecker delta. More... | |
| class | Derivative |
| Handles the exponentiation of one Abstract wrt another. More... | |
| class | Diagonalizer |
| class | DiracDelta |
| class | EpsilonParent |
| Specialization of TensorParent for a kronecker delta. More... | |
| class | Equation |
| class | Exp |
| Final specialization of AbstractFunc, the exponential function. More... | |
| struct | ExpansionChain |
| class | Expr |
| Expression type/. More... | |
| class | Factorial |
| Final specialization of AbstractFunc, the factorial function. More... | |
| class | FieldParent |
| class | Float |
| Handle numbers in expr. More... | |
| class | float_sap |
| class | float_sap< 0 > |
| class | float_sap< 1 > |
| class | format |
| class | Formatter |
| class | Functional |
| class | HighDTensor |
| class | Imaginary |
| Numerical representation of i. More... | |
| class | ImaginaryPart |
| class | Index |
| Index object that is used for indicial objects. More... | |
| class | IndexedSymmetry |
| class | IndexStructure |
| Manages a std::vector of Index, to be used by an TensorElement. More... | |
| class | IndexStructure_new |
| class | IndexStructureView |
| class | IndicialEquation |
| class | InitSanitizer |
| Encapsulates a value of a given to ensure that it initialized when used. More... | |
| class | int_ap |
| class | int_ap< 0 > |
| class | int_ap< 1 > |
| class | Integer |
| Handle numbers in expr. More... | |
| class | Integral |
| class | IntFactorial |
| Handles factorial of a Number. More... | |
| class | IntFraction |
| Handles fractions of Number. More... | |
| class | IProd |
| Specialization of a Prod object to handle TensorElement objects in the product (apply contraction of indices etc). More... | |
| class | ISum |
| Specialization of a Prod object to handle TensorElement objects in the product (apply contraction of indices etc). More... | |
| class | LibDependency |
| class | LibEval |
| class | LibEvalSession |
| class | LibFunction |
| struct | LibParameter |
| class | LibraryExpander |
| class | LibraryGenerator |
| class | LibraryGroup |
| class | linear_map |
| class | LiteralParent |
| class | Lock |
| Static class allowing to compress expressions given a boolean predicate. More... | |
| class | Log |
| Final specialization of AbstractFunc, the logarithm function. More... | |
| class | Matrix |
| class | MetricParent |
| Specialization of TensorParent for a matric object (two indices symmetric etc). An object of type Space initializated with a metric will automatically have signed indices. More... | |
| class | MultiPermutation |
| class | NumericalEval |
| class | ObjectPermutation |
| class | ObjectSymmetry |
| class | Operator |
| Linear operator O(a*X+b*Y) = a*O(X) + b*O(Y) More... | |
| class | OptionalCondition |
| class | Parent |
| class | Permutation |
| Handles a std::vector of integers that represents the permutation of n indices, with a possible symmetry of an IndexStructure. More... | |
| class | Polynomial |
| Handles a polynomial, function of multiple arguments. More... | |
| class | Pow |
| Handles the exponentiation of one Abstract wrt another. More... | |
| class | Prod |
| Handles a product, function of multiple arguments. More... | |
| class | ProgressBar |
| class | PropertyList |
| class | PseudoIntegral |
| class | RealPart |
| class | Scalar |
| class | ScalarField |
| class | ScalarFieldParent |
| class | ScalarIntegral |
| class | ScopedProperty |
| class | SelfContraction |
| Small class that allows to handle contractions of indices between tensors. More... | |
| class | Sin |
| Final specialization of AbstractFunc, the sin function. More... | |
| class | Sinh |
| Final specialization of AbstractFunc, the sinh function. More... | |
| class | Space |
| Vector space that has a name, a dimension, a delta tensor and possibly a non-trivial metric. If a metric is given, the indices in this space are signed, i.e. their up- or down- position matter in expressions. More... | |
| struct | Structure |
| class | Sum |
| Handles a sum, function of multiple arguments. More... | |
| class | Symmetry |
| Handles the full symmetry properties of an TensorElement, i.e. a vector of Permutation objects, each giving a permutation of the indices and the sign of the permutation (if the permutation is symmetric or anti-symmetric). More... | |
| class | Tan |
| Final specialization of AbstractFunc, the tan function. More... | |
| class | Tanh |
| Final specialization of AbstractFunc, the tanh function. More... | |
| class | TDerivative |
| class | TDerivativeElement |
| class | TDerivativeParent |
| class | Tensor |
| class | TensorElement |
| Specialization of Abstract for Indicial tensor. Building block carrying indices, and respecting Einstein's summation convention. More... | |
| class | TensorField |
| class | TensorFieldElement |
| class | TensorFieldParent |
| class | TensorParent |
| Parent of an indicial object, allows to generate them (TensorElement). More... | |
| class | TimeMonitor |
| class | Timer |
| class | Variable |
| Handle an object with a name and a value. More... | |
| class | VariableParent |
| class | Vector |
| class | VectorIntegral |
Typedefs | |
| template<class T > | |
| using | allocator = std::allocator< T > |
| using | ExpanderEmitter = std::function< bool(csl::Expr const &)> |
| using | ExpanderReceiver = std::function< bool(csl::Expr const &, csl::Expr const &)> |
| using | replacementRule = std::function< std::optional< csl::Expr >(csl::Expr const &, bool)> |
| Replacement rule prototype. More... | |
| typedef const csl::Abstract * | Expr_info |
| typedef std::shared_ptr< const csl::Abstract > | Expr_c |
| typedef std::unique_ptr< csl::Abstract > | unique_Expr |
| typedef std::unique_ptr< const csl::Abstract > | unique_Expr_c |
| typedef std::weak_ptr< csl::Abstract > | weak_Expr |
| typedef std::weak_ptr< const csl::Abstract > | weak_Expr_c |
| typedef const csl::AbstractParent * | Parent_info |
| typedef const csl::TensorParent * | IParent_info |
| using | Vector_alloc = std::allocator< Expr > |
| using | vector_expr = std::vector< Expr > |
| using | FactorType = std::pair< csl::Expr, std::vector< size_t > > |
| using | iterator = std::vector< Expr >::iterator |
Functions | |
| Expr | sum_s (const Expr &leftOperand, const Expr &rightOperand, bool explicitSum=false) |
| Expr | sum_s (const csl::vector_expr &operands, bool explicitSum=false) |
| Expr | minus_ (const Expr &leftOperand, const Expr &rightOperand) |
| Returns the sum of the two operands (with a minus sign), applying basic simplifications. More... | |
| Expr | prod_s (const Expr &leftOperand, const Expr &rightOperand, bool explicitProd=0) |
| Returns the product of the two operands, applying basic simplifications. More... | |
| Expr | prod_s (const csl::vector_expr &operands, bool explicitProd=false) |
| Expr | fraction_s (const Expr &leftOperand, const Expr &rightOperand) |
| Returns the fraction of the two operands, applying basic simplifications. More... | |
| Expr | pow_s (const Expr &leftOperand, const Expr &rightOperand) |
| Returns the exponentiation of the two operands, applying basic simplifications. More... | |
| Expr | pow_s (const Expr &leftOperand, int value) |
| Expr | sqrt_s (const Expr &operand) |
| Expr | sqrt_s (int number) |
| Expr | derivative_s (const Expr &leftOperand, const Expr &rightOperand, int order=1) |
| Returns the derivative of leftOperand wrt rightOperand, applying basic simplifications. More... | |
| Expr | derivative_s (const Expr &leftOperand, const Expr &rightOperand, int order, bool empty) |
| Expr | derivative_s (const Expr &variable, int order=1) |
| Expr | integral_s (const Expr &leftOperand, const Expr &rightOperand) |
| Expr | integral_s (const Expr &leftOperand, const Expr &rightOperand, bool empty) |
| Expr | integral_s (const Expr &leftOperand, const Expr &rightOperand, bool empty, const Expr &t_inf, const Expr &t_sup) |
| Expr | integral_s (const Expr &variable) |
| Expr | polynomial_s (const Expr &expr, const Expr &t_variable) |
| Expr | polynomial_s (const csl::vector_expr &operands, const Expr &t_variable) |
| Expr | operator+ (const Expr &a, const Expr &b) |
| Shortcut function that allows to use arithmetic operator + with Expr (== shared_ptr<Abstract>). More... | |
| Expr | operator- (const Expr &a) |
| Expr | operator- (const Expr &a, const Expr &b) |
| Shortcut function that allows to use arithmetic operator - with Expr (== shared_ptr<Abstract>). More... | |
| Expr | operator* (const Expr &a, const Expr &b) |
| Shortcut function that allows to use arithmetic operator * with Expr (== shared_ptr<Abstract>). More... | |
| Expr | operator/ (const Expr &a, const Expr &b) |
| Shortcut function that allows to use arithmetic operator / with Expr (== shared_ptr<Abstract>). More... | |
| std::ostream & | operator<< (std::ostream &fout, const Expr &obj) |
| bool | operator== (const Expr &a, const Expr &b) |
| see Abstract::operator==() | |
| bool | operator!= (const Expr &a, const Expr &b) |
| see Abstract::operator!=() | |
| bool | operator>= (const Expr &a, const Expr &b) |
| see Abstract::operator>=() | |
| bool | operator<= (const Expr &a, const Expr &b) |
| see Abstract::operator<=() | |
| bool | operator> (const Expr &a, const Expr &b) |
| see Abstract::operator>() | |
| bool | operator< (const Expr &a, const Expr &b) |
| see Abstract::operator<() | |
| bool | operator|= (const Expr &a, const Expr &b) |
| see Abstract::operator|=() | |
| bool | operator &= (const Expr &a, const Expr &b) |
| see Abstract::operator&=() | |
| Expr | FindLeaf (Expr const &init, Expr const &value, size_t depth=-1) |
| Searches and returns an expression in another. More... | |
| Expr | FindNode (Expr const &init, Expr const &node, size_t depth=-1) |
| Searches and returns an expression in another. More... | |
| Expr | FindIfLeaf (Expr const &init, std::function< bool(Expr const &)> const &f, size_t depth=-1) |
| Searches and returns an expression in another. More... | |
| Expr | FindIfNode (Expr const &init, std::function< bool(Expr const &)> const &f, size_t depth=-1) |
| Searches and returns an expression in another. More... | |
| bool | AnyOfLeafs (Expr const &init, std::function< bool(Expr const &)> const &f, int depth=-1) |
| Tells if any of the leafs of an expression respect a certain condition given by the user. More... | |
| bool | AnyOfLeafs (Expr_info init, std::function< bool(Expr_info)> const &f, int depth=-1) |
| bool | AllOfLeafs (Expr const &init, std::function< bool(Expr const &)> const &f, int depth=-1) |
| Tells if all of the leafs of an expression respect a certain condition given by the user. More... | |
| bool | AllOfLeafs (Expr_info init, std::function< bool(Expr_info)> const &f, int depth=-1) |
| bool | AnyOfNodes (Expr const &init, std::function< bool(Expr const &)> const &f, int depth=-1) |
| Tells if any of the nodes of an expression respect a certain condition given by the user. More... | |
| bool | AnyOfNodes (Expr_info init, std::function< bool(Expr_info)> const &f, int depth=-1) |
| bool | AllOfNodes (Expr const &init, std::function< bool(Expr const &)> const &f, int depth=-1) |
| Tells if all of the nodes of an expression respect a certain condition given by the user. More... | |
| bool | AllOfNodes (Expr_info init, std::function< bool(Expr_info)> const &f, int depth=-1) |
| void | VisitEachNode (Expr const &init, std::function< void(Expr const &)> const &f, int depth=-1) |
| Visits all nodes of an expression, applying a function on it without modifying it. More... | |
| void | VisitEachNodeReversed (Expr const &init, std::function< void(Expr const &)> const &f, int depth=-1) |
| void | VisitEachNode (Expr_info init, std::function< void(Expr_info)> const &f, int depth=-1) |
| void | VisitEachLeaf (Expr const &init, std::function< void(Expr const &)> const &f, int depth=-1) |
| Visits all leafs of an expression, applying a function on it without modifying it. More... | |
| void | VisitEachLeaf (Expr_info init, std::function< void(Expr_info)> const &f, int depth=-1) |
| void | VisitEachNodeCut (Expr const &init, std::function< bool(Expr const &)> const &f, int depth=-1) |
| Visits all nodes of an expression, applying a function on it without modifying it. When the user function returns true on one node, the underlying branch (if there is) is not explored. More... | |
| void | VisitEachNodeCut (Expr_info init, std::function< bool(Expr_info)> const &f, int depth=-1) |
| bool | isUnique (csl::Expr const &expr) |
| size_t | Count (csl::Expr const &expr, csl::Expr const &search) |
| size_t | CountIf (csl::Expr const &expr, std::function< bool(csl::Expr const &)> const &f) |
| size_t | CountNodes (Expr const &init) |
| size_t | CountLeafs (Expr const &init) |
| void | ForEachNode (Expr &init, std::function< void(Expr &)> const &f, int depth=-1) |
| Applies a user function on each node of an expression. The expression may be modified. More... | |
| void | ForEachNodeReversed (Expr &init, std::function< void(Expr &)> const &f, int depth=-1) |
| void | ForEachLeaf (Expr &init, std::function< void(Expr &)> const &f, int depth=-1) |
| Applies a user function on each leaf of an expression. The expression may be modified. More... | |
| void | ForEachNodeCut (Expr &init, std::function< bool(Expr &)> const &f, int depth=-1) |
| Applies a user function on each node of an expression. The expression may be modified. More... | |
| bool | FirstOfNode (Expr &init, std::function< bool(Expr &)> const &f) |
| Tells if any of the nodes of an expression respect a certain condition given by the user. The condition function may apply on the go on the expression found. More... | |
| bool | FirstOfLeaf (Expr &init, std::function< bool(Expr &)> const &f) |
| Tells if any of the leafs of an expression respect a certain condition given by the user. The condition function may apply on the go on the expression found. More... | |
| bool | VisitFirstOfNode (Expr const &init, std::function< bool(Expr const &)> const &f) |
| bool | VisitFirstOfLeaf (Expr const &init, std::function< bool(Expr const &)> const &f) |
| bool | Transform (Expr &init, std::function< bool(Expr &)> const &f, int depth=-1) |
| Applies a user function on each node of an expression. The expression may be modified. If it is, the expression is refreshed. More... | |
| template<class T , csl::allocator< T > & pool, class ... Args> | |
| std::shared_ptr< T > | make_shared (Args &&...args) |
| template<class T , class ... Args> | |
| std::shared_ptr< T > | make_shared (Args &&...args) |
| template<class T > | |
| T | pointer_to_object (const Expr &expr) |
| template<class T > | |
| T & | pointer_to_object_ref (const Expr &expr) |
| template<typename T > | |
| T * | shared_to_raw_ptr (const Expr_c &expr) |
| template<typename T > | |
| Expr | object_to_shared (T &csl_expr) |
| Expr | Commutation (const Expr &A, const Expr &B, int sign=-1) |
| Returns the result of the (anit-)commutation of A and B. In most cases it returns CSL_0, and returns CSL_UNDEF else. Useful to test if two objects commute. More... | |
| Expr | Commutation (Expr_info A, Expr_info B, int sign=-1) |
| Expr | WeakCommutation (const Expr &A, const Expr &B, int sign=-1) |
| Returns the result of the (anit-)commutation of A and B. In most cases it returns CSL_0, and returns CSL_UNDEF else. Useful to test if two objects commute. In the special of this function, A is an object that is not commutable (attribute Abstract::commutable) and B is commutable. More... | |
| Expr | WeakCommutation (Expr_info A, Expr_info B, int sign=-1) |
| Expr | commutator_ (const Expr &A, const Expr &B, int t_sign=-1) |
| Tries to create a Commutator object of A and B of sign sign. More... | |
| Expr | real_s (const Expr &expr) |
| Expr | imaginary_s (const Expr &expr) |
| Expr | cconjugate_ (const Expr &expr) |
| template<class Iterator , class Comparator > | |
| Iterator | dichotomyFindIf (Iterator first, Iterator last, Comparator &&f) |
| Template dichotomy algorithm using a comparator. More... | |
| std::ostream & | operator<< (std::ostream &fout, csl::Type type) |
| Displays the name of a given csl::Type in order to be readable. More... | |
| std::ostream & | operator<< (std::ostream &fout, csl::PrimaryType primaryType) |
| Displays the name of a given csl::PrimaryType in order to be readable. More... | |
| std::ostream & | operator<< (std::ostream &fout, cslEquation::Type type) |
| csl::vector_expr | listBuildingBlocks (const Expr &expr) |
| Equation * | equation_ (const Expr &leftHandSide) |
| Equation * | equation_ (const Expr &leftHandSide, const Expr &rightHandSide) |
| Equation * | equation_ (const Equation &eq) |
| Equation * | equation_ (Equation *eq) |
| template<typename T > | |
| void | callError (cslError::Error error, const std::string &caller, T spec) |
| Displays an error message depending on the error error, the name of the caller function caller and a possible specificity of the error spec. For example spec is the index for OutOfBound error. This function stops the program. More... | |
| void | callError (cslError::Error error, const std::string &caller) |
| Calls callError(cslError::Error, const std::string&,T) with no spec. | |
| template<typename T > | |
| void | callWarning (cslError::Warning warning, const std::string &caller, T spec) |
| Displays a warning message depending on the warning warning, the name of the caller function caller and a possible specificity of the warning spec. For example spec is the dimension for InvalidDimension error. This function does not stop the program. More... | |
| int | matchBOnA (csl::Expr const &A, csl::Expr const &B) |
| bool | hardComparison (csl::Expr const &, csl::Expr const &) |
| bool | hardOrdering (csl::Expr const &, csl::Expr const &) |
| bool | HardFactorImplementation (Expr &sum, bool applyRecursively=true) |
| Expr | HardFactored (Expr const &init) |
| void | HardFactor (Expr &init) |
| Expr | DeepHardFactored (Expr const &init) |
| void | DeepHardFactor (Expr &init) |
| std::vector< Index > | integerToIndices (const std::vector< int > &indices) |
| Index | operator! (const Index &index) |
| operator!, unary operator on Index that change the free property of the Index. More... | |
| Index | operator+ (const Index &index) |
| operator+, unary operator on Index that returns a similar Index with sign = 1 if the Space is signed, i.e. an Index up. More... | |
| Index | operator- (const Index &index) |
| operator-, unary operator on Index that returns a similar Index with sign = 0 if the Space is signed, i.e. an Index down. More... | |
| csl::vector_expr | getAllPermutations (const Expr &expr) |
| template<class ... Args> | |
| std::shared_ptr< TensorParent > | tensor_s (Args &&...args) |
| template<class ... Args> | |
| std::shared_ptr< TensorParent > | tensor_s (std::string const &name, std::vector< const Space *> const &indices, Args &&...args) |
| template<typename ... Args> | |
| Expr | tensorelement_s (Args &&...args) |
| bool | IsIndicialTensor (const Expr &expr) |
| bool | IsIndicialTensor (Expr_info expr) |
| void | nameTensor (const std::string &name, Expr &tensor, bool first=true) |
Fills an tensor with variables of the same name with the numbers correponding to their place in the tensor. Allows for example to name elements of a vector : . More... | |
| Expr | generateTensor (const std::string &name, const std::vector< const Space *> &spaces) |
| Generates a tensor of name name that lives in a list of spaces, filled with variables given by nameTensor(). More... | |
| template<class T > | |
| csl::Type | GetType (T const &expr) |
| template<class T > | |
| csl::Type | GetPrimaryType (T const &expr) |
| size_t | Size (Expr const &expr) |
| Expr | GetArgument (Expr const &expr, size_t pos=0) |
| bool | GetCommutable (csl::Expr const &expr) |
| bool | GetCommutable (csl::Expr_info expr) |
| bool | GetCommutable (csl::Abstract const &expr) |
| Expr | GetSymbol (std::string_view name, Expr const &init) |
| Parent | GetParent (std::string_view name, Expr const &init) |
| bool | DependsOn (Expr const &init, Expr const &x) |
| bool | DependsExplicitlyOn (Expr const &init, Expr const &x) |
| bool | DependsOn (Expr const &init, csl::Parent const &x) |
| bool | DependsExplicitlyOn (Expr const &init, csl::Parent const &x) |
| void | Expand (Expr &expression, bool full=false, bool inplace=false) |
| Expr | Expanded (const Expr &expression, bool full=false, bool inplace=false) |
| void | ExpandIf (Expr &expression, std::function< bool(Expr const &)> const &f, bool full=false, bool inplace=false) |
| Expr | ExpandedIf (const Expr &expression, std::function< bool(Expr const &)> const &f, bool full=false, bool inplace=false) |
| void | DeepExpand (Expr &expression, bool inplace=false) |
| Expr | DeepExpanded (Expr const &expression, bool inplace=false) |
| void | DeepExpandIf (Expr &expression, std::function< bool(Expr const &)> const &f, bool inplace=false) |
| Expr | DeepExpandedIf (Expr const &expression, std::function< bool(Expr const &)> const &f, bool inplace=false) |
| void | DeepExpandIf_lock (Expr &expression, std::function< bool(Expr const &)> const &f, int lockId=0, bool inplace=false, bool refactor=false) |
| Expr | DeepExpandedIf_lock (Expr const &expression, std::function< bool(Expr const &)> const &f, int lockId=0, bool inplace=false, bool refactor=false) |
| void | Factor (Expr &expression, bool full=false) |
| void | Factor (Expr &expression, Expr_info factor, bool full=false) |
| void | Factor (Expr &expression, Expr const &factor, bool full=false) |
| Expr | Factored (const Expr &expression, bool full=false) |
| Expr | Factored (const Expr &expression, Expr_info factor, bool full=false) |
| Expr | Factored (const Expr &expression, const Expr &factor, bool full=false) |
| void | DeepFactor (Expr &expression) |
| void | DeepFactor (Expr &expression, Expr_info factor) |
| void | DeepFactor (Expr &expression, Expr const &factor) |
| Expr | DeepFactored (const Expr &expression) |
| Expr | DeepFactored (const Expr &expression, Expr_info factor) |
| Expr | DeepFactored (const Expr &expression, const Expr &factor) |
| void | Collect (Expr &expr, std::vector< Expr > const &factors) |
| void | DeepCollect (Expr &expr, std::vector< Expr > const &factors) |
| Expr | Collected (Expr const &expr, std::vector< Expr > const &factors) |
| Expr | DeepCollected (Expr const &expr, std::vector< Expr > const &factors) |
| Expr | Distributed (Expr const &expression, Expr_info factor, bool full=false) |
| void | Distribute (Expr &expression, Expr_info factor, bool full=false) |
| Expr | Distributed (Expr const &expression, Expr const &factor, bool full=false) |
| void | Distribute (Expr &expression, Expr const &factor, bool full=false) |
| Expr | DeepDistributed (Expr const &expression, Expr_info factor) |
| void | DeepDistribute (Expr &expression, Expr_info factor) |
| Expr | DeepDistributed (Expr const &expression, Expr const &factor) |
| void | DeepDistribute (Expr &expression, Expr const &factor) |
| Expr | Distributed (Expr const &expression, Parent_info factor, bool full=false) |
| void | Distribute (Expr &expression, Parent_info factor, bool full=false) |
| Expr | Distributed (Expr const &expression, Parent const &factor, bool full=false) |
| void | Distribute (Expr &expression, Parent const &factor, bool full=false) |
| Expr | DeepDistributed (Expr const &expression, Parent_info factor) |
| void | DeepDistribute (Expr &expression, Parent_info factor) |
| Expr | DeepDistributed (Expr const &expression, Parent const &factor) |
| void | DeepDistribute (Expr &expression, Parent const &factor) |
| Expr | DistributedIf (Expr const &expression, std::function< bool(Expr const &)> f, bool full=false) |
| void | DistributeIf (Expr &expression, std::function< bool(Expr const &)> f, bool full=false) |
| Expr | DeepDistributedIf (Expr const &expression, std::function< bool(Expr const &)> f) |
| void | DeepDistributeIf (Expr &expression, std::function< bool(Expr const &)> f) |
| Expr | GetTerm (const Expr &expression) |
| Expr | Derived (const Expr &expression, Expr_info variable) |
| Expr | Derived (const Expr &expression, const Expr &variable) |
| void | Derive (Expr &expression, Expr_info variable) |
| void | Derive (Expr &expression, const Expr &variable) |
| Expr | GetPolynomialTerm (const Expr &expression, Expr_info variable, int order) |
| Expr | GetPolynomialTerm (const Expr &expression, const Expr &variable, int order) |
| Expr | Evaluated (const Expr &expression) |
| Expr | Evaluated (const Expr &expression, csl::eval::mode user_mode) |
| void | Evaluate (Expr &expr) |
| void | Evaluate (Expr &expr, eval::mode user_mode) |
| ComplexProperty | GetComplexProperty (Expr const &expr) |
| void | SetComplexProperty (Expr &expr, ComplexProperty prop) |
| ComplexProperty | GetComplexProperty (csl::Parent const &parent) |
| void | SetComplexProperty (csl::Parent &parent, ComplexProperty prop) |
| template<class T > | |
| void | SetComplexProperty (T parent, ComplexProperty prop) |
| Expr | GetRealPart (const Expr &expression) |
| Expr | GetImaginaryPart (const Expr &expression) |
| Expr | GetComplexModulus (const Expr &expression) |
| Expr | GetComplexArgument (const Expr &expression) |
| Expr | GetComplexConjugate (const Expr &expression) |
| Expr | GetTransposed (const Expr &expression, const Space *space, bool applyProp=true) |
| Expr | GetTransposed (const Expr &expression, const std::vector< const Space *> &spaces, bool applyProp=true) |
| Expr | GetHermitianConjugate (const Expr &expression, const Space *space) |
| Expr | GetHermitianConjugate (const Expr &expression, const std::vector< const Space *> &spaces) |
| Expr | Swapped (const Expr &expression, const Index &index1, const Index &index2, bool refresh=true) |
| Expr | Swapped (const Expr &expression, const Expr &index1, const Expr &index2, bool refresh=true) |
| Expr | Swapped (const Expr &expression, const Parent &index1, const Parent &index2, bool refresh=true) |
| template<class T > | |
| void | Swap (Expr &expression, T const &old_obj, T const &new_obj) |
| Expr | ContractIndex (const Expr &expression, const Index &index) |
| csl::Index | GenerateIndex (const csl::Space *space, const std::string &name="") |
| csl::Tensor | GetDelta (const csl::Space *space) |
| csl::Tensor | GetMetric (const csl::Space *space) |
| csl::Tensor | GetEpsilon (const csl::Space *space) |
| csl::Tensor | GetDelta (const csl::Space &space) |
| csl::Tensor | GetMetric (const csl::Space &space) |
| csl::Tensor | GetEpsilon (const csl::Space &space) |
| Parent | GetParent (Expr const &tensor) |
| Tensor | GetTensorParent (Expr const &tensor) |
| TensorField | GetTensorFieldParent (Expr const &tensor) |
| TDerivative | GetTDerivativeParent (Expr const &tensor) |
| void | AddSelfContraction (csl::Tensor &parent, Expr const &A, Expr const &B, Expr const &res) |
| void | AddContractionProperty (csl::Tensor &parent, std::vector< Expr > const &tensors, Expr const &res) |
| void | AddComplexProperty (csl::Tensor &parent, Expr const &A, Expr const &B) |
| void | AddTransposedProperty (csl::Tensor &parent, csl::Space const *space, Expr const &A, Expr const &B) |
| void | AddHermitianProperty (csl::Tensor &parent, csl::Space const *space, Expr const &A, Expr const &B) |
| LibDependency | GetLibraryDependencies (Expr const &expression) |
| bool | IsIndexed (Expr const &expr) |
| bool | IsNumerical (Expr const &expr) |
| bool | IsLiteral (Expr const &expr) |
| bool | IsScalarFunction (Expr const &expr) |
| bool | IsMultiFunction (Expr const &expr) |
| bool | IsVectorial (Expr const &expr) |
| bool | IsIndicial (Expr const &expr) |
| bool | IsField (Expr const &expr) |
| bool | IsArbitrary (Expr const &expr) |
| bool | IsInteger (Expr const &expr) |
| bool | IsFloat (Expr const &expr) |
| bool | IsIntFraction (Expr const &expr) |
| bool | IsIntFactorial (Expr const &expr) |
| bool | IsComplex (Expr const &expr) |
| bool | IsNumericalEval (Expr const &expr) |
| bool | IsImaginary (Expr const &expr) |
| bool | IsConstant (Expr const &expr) |
| bool | IsVariable (Expr const &expr) |
| bool | IsExp (Expr const &expr) |
| bool | IsLog (Expr const &expr) |
| bool | IsDiracDelta (Expr const &expr) |
| bool | IsAbs (Expr const &expr) |
| bool | IsCos (Expr const &expr) |
| bool | IsSin (Expr const &expr) |
| bool | IsTan (Expr const &expr) |
| bool | IsCosh (Expr const &expr) |
| bool | IsSinh (Expr const &expr) |
| bool | IsTanh (Expr const &expr) |
| bool | IsACos (Expr const &expr) |
| bool | IsASin (Expr const &expr) |
| bool | IsATan (Expr const &expr) |
| bool | IsACosh (Expr const &expr) |
| bool | IsASinh (Expr const &expr) |
| bool | IsATanh (Expr const &expr) |
| bool | IsScalar (Expr const &expr) |
| bool | IsRealPart (Expr const &expr) |
| bool | IsImaginaryPart (Expr const &expr) |
| bool | IsITensor (Expr const &expr) |
| bool | IsScalarField (Expr const &expr) |
| bool | IsTensorField (Expr const &expr) |
| bool | IsTensorialDerivative (Expr const &expr) |
| bool | IsStandardDuo (Expr const &expr) |
| bool | IsStandardMult (Expr const &expr) |
| bool | IsPow (Expr const &expr) |
| bool | IsProd (Expr const &expr) |
| bool | IsSum (Expr const &expr) |
| bool | IsPolynomial (Expr const &expr) |
| bool | IsDerivative (Expr const &expr) |
| bool | IsCommutator (Expr const &expr) |
| bool | IsAngle (Expr const &expr) |
| bool | IsFactorial (Expr const &expr) |
| bool | IsIntegral (Expr const &expr) |
| bool | IsScalarIntegral (Expr const &expr) |
| bool | IsVectorIntegral (Expr const &expr) |
| bool | IsVector (Expr const &expr) |
| bool | IsMatrix (Expr const &expr) |
| bool | IsHighDTensor (Expr const &expr) |
| bool | IsIndexed (Expr_info expr) |
| bool | IsNumerical (Expr_info expr) |
| bool | IsLiteral (Expr_info expr) |
| bool | IsScalarFunction (Expr_info expr) |
| bool | IsMultiFunction (Expr_info expr) |
| bool | IsVectorial (Expr_info expr) |
| bool | IsIndicial (Expr_info expr) |
| bool | IsField (Expr_info expr) |
| bool | IsArbitrary (Expr_info expr) |
| bool | IsInteger (Expr_info expr) |
| bool | IsFloat (Expr_info expr) |
| bool | IsIntFraction (Expr_info expr) |
| bool | IsIntFactorial (Expr_info expr) |
| bool | IsComplex (Expr_info expr) |
| bool | IsNumericalEval (Expr_info expr) |
| bool | IsImaginary (Expr_info expr) |
| bool | IsConstant (Expr_info expr) |
| bool | IsVariable (Expr_info expr) |
| bool | IsExp (Expr_info expr) |
| bool | IsLog (Expr_info expr) |
| bool | IsDiracDelta (Expr_info expr) |
| bool | IsAbs (Expr_info expr) |
| bool | IsCos (Expr_info expr) |
| bool | IsSin (Expr_info expr) |
| bool | IsTan (Expr_info expr) |
| bool | IsCosh (Expr_info expr) |
| bool | IsSinh (Expr_info expr) |
| bool | IsTanh (Expr_info expr) |
| bool | IsACos (Expr_info expr) |
| bool | IsASin (Expr_info expr) |
| bool | IsATan (Expr_info expr) |
| bool | IsACosh (Expr_info expr) |
| bool | IsASinh (Expr_info expr) |
| bool | IsATanh (Expr_info expr) |
| bool | IsScalar (Expr_info expr) |
| bool | IsRealPart (Expr_info expr) |
| bool | IsImaginaryPart (Expr_info expr) |
| bool | IsITensor (Expr_info expr) |
| bool | IsScalarField (Expr_info expr) |
| bool | IsTensorField (Expr_info expr) |
| bool | IsTensorialDerivative (Expr_info expr) |
| bool | IsStandardDuo (Expr_info expr) |
| bool | IsStandardMult (Expr_info expr) |
| bool | IsPow (Expr_info expr) |
| bool | IsProd (Expr_info expr) |
| bool | IsSum (Expr_info expr) |
| bool | IsPolynomial (Expr_info expr) |
| bool | IsDerivative (Expr_info expr) |
| bool | IsCommutator (Expr_info expr) |
| bool | IsAngle (Expr_info expr) |
| bool | IsFactorial (Expr_info expr) |
| bool | IsIntegral (Expr_info expr) |
| bool | IsScalarIntegral (Expr_info expr) |
| bool | IsVectorIntegral (Expr_info expr) |
| bool | IsVector (Expr_info expr) |
| bool | IsMatrix (Expr_info expr) |
| bool | IsHighDTensor (Expr_info expr) |
| void | ApplySelfProperty (Expr &init, csl::Tensor &tensor, Expr const &A, Expr const &B, Expr const &res) |
| Declares a self contraction property just the time of a refresh in order to apply it on one expression. More... | |
| void | ApplyChainProperty (Expr &init, csl::Tensor &tensor, std::vector< Expr > const &prod, Expr const &res) |
| Declares a chain contraction property just the time of a refresh in order to apply it on one expression. More... | |
| bool | CheckValidity (Expr const &init, std::vector< Expr_info > encountered=std::vector< Expr_info >()) |
| Checks the validity of an expression. More... | |
| size_t | MemorySizeOf (Expr const &expression) |
| Calculates an estimate of the total memory that an expression takes. More... | |
| void | AddProperty (csl::Tensor &tensor, Expr const &A, Expr const &B, Expr const &res) |
| void | AddProperty (csl::Tensor &tensor, std::vector< Expr > const &product, Expr const &res) |
| const csl::Space * | GetSpace (csl::Tensor const &tensor, int pos=0) |
| csl::Index | GetIndex (csl::Tensor const &tensor, int pos=0) |
| csl::Index | GetIndex (csl::Space const *space) |
| std::vector< csl::Index > | GetIndices (size_t N, csl::Space const *space) |
| csl::Index | GetIndex (csl::Space const &space) |
| std::vector< csl::Index > | GetIndices (size_t N, csl::Space const &space) |
| std::vector< csl::Index > | GetIndices (size_t N, csl::Tensor const &tensor, int pos=0) |
| std::vector< csl::Index > | GetFullSetOfIndicesFor (csl::Tensor const &tensor) |
| Tensor | Unitary (std::string const &name, csl::Space const *space) |
| bool | TestIndexSanity (Expr const &expr, bool verbose=false) |
| void | printCallableStructure (std::ostream &out) |
| void | print_libcomplexop_hdata (std::ostream &out) |
| void | print_libdiagonalization_cppdata (std::ostream &out) |
| void | print_libdiagonalization_hdata (std::ostream &out) |
| std::ostream & | operator<< (std::ostream &out, LibEvalSession::Perf perf) |
| bool | operator< (LibParameter const &A, LibParameter const &B) |
| std::vector< LibParameter > | inputParams (std::vector< LibraryGenerator::DiagonalizationData > const &diagData) |
| std::vector< LibParameter > | outputParams (std::vector< LibraryGenerator::DiagonalizationData > const &diagData, std::vector< std::string > const &massExpressions) |
| void | print_librarytensor_hdata (std::ostream &out) |
| Expr | intfactorial_s (int value) |
| Expr | constant_s (std::string const &name, csl::ComplexProperty prop=csl::ComplexProperty::Real) |
| Expr | constant_s (std::string const &name, long double value, csl::ComplexProperty prop=csl::ComplexProperty::Real) |
| Expr | constant_s (std::string const &name, Expr const &value, csl::ComplexProperty prop=csl::ComplexProperty::Real) |
| Expr | variable_s (std::string const &name, csl::ComplexProperty prop=csl::ComplexProperty::Real) |
| Expr | variable_s (std::string const &name, long double value, csl::ComplexProperty prop=csl::ComplexProperty::Real) |
| Expr | variable_s (std::string const &name, Expr const &value, csl::ComplexProperty prop=csl::ComplexProperty::Real) |
| Expr | abs_s (const Expr &expr) |
| Creates an object of type Abs acting on expr. More... | |
| Expr | exp_s (const Expr &expr) |
| Creates an object of type Exp acting on expr. More... | |
| Expr | log_s (const Expr &expr) |
| Creates an object of type Log acting on expr. More... | |
| Expr | cos_s (const Expr &expr) |
| Creates an object of type Cos acting on expr. More... | |
| Expr | sin_s (const Expr &expr) |
| Creates an object of type Sin acting on expr. More... | |
| Expr | tan_s (const Expr &expr) |
| Creates an object of type Tan acting on expr. More... | |
| Expr | acos_s (const Expr &expr) |
| Creates an object of type ACos acting on expr. More... | |
| Expr | asin_s (const Expr &expr) |
| Creates an object of type ASin acting on expr. More... | |
| Expr | atan_s (const Expr &expr) |
| Creates an object of type ATan acting on expr. More... | |
| Expr | angle_s (Expr const &a, Expr const &b) |
| Expr | cosh_s (const Expr &expr) |
| Creates an object of type Cosh acting on expr. More... | |
| Expr | sinh_s (const Expr &expr) |
| Creates an object of type Sinh acting on expr. More... | |
| Expr | tanh_s (const Expr &expr) |
| Creates an object of type Tanh acting on expr. More... | |
| Expr | acosh_s (const Expr &expr) |
| Creates an object of type ACosh acting on expr. More... | |
| Expr | asinh_s (const Expr &expr) |
| Creates an object of type ASinh acting on expr. More... | |
| Expr | atanh_s (const Expr &expr) |
| Creates an object of type ATanh acting on expr. More... | |
| Expr | factorial_s (const Expr &expr) |
| Expr | diracdelta_s (const Expr &argument) |
| Expr | float_s (long double value) |
| Expr | int_s (long long int value) |
| Expr | autonumber_s (long double value) |
| Expr | intfraction_s (long long int num, long long int denom) |
| Expr | complex_s (Expr const &real, Expr const &imag) |
| Expr | numericaleval_s (long double value, long double delta_plus) |
| Expr | numericaleval_s (long double value, long double delta_plus, long double delta_minus) |
| template<class T > | |
| std::ostream & | operator<< (std::ostream &fout, const ObjectPermutation< T > &perm) |
| template<class T > | |
| std::ostream & | operator<< (std::ostream &fout, const ObjectSymmetry< T > &sym) |
| void | getExponentStructure (const Expr &argument, Expr &term, Expr &exponent) |
| void | applyOperator (Expr &product) |
| Expr | tensor_s (const std::vector< int > &shape, const Expr &filler) |
| bool | pullLeft (csl::vector_expr &argument, size_t pos, size_t &begin) |
| bool | pullRight (csl::vector_expr &argument, size_t &pos, size_t &end) |
| void | getParts (const csl::vector_expr &argument, size_t begin, size_t end, Expr &left, Expr &mid, Expr &right) |
| bool | haveCommonIndices (csl::Expr const &a, csl::Expr const &b, csl::Space const *space) |
| void | PartialExpandImplementation (Expr &prod, ExpanderEmitter const &isEmitter, ExpanderReceiver const &isReceiver) |
| void | PartialExpandImplementation (Expr &prod, ExpanderEmitter const &isEmitter, ExpanderEmitter const &isReceiver) |
| void | PartialExpandImplementation (Expr &prod, ExpanderEmitter const &isEmitterReceiver) |
| Expr | PartialExpanded (Expr const &init, ExpanderEmitter const &isEmitter, ExpanderReceiver const &isReceiver) |
| void | PartialExpand (Expr &init, ExpanderEmitter const &isEmitter, ExpanderReceiver const &isReceiver) |
| Expr | DeepPartialExpanded (Expr const &init, ExpanderEmitter const &isEmitter, ExpanderReceiver const &isReceiver) |
| void | DeepPartialExpand (Expr &init, ExpanderEmitter const &isEmitter, ExpanderReceiver const &isReceiver) |
| Expr | PartialExpanded (Expr const &init, ExpanderEmitter const &isEmitter, ExpanderEmitter const &isReceiver) |
| void | PartialExpand (Expr &init, ExpanderEmitter const &isEmitter, ExpanderEmitter const &isReceiver) |
| Expr | DeepPartialExpanded (Expr const &init, ExpanderEmitter const &isEmitter, ExpanderEmitter const &isReceiver) |
| void | DeepPartialExpand (Expr &init, ExpanderEmitter const &isEmitter, ExpanderEmitter const &isReceiver) |
| Expr | PartialExpanded (Expr const &init, ExpanderEmitter const &isEmitter) |
| void | PartialExpand (Expr &init, ExpanderEmitter const &isEmitter) |
| Expr | DeepPartialExpanded (Expr const &init, ExpanderEmitter const &isEmitter) |
| void | DeepPartialExpand (Expr &init, ExpanderEmitter const &isEmitter) |
| std::pair< int_ap< 2 >, int > | decomposeLongFloat (long double number) |
| void | fillDigits (const std::vector< short > &digits, std::vector< short > &receiver) |
| template<const size_t base> | |
| long double | log (long double x) |
| char | convertDigit (short digit) |
| template<size_t base> | |
| int_ap< base > | factorial (const int_ap< base > &number) |
| void | MakeIntegral (Expr &init) |
| template<typename ... Args> | |
| Expr | scalarintegral_s (Args ...args) |
| Expr | vectorintegral_s (const Tensor &variables) |
| template<typename ... Args> | |
| Expr | vectorintegral_s (const Expr &operand, const Tensor &variables, Args... args) |
| template<typename ... Args> | |
| Expr | vectorintegral_s (const Tensor &variables, Args... args) |
| Expr | vectorintegral_s (const Parent &variables) |
| template<typename ... Args> | |
| Expr | vectorintegral_s (const Expr &operand, const Parent &variables, Args... args) |
| template<typename ... Args> | |
| Expr | vectorintegral_s (const Parent &variables, Args... args) |
| void | Replace (csl::Expr &expr, csl::Expr const &from, csl::Expr const &to) |
| void | Replace (csl::Expr &expr, csl::Parent const &from, csl::Parent const &to) |
| void | Replace (csl::Expr &expr, csl::Parent const &from, csl::Expr const &to) |
| void | Replace (csl::Expr &expr, std::vector< csl::Parent > const &from, std::vector< csl::Parent > const &to) |
| void | Replace (csl::Expr &expr, std::vector< csl::Expr > const &from, std::vector< csl::Expr > const &to) |
| void | ReplaceIndicial (csl::Expr &expr, std::vector< csl::Expr > const &from, std::vector< csl::Expr > const &to) |
| void | Replace (csl::Expr &expr, std::vector< csl::Parent > const &from, std::vector< csl::Expr > const &to, bool refresh=true) |
| template<class T , class U , class ... Params, typename = std::enable_if_t< !csl::canDecay_v<T, U, csl::Index> && !csl::canDecay_v<T, U, csl::IndexStructure> && !csl::canDecay_v<T, U, std::vector<csl::Index>> >> | |
| csl::Expr | Replaced (csl::Expr const &expr, T &&p1, U &&p2, Params &&...params) |
| csl::Expr | Replaced (csl::Expr const &expr, csl::Index const &from, csl::Index const &to, bool refresh=true) |
| void | Replace (csl::Expr &expr, csl::Index const &from, csl::Index const &to, bool refresh=true) |
| csl::Expr | Replaced (csl::Expr const &expr, std::vector< csl::Index > const &from, std::vector< csl::Index > const &to, bool refresh=true) |
| void | Replace (csl::Expr &expr, std::vector< csl::Index > const &from, std::vector< csl::Index > const &to, bool refresh=true) |
| csl::Expr | Replaced (csl::Expr const &expr, csl::IndexStructure const &from, csl::IndexStructure const &to, bool refresh=true) |
| void | Replace (csl::Expr &expr, csl::IndexStructure const &from, csl::IndexStructure const &to, bool refresh=true) |
| auto | ruleToPredicate (replacementRule const &rule) |
| Converts a replacementRule into a predicate. More... | |
| bool | hasWeakDependency (csl::Expr const &expr, std::function< bool(csl::Expr const &)> const &predicate) |
| Search for a true value for a given predicate in an expression, considering also sub-expressions encapsulated by abbreviations. More... | |
| void | applyThroughAbbreviations (csl::Expr &expr, replacementRule const &rule) |
| Applies a replacement rule thoughout an expression, also entering abbreviations and replacing them if a replacement is found. More... | |
| std::optional< csl::Expr > | scalarReplacement (csl::Expr const &expr, std::vector< csl::Expr > const &from, std::vector< csl::Expr > const &ccFrom, std::vector< csl::Expr > const &to, bool isPredicate) |
| std::optional< csl::Expr > | indicialReplacement (csl::Expr const &expr, std::vector< csl::Expr > const &from, std::vector< csl::Parent_info > const &parentFrom, std::vector< csl::Expr > const &to, bool isPredicate) |
| std::optional< csl::Expr > | tensorReplacement (csl::Expr const &expr, std::vector< csl::Parent > const &from, std::vector< csl::Parent > const &to, bool isPredicate) |
| std::optional< csl::Expr > | tensorExpressionReplacement (csl::Expr const &expr, std::vector< csl::Parent > const &from, std::vector< csl::Expr > const &to, bool isPredicate) |
| void | ResetDummyIndices (csl::Expr &expr) |
| void | ApplyIndices (csl::Expr &expr, csl::IndexStructure const &structure) |
| void | ApplyIndices (csl::Expr &expr, csl::IndexStructure const &from, csl::IndexStructure const &to) |
| void | renameIndex (csl::Index &index, std::map< csl::Index, csl::Index > &mapping) |
| void | RenameIndices (csl::Expr &expr) |
| csl::Expr | RenamedIndices (csl::Expr const &expr) |
| void | internal_RenameIndices (csl::Expr &expr, std::map< csl::Index, csl::Index > &mapping) |
| template<class ParentType , typename = std::enable_if_t<std::is_convertible_v<ParentType, Parent>>> | |
| void | Replace (Expr &expr, std::vector< ParentType > const &t_from, std::vector< ParentType > const &t_to) |
| template<class ParentType , typename = std::enable_if_t<std::is_convertible_v<ParentType, Parent>>> | |
| void | Replace (Expr &expr, std::vector< ParentType > const &t_from, std::vector< csl::Expr > const &to) |
| template<class ... Args> | |
| Expr | Tried (const Expr &expr, Args &&...args) |
| template<class ... Args> | |
| void | Try (Expr &expr, Args &&...args) |
| Expr | scalar_ (Expr const &left, Expr const &right) |
| void | printVector (const csl::vector_expr &vector) |
| Display a vector of expressions. Useful in debug. More... | |
| void | addAlternateForm (csl::vector_expr &alternateForms, const Expr &newAlternate, bool add_factor_expand=true) |
| Tried to add newAlternate in the set alternateForms. We simply test if the alternate is already present in the set newAlternate and add it if it is not the case. If add_factor_expand is set to true, we try to add the expanded and the factored forms of newAlternate. More... | |
| void | reduceAlternate (csl::vector_expr &alternateForms) |
| Reduces the number of elements in alternateForms to MAX_ALTERNATE_FORMS. More... | |
| void | clearRedundancyAlternate (csl::vector_expr &alternateForms) |
| Search and remove redundancies (equal alternate forms) in alternateForms. More... | |
| csl::vector_expr | getRecursiveAlternateForms (const Expr &expr, int depth=-1) |
| Returns the alternate forms of expr by applying recursively internalRecursiveAlternateForms() MAX_RECURSION_ALTERNATE times: take alternates, then alternates of the alternates etc. More... | |
| csl::vector_expr | internalRecursiveAlternateForms (const Expr &expr, int depth=-1) |
| Calculates and return all alternate forms of expr, by getting (once) alternate forms of the possible arguments of expr, and then the specific alternates of expr. More... | |
| Expr | Simplify (const Expr &expr, int depth=-1) |
| Simplifies expr depending on its type. More... | |
| int | numberOfMutatingNodes (const Expr &expr) |
| bool | insertSortMutant (csl::vector_expr &vec, const Expr &newExpr) |
| bool | addMutants (csl::vector_expr &individuals, const csl::vector_expr &mutants) |
| csl::vector_expr | getRandomMutation (const Expr &expr) |
| void | naturalSelection (csl::vector_expr &individuals) |
| Expr | evolve (const Expr &baseIndividual) |
| void | sort (std::vector< Expr > &argument) |
| Sorts a container using mergeSort(). More... | |
| void | sort (std::vector< Expr >::iterator first, std::vector< Expr >::iterator last) |
| Sorts a container using mergeSort(). More... | |
| void | selectionSort (std::vector< Expr > &argument) |
Applies the selection sort algorithm on a container. More... | |
| void | selectionSort (std::vector< Expr >::iterator first, std::vector< Expr >::iterator last) |
Applies the selection sort algorithm on a container. More... | |
| void | mergeSort (std::vector< Expr > &argument) |
Applies the merge sort algorithm on a container. More... | |
| void | mergeSort (std::vector< Expr >::iterator first, std::vector< Expr >::iterator last) |
Applies the merge sort algorithm on a container. More... | |
| template<typename T , typename G > | |
| std::vector< std::pair< T, G > >::iterator | findFirstInPair (std::vector< std::pair< T, G >> &v, const T &element) |
| template<typename T , typename G > | |
| std::vector< std::pair< T, G > >::iterator | findSecondInPair (std::vector< std::pair< T, G >> &v, const G &element) |
| const Space & | buildMinkowski () |
| void | fillEpsilonTensor (Expr &tensor, int dim) |
| const Space | Euclid_R2 ("R2", 2) |
Space . | |
| const Space | Euclid_R3 ("R3", 3) |
Space . | |
| const Space | Euclid_R4 ("R4", 4) |
Space . | |
| int | PGCD (double a, double b) |
| Returns the PGCD of a and b. More... | |
| long long int | PGCD (long long int a, long long int b) |
| Returns the PGCD of a and b. More... | |
| int | PGCD (int a, int b) |
| int | internal_PGCD (long long int a, long long int b) |
| Returns the PGCD of a and b. More... | |
| long long int | sgn (long long int a) |
| Returns the sign of a. More... | |
| int | sgn (int a) |
| int | sgn (double a) |
| Returns the sign of a. More... | |
| double | factorial (int n) |
| Returns the factorial of a. More... | |
| long long int | internal_factorial (long long int n) |
| Returns the factorial of a. More... | |
| int | compare (std::string_view a, std::string_view b) |
| bool | operator> (const std::string &a, const std::string &b) |
| bool | operator< (const std::string &a, const std::string &b) |
| bool | operator>= (const std::string &a, const std::string &b) |
| bool | operator<= (const std::string &a, const std::string &b) |
| std::vector< size_t > | range (size_t n) |
| std::vector< size_t > | range (size_t i, size_t n) |
| std::vector< size_t > | range (size_t i, size_t n, size_t step) |
| template<typename T > | |
| bool | comparePlaceIndependant (std::vector< T > A, std::vector< T > B) |
| Template function that compares the elements in two vectors A and B, independently on their order. More... | |
| template<typename T > | |
| bool | partialComparePlaceIndependant (std::vector< T > A, std::vector< T > B) |
| Template function that compares the elements in two vectors A and B, independently on their order, A can be bigger, this function determines if all elements in B are present in A. More... | |
| std::vector< std::vector< int > > | permutations (std::vector< int > init) |
| Gets all permutations (int the form of vectors of integers) of n elements, n beeing the size of init. The vector init must contain all integers between 0 and n-1. More... | |
| std::vector< Permutation > | permutations (const Permutation &init) |
| Gets all permutations (int the form of Permutation objects) of n elements, n beeing the size of init. More... | |
| void | reducePermutation (std::vector< Permutation > &permutation) |
| Takes a vector of Permutation objects and erase the redundant ones, i.e. the permutations present several times in the vector. More... | |
| std::vector< Permutation > | getSpan (const std::vector< Permutation > &init) |
| Calculates all permutations spanned by an ensemble of initial Permutations init. More... | |
| void | getSpan (std::vector< Permutation > &spanned, const Permutation &element) |
| This function adds an element in an already complete set of permutations. It assumes that the std::vector spanned is already complete by itself and modifies it by adding all the permutations spanned by itself and the new permutation element. More... | |
| template<class ... Args> | |
| std::shared_ptr< TensorFieldParent > | tensorfield_s (Args &&...args) |
| template<class ... Args> | |
| std::shared_ptr< TensorFieldParent > | tensorfield_s (std::string const &name, csl::Space const *spaceField, std::vector< const Space *> const &indices, Args &&...args) |
| template<typename ... Args> | |
| Expr | tensorfieldelement_s (Args &&...args) |
| Expr | tderivativeelement_s (const Tensor &t_vector, const Parent &t_parent, const Index &t_index) |
| Expr | tderivativeelement_s (const Tensor &t_vector, const Parent &t_parent, const Index &t_index, const Expr &t_operand, bool t_empty) |
| template<class ... Args> | |
| std::shared_ptr< TDerivativeParent > | tderivative_s (Args &&...args) |
| std::vector< Expr > | InverseTaylorExpand (Expr const &init, Expr const &big, size_t order) |
| std::vector< Expr > | TaylorExpand (Expr const &init, Expr const &eps, size_t order) |
| std::vector< Expr > | internal_TaylorExpand (Expr const &init, Expr const &eps, size_t order) |
| Expr | Copy (const Abstract *expr) |
| See Copy(const Expr& expr). More... | |
| Expr | CopySelf (Abstract *expr) |
| Expr | Copy (const Expr &expr) |
| Copy an Abstract to depth 1. More... | |
| Expr | DeepCopy (const Abstract *expr) |
| See DeepCopy(const Expr& expr). More... | |
| Expr | DeepCopy (const Expr &expr) |
| Copy an Abstract to the maximum depth. More... | |
| void | WeakDeepCopy (Expr &expr) |
| Expr | Refreshed (const Abstract *expr) |
| See Refreshed(const Expr& expr). More... | |
| Expr | Refreshed (const Expr &expr) |
| Refreshed an Abstract and apply basic simplifications. More... | |
| Expr | DeepRefreshed (const Expr &expr) |
| Refreshed recursively an Abstract and apply basic simplifications. More... | |
| void | Refresh (Expr &expr) |
| void | DeepRefresh (Expr &expr) |
| Expr | vector_s (int t_nElements) |
| Expr | vector_s (int t_nElements, const Expr &expr) |
| Expr | vector_s (int t_nElements, const Expr &expr, const Expr &index) |
| Expr | vector_s (const csl::vector_expr &t_argument) |
| Expr | vector_s (const std::initializer_list< Expr > &t_argument) |
| Expr | matrix_s (int t_nArgs) |
| Expr | matrix_s (int t_x_nArgs, int t_y_nArgs) |
| Expr | matrix_s (int t_x_nArgs, int t_y_nArgs, const Expr &expr, const Expr &index_x, const Expr &index_y) |
| Expr | matrix_s (int t_x_nArgs, int t_y_nArgs, const Expr &expr) |
| Expr | matrix_s (const csl::vector_expr &t_argument) |
| Expr | matrix_s (const std::initializer_list< std::initializer_list< Expr > > &t_matrix) |
| Expr | diagonal_s (const csl::vector_expr &diag) |
| Expr | identity_s (int dim) |
| Expr | highdtensor_s (const std::vector< int > &shape) |
| Expr | highdtensor_s (const std::vector< int > &shape, const Expr &filler) |
| Expr | highdtensor_s (const std::initializer_list< std::initializer_list< std::initializer_list< Expr > > > &t_tensor) |
| Expr | highdtensor_from_args_s (const std::vector< Expr > &args) |
| Expr | vectorialtensor_s (const std::vector< int > &shape) |
| Expr | vectorialtensor_s (const std::vector< int > &shape, const Expr &filler) |
| bool | compareString (std::string_view a, std::string_view b) |
| size_t | dichoFinder (csl::Expr const &expr, std::vector< AbstractParent *> const &v) |
| Expr | termWithoutExponent (Expr const &expr) |
| bool | operator== (const Expr &a, int b) |
| bool | operator!= (const Expr &a, int b) |
| bool | operator!= (const Expr &a, double b) |
| void | ForEachNode (std::vector< Expr > init, std::function< void(Expr &)> const &f, int depth) |
| void | ForEachLeaf (std::vector< Expr > init, std::function< void(Expr &)> const &f, int depth) |
| csl::vector_expr | applyProperties (const csl::vector_expr &alternateForms) |
| Expr | findCommonFactor (std::vector< Expr *> const &expressions) |
| ostream & | operator<< (ostream &fout, csl::Type type) |
| ostream & | operator<< (ostream &fout, csl::PrimaryType primaryType) |
| ostream & | operator<< (ostream &fout, const Equation &eq) |
| ostream & | operator<< (ostream &fout, cslEquation::Type type) |
| template<class ... T_Args> | |
| std::ostream & | operator<< (std::ostream &out, Functional< T_Args... > func) |
| int | matchBOnA (csl::Expr &B, std::vector< csl::Expr > const &tensorsInA, std::vector< csl::Expr > const &tensorsInB) |
| int | matchBOnA (csl::Expr const &A, csl::Expr &B) |
| int | isSuperFactor (Expr const &fL, Expr const &fR) |
| size_t | nSimilar (std::vector< size_t > const &sortedA, std::vector< size_t > const &sortedB) |
| size_t | maxSimilarity (std::vector< size_t > const &pos, csl::linear_map< csl::Expr, std::vector< size_t >> const &m) |
| FactorType const * | getBestFactor (csl::linear_map< csl::Expr, std::vector< size_t >> const &m) |
| std::pair< bool, bool > | hasRecursiveFactors (FactorType const *best, csl::linear_map< csl::Expr, std::vector< size_t >> const &m) |
| csl::linear_map< csl::Expr, std::vector< size_t > >::iterator | linear_find (csl::linear_map< csl::Expr, std::vector< size_t >> &m, csl::Expr const &expr) |
| ostream & | operator<< (ostream &fout, const Index &index) |
| ostream & | operator<< (ostream &fout, const IndexStructure &structure) |
| void | nameTensor (const string &name, Expr &tensor, bool first) |
| Expr | generateTensor (const string &name, const vector< const Space *> &spaces) |
| ostream & | operator<< (ostream &fout, const SelfContraction &c) |
| bool | isInContraction (std::vector< std::array< int, 4 >> const &contractions, int iTensor, int iIndex) |
| ostream & | operator<< (ostream &fout, const ContractionChain &c) |
| template<typename T > | |
| vector< pair< T, Expr > >::iterator | findContraction (typename vector< pair< T, Expr >>::iterator it, typename vector< pair< T, Expr >>::iterator last, T element) |
| template<typename T > | |
| vector< pair< T, Expr > >::const_iterator | findContraction (typename vector< pair< T, Expr >>::const_iterator it, typename vector< pair< T, Expr >>::const_iterator last, T element) |
| void | fillKeptIndices (vector< vector< vector< int >>> &keptIndices, vector< size_t >::const_iterator posBroken, vector< size_t >::const_iterator endPosBroken, vector< vector< int >> const &toInsert) |
| void | fillKeptIndices (vector< vector< vector< int >>> &keptIndices, vector< size_t >::const_iterator posBroken, vector< size_t >::const_iterator endPosBroken, vector< size_t > const &pieces) |
| void | fillNewSpaces (vector< vector< const Space *>> &newSpace, vector< size_t >::const_iterator posBroken, vector< size_t >::const_iterator endPosBroken, vector< const Space *> const &fillingSpace) |
| vector< vector< const Space * > > | fillNewSpaces (vector< const Space *> const &init, vector< size_t >::const_iterator posBroken, vector< size_t >::const_iterator endPosBroken, vector< const Space *> const &fillingSpace) |
| std::string | getBrokenName (std::string const &initName, std::vector< std::vector< int >> const &indices) |
| std::ostream & | operator<< (std::ostream &fout, const TensorParent &i) |
| void | fillStructures (vector< IndexStructure > &toFill, const vector< Index > &indices, vector< size_t >::const_iterator pos, vector< size_t >::const_iterator end, size_t iter=0) |
| void | clearNullIndices (vector< IndexStructure > &toClear) |
| void | uniformizeIndices (csl::vector_expr &terms) |
| void | keep_duplicates (vector< Index > &vec) |
| void | contract (Expr &arg1, Expr &arg2, csl::Index const &index1, csl::Index const &index2) |
| void | fillPosition (vector< vector< size_t >> &positions, size_t Nspaces) |
| Expr | getBrokenExpr (const Expr &init, const csl::vector_expr &brokenExpr, const vector< Index > &brokenIndices, const vector< Index > &replacement, const vector< size_t > &positions, const size_t Nspaces) |
| std::vector< Expr > | sumDummyIndices (std::vector< Expr > const &init, std::vector< std::vector< size_t >> const &posIndices, std::vector< size_t > const &dummyIndices) |
| void | sortIndices (std::vector< csl::Index > &indices, std::vector< size_t > &positions) |
| Expr | GetTransposed (const Expr &expression, const vector< const Space *> &spaces, bool applyProp) |
| Expr | GetHermitianConjugate (const Expr &expression, const vector< const Space *> &spaces) |
| csl::IndexStructure | getFullStructure (Expr const &expr) |
| bool | isTensorName (std::string_view name) |
| std::ostream & | operator<< (std::ostream &out, LibEval const &eval) |
| LibEval | findEvalDicho (int id, std::vector< LibEval >::const_iterator first, std::vector< LibEval >::const_iterator last) |
| LibEval | exprToEval (Expr const &expr, std::vector< LibEval > const &eval) |
| bool | independent (LibEval const &A, LibEval const &B) |
| size_t | getNLeafs (csl::Expr const &expr) |
| std::ostream & | operator<< (std::ostream &out, Structure const &s) |
| Expr | constant_s (string const &name, csl::ComplexProperty prop) |
| Expr | constant_s (string const &name, long double value, csl::ComplexProperty prop) |
| Expr | constant_s (string const &name, Expr const &value, csl::ComplexProperty prop) |
| Expr | variable_s (string const &name, csl::ComplexProperty prop) |
| Expr | variable_s (string const &name, long double value, csl::ComplexProperty prop) |
| Expr | variable_s (string const &name, Expr const &value, csl::ComplexProperty prop) |
| void | testSimplificationRule (std::vector< Expr > const &arg) |
| std::ostream & | operator<< (std::ostream &fout, const AbstractParent &parent) |
| bool | alreadyInChain (size_t pos, std::vector< ExpansionChain > const &chains) |
| csl::Expr const * | getEmitter (csl::Expr const &expr, ExpanderEmitter const &isEmitter) |
| bool | any_of (csl::Expr const *emi, csl::Expr const &rec, ExpanderReceiver const &isReceiver) |
| size_t | getNTerms (csl::Expr const &prod, ExpansionChain const &toExpand, ExpanderReceiver const &isReceiver) |
| csl::Expr | applyExpansion (csl::Expr const &prod, ExpansionChain const &toExpand, ExpanderEmitter const &isEmitter, ExpanderReceiver const &isReceiver, bool applyRecursively) |
| bool | hasCommonIndex (std::vector< size_t > const &sortedA, std::vector< size_t > const &sortedB) |
| bool | mergeChains (std::vector< ExpansionChain > &toExpand) |
| void | fillDigits (const vector< short > &digits, vector< short > &receiver) |
| ostream & | operator<< (ostream &fout, const PropertyList &props) |
| void | suppressTerm (Expr &init, Expr const &term) |
| void | MakeScalarIntegral (Expr &init) |
| void | convertScalarFuncType (const Abstract *expr, csl::Type &type) |
| bool | valueRule (const Abstract *A, const Abstract *B) |
| bool | complexRule (const Abstract *A, const Abstract *B) |
| bool | evalRule (const Abstract *A, const Abstract *B) |
| bool | alphaRule (const Abstract *A, const Abstract *B) |
| bool | mathRule (const Abstract *A, const Abstract *B) |
| bool | sumRule (const Abstract *A, const Abstract *sum) |
| bool | prodRule (const Abstract *A, const Abstract *prod) |
| bool | powRule (const Abstract *A, const Abstract *pow) |
| bool | sumRule_inverted (const Abstract *A, const Abstract *sum) |
| bool | prodRule_inverted (const Abstract *A, const Abstract *prod) |
| bool | powRule_inverted (const Abstract *A, const Abstract *pow) |
| bool | vectorialRule (const Abstract *A, const Abstract *B) |
| bool | ruleO1 (const Abstract *A, const Abstract *B) |
| bool | compareDuoArgs (const Expr &argA0, const Expr &argA1, const Expr &argB0, const Expr &argB1) |
| bool | ruleO2 (const Abstract *A, const Abstract *B) |
| bool | ruleO2_inverted (const Abstract *A, const Abstract *B) |
| bool | ruleO3 (const Abstract *A, const Abstract *B) |
| bool | ruleO4 (const Abstract *A, const Abstract *B) |
| bool | ruleO5 (const Abstract *A, const Abstract *B) |
| bool | ruleO6 (const Abstract *A, const Abstract *B) |
| bool | ruleO7 (const Abstract *A, const Abstract *B) |
| void | selectionSort (iterator first, iterator last) |
| void | sort (iterator first, iterator last) |
| void | mergeSort (iterator first, iterator last) |
| int | compare (string_view a, string_view b) |
| bool | operator> (const string &a, const string &b) |
| bool | operator< (const string &a, const string &b) |
| bool | operator>= (const string &a, const string &b) |
| bool | operator<= (const string &a, const string &b) |
| std::ostream & | operator<< (std::ostream &fout, const Permutation &permutation) |
| vector< vector< int > > | permutations (vector< int > init) |
| std::ostream & | operator<< (std::ostream &fout, const Symmetry &symmetry) |
| ostream & | operator<< (ostream &fout, const IndexedSymmetry &sym) |
| vector< list< int > > | getNonZeroElements_impl (Expr_info vec) |
| vector< vector< int > > | getNonZeroElements (Expr_info vec) |
| int | sort_keep_sign (typename std::vector< int >::iterator begin, typename std::vector< int >::iterator end) |
| Expr | matrix_s (const initializer_list< initializer_list< Expr > > &t_matrix) |
| Expr | highdtensor_s (const vector< int > &shape) |
| Expr | highdtensor_s (const vector< int > &shape, const Expr &filler) |
| Expr | highdtensor_from_args_s (const csl::vector_expr &t_argument) |
| Expr | highdtensor_s (const initializer_list< initializer_list< initializer_list< Expr > > > &t_tensor) |
Variables | |
| std::map< std::string, std::vector< AbstractParent * > > | abbreviationData |
| csl::allocator< TensorElement > | alloc_itensor |
| csl::allocator< ISum > | alloc_isum |
| csl::allocator< IProd > | alloc_iprod |
| csl::allocator< Constant > | alloc_constant |
| csl::allocator< Variable > | alloc_variable |
| csl::allocator< Integer > | alloc_integer |
| csl::allocator< Float > | alloc_float |
| csl::allocator< IntFraction > | alloc_intfraction |
| csl::allocator< Complex > | alloc_complex |
| csl::allocator< Sum > | alloc_sum |
| csl::allocator< Prod > | alloc_prod |
| csl::allocator< Pow > | alloc_pow |
| const int | maxMantisseSize = 64 |
| size_t | PRECISION = 100 |
| bool | WARN_OVERFLOW = false |
| template<class T , class U , class Type , class Type2 = Type> | |
| constexpr bool | canDecay_v = canDecay<T, U, Type, Type2>::value |
| bool | RANDOM_SEED = false |
| const int | NUMBER_OF_MUTATIONS = 7 |
| const int | NATURAL_SELECTION = 3 |
| const int | NUMBER_OF_GENERATION = 11 |
| const int | GENERATION_BEFORE_SELECTION = 5 |
| const int | SIMPLIFICATION_METHOD = 1 |
| Determines which simplification method is applied. Ther used to be 2, now there is only one method. It may be useful in the future. | |
| const int | MAX_ALTERNATE_FORMS = 10 |
| Maximum number of alternate forms given by getRecursiveAlternateForms(). When getting alternate forms of an expression, we keep only the MAX_ALTERNATE_FORMS simpler. | |
| const int | MAX_RECURSION_ALTERNATE = 7 |
| When getting alternateForms, we iterate MAX_RECURSION_ALTERNATE times (getting alternate forms of the alternate forms) in order to allow alternates that need several steps of Transformation. | |
| size_t | minMergeSize = 10 |
| Minimum size for a container to be sorted with mergeSort(). More... | |
| Expr | DMinko = csl::constant_s("D", csl::int_s(4)) |
| const Space & | Minkowski = buildMinkowski() |
Space with a metric g = diag(-1,1,1,1). | |
| Vector_alloc | alloc_expr |
Namespace for csl library.
| using csl::replacementRule = typedef std::function<std::optional<csl::Expr>(csl::Expr const&, bool)> |
Replacement rule prototype.
The function takes a constant expression as parameter and a boolean. If true, this boolean specifies that the rule is used only as a predicate for the moment i.e. that no calculation must be done in the return value (the optional will be used as a bool to know if a replacement must take place). If false, this function must return the result of the replacement in the std::optional<csl::Expr>. If no replacement is possible, return std::nullopt.
|
strong |
|
strong |
Stores enumerations of types for Abstract objects.
| Enumerator | |
|---|---|
| Numerical | = 0. Concerns Number and IntFraction. |
| Literal | = 1. Concerns Variable, IntFactorial and Imaginary. |
| MultiFunction | = 10. Concerns all scalar multi-variate functions (Sum, Prod, Pow, etc). |
| ScalarFunction | = 20. Concerns all scalar uni-variate functions (Exp, Log, Cos, etc). |
| Vectorial | = 50. Concerns Vector, Matrix and HighDTensor. |
| Indicial | = 60. Concerns all indicial exprs. |
| Field | = 70. Concerns all Fields exprs. |
|
strong |
Enum of the different types of Abstract (i.e. list of all possible specializations).
Type of Index.
| Enumerator | |
|---|---|
| NoType | |
| Integer | |
| Float | |
| IntFraction | Abstract specialized in IntFraction |
| IntFactorial | Abstract specialized in IntFactorial |
| Complex | |
| NumericalEval | Abstract specialized in NumericalEval |
| Imaginary | |
| Constant | |
| Variable | |
| Exp | |
| Log | |
| DiracDelta | Abstract specialized in Dirac Delta |
| Abs | |
| Cos | |
| Sin | |
| Tan | |
| Cosh | |
| Sinh | |
| Tanh | |
| ACos | |
| ASin | |
| ATan | |
| ACosh | |
| ASinh | |
| ATanh | |
| Scalar | |
| RealPart | Abstract specialized in real part. |
| ImaginaryPart | Abstract specialized in imaginary part. |
| TensorElement | Abstract specialized in TensorElement |
| ScalarField | Abstract specialized in ScalarField. |
| TensorFieldElement | Abstract specialized in TensorFieldElement. |
| StandardDuo | Abstract specialized in StandardDuo |
| StandardMult | Abstract specialized in StandardDuo |
| Pow | |
| Prod | |
| Sum | |
| Polynomial | Abstract specialized in Polynomial |
| Derivative | Abstract specialized in Derivative |
| Commutator | Abstract specialized in Commutator |
| Angle | |
| Factorial | |
| Integral | |
| ScalarIntegral | Abstract specialized in ScalarIntegral. |
| VectorIntegral | Abstract specialized in VectorIntegral. |
| Vector | |
| Matrix | |
| HighDTensor | Abstract specialized in HighDTensor |
Creates an object of type Abs acting on expr.
As all the outside-class functions, this one take into account the fact that the final object could not be an abs funtion. Then the return value is not an Abs object but something else, so we must implement a function that will create the good object. For example abs(1) returns 1 (a Number) and not abs(1) (an Abs).
| expr | Argment of the abs funtion function. |
Creates an object of type ACos acting on expr.
As all the outside-class functions, this one take into account the fact that the final object could not be an acosonential. Then the return value is not an ACos object but something else, so we must implement a function that will create the good object. For example acos(0) returns pi/2 (a Number) and not acos(0) (a ACos).
| expr | Argment of the acos function. |
Creates an object of type ACosh acting on expr.
As all the outside-class functions, this one take into account the fact that the final object could not be an acoshonential. Then the return value is not an ACosh object but something else, so we must implement a function that will create the good object. For example acosh(0) returns 1 (a Number) and not acosh(0) (a ACosh).
| expr | Argment of the acosh function. |
| void csl::addAlternateForm | ( | csl::vector_expr & | alternateForms, |
| const Expr & | newAlternate, | ||
| bool | add_factor_expand = true |
||
| ) |
Tried to add newAlternate in the set alternateForms. We simply test if the alternate is already present in the set newAlternate and add it if it is not the case. If add_factor_expand is set to true, we try to add the expanded and the factored forms of newAlternate.
| alternateForms | std::vector of expressions in which we add newAlternate. |
| newAlternate | Expression to add. |
| add_factor_expand | Boolean determining if we want to add also the factored and expanded versions of newAlternate. |
| bool csl::AllOfLeafs | ( | Expr const & | init, |
| std::function< bool(Expr const &)> const & | f, | ||
| int | depth = -1 |
||
| ) |
Tells if all of the leafs of an expression respect a certain condition given by the user.
If one of the leafs of init respects the condition f given by the user the function returns true. Else it returns false.
| init | Expression in which the function searches recursively. |
| f | std::function (can be a c++ lambda expression) taking an Expr const& as parameter and returning a boolean. |
| depth | Depth of recursion in the search (default = -1, full recursion). |
| bool csl::AllOfNodes | ( | Expr const & | init, |
| std::function< bool(Expr const &)> const & | f, | ||
| int | depth = -1 |
||
| ) |
Tells if all of the nodes of an expression respect a certain condition given by the user.
If one of the nodes of init respects the condition f given by the user the function returns true. Else it returns false.
| init | Expression in which the function searches recursively. |
| f | std::function (can be a c++ lambda expression) taking an Expr const& as parameter and returning a boolean. |
| depth | Depth of recursion in the search (default = -1, full recursion). |
| bool csl::AnyOfLeafs | ( | Expr const & | init, |
| std::function< bool(Expr const &)> const & | f, | ||
| int | depth = -1 |
||
| ) |
Tells if any of the leafs of an expression respect a certain condition given by the user.
If one of the leafs of init respects the condition f given by the user the function returns true. Else it returns false.
| init | Expression in which the function searches recursively. |
| f | std::function (can be a c++ lambda expression) taking an Expr const& as parameter and returning a boolean. |
| depth | Depth of recursion in the search (default = -1, full recursion). |
| bool csl::AnyOfNodes | ( | Expr const & | init, |
| std::function< bool(Expr const &)> const & | f, | ||
| int | depth = -1 |
||
| ) |
Tells if any of the nodes of an expression respect a certain condition given by the user.
If one of the nodes of init respects the condition f given by the user the function returns true. Else it returns false.
| init | Expression in which the function searches recursively. |
| f | std::function (can be a c++ lambda expression) taking an Expr const& as parameter and returning a boolean. |
| depth | Depth of recursion in the search (default = -1, full recursion). |
| void csl::ApplyChainProperty | ( | Expr & | init, |
| csl::Tensor & | tensor, | ||
| std::vector< Expr > const & | prod, | ||
| Expr const & | res | ||
| ) |
Declares a chain contraction property just the time of a refresh in order to apply it on one expression.
| init | Expression on which we apply the property. |
| tensor | Indicial tensor that has the property. |
| prod | Tensors in the contraction. |
| res | Result of the contraction. |
| void csl::ApplySelfProperty | ( | Expr & | init, |
| csl::Tensor & | tensor, | ||
| Expr const & | A, | ||
| Expr const & | B, | ||
| Expr const & | res | ||
| ) |
Declares a self contraction property just the time of a refresh in order to apply it on one expression.
| init | Expression on which we apply the property. |
| tensor | Indicial tensor that has the property. |
| A | First tensor in the contraction. |
| B | Second tensor in the contraction. |
| res | Result of the contraction. |
| void csl::applyThroughAbbreviations | ( | csl::Expr & | expr, |
| replacementRule const & | rule | ||
| ) |
Applies a replacement rule thoughout an expression, also entering abbreviations and replacing them if a replacement is found.
| expr | Expression in which the replacement takes place. |
| rule | Rule for the replacement. |
Creates an object of type ASin acting on expr.
As all the outside-class functions, this one take into account the fact that the final object could not be an asin. Then the return value is not an ASin object but something else, so we must implement a function that will create the good object. For example asin(0) returns 0 (a Number) and not asin(0) (an ASin).
| expr | Argment of the asin function. |
Creates an object of type ASinh acting on expr.
As all the outside-class functions, this one take into account the fact that the final object could not be an asinh. Then the return value is not an ASinh object but something else, so we must implement a function that will create the good object. For example asinh(0) returns 0 (a Number) and not asinh(0) (an ASinh).
| expr | Argment of the asinh function. |
Creates an object of type ATan acting on expr.
As all the outside-class functions, this one take into account the fact that the final object could not be an atan. Then the return value is not an ATan object but something else, so we must implement a function that will create the good object. For example atan(0) returns 0 (a Number) and not atan(0) (a ATan).
| expr | Argment of the atan function. |
Creates an object of type ATanh acting on expr.
As all the outside-class functions, this one take into account the fact that the final object could not be an atanh. Then the return value is not an ATanh object but something else, so we must implement a function that will create the good object. For example atanh(0) returns 0 (a Number) and not atanh(0) (a ATanh).
| expr | Argment of the atanh function. |
|
inline |
Displays an error message depending on the error error, the name of the caller function caller and a possible specificity of the error spec. For example spec is the index for OutOfBound error. This function stops the program.
| error | The type of error. |
| caller | The caller function. |
| spec | A printable specificity of the error. |
|
inline |
Displays a warning message depending on the warning warning, the name of the caller function caller and a possible specificity of the warning spec. For example spec is the dimension for InvalidDimension error. This function does not stop the program.
| warning | The type of warning. |
| caller | The caller function. |
| spec | A printable specificity of the warning. |
| bool csl::CheckValidity | ( | Expr const & | init, |
| std::vector< Expr_info > | encountered = std::vector<Expr_info>() |
||
| ) |
Checks the validity of an expression.
Browses the whole expression and checks that every node of the tree is valid (!= nullptr).
| init | Expression to check. |
| encountered | List of expressions already checked. Should not be given by the user in general. |
| void csl::clearRedundancyAlternate | ( | csl::vector_expr & | alternateForms | ) |
Search and remove redundancies (equal alternate forms) in alternateForms.
| alternateForms | std::vector of expressions to reduce. |
Returns the result of the (anit-)commutation of A and B. In most cases it returns CSL_0, and returns CSL_UNDEF else. Useful to test if two objects commute.
| A | Left hand side. |
| B | Right hand side. |
| sign | Sign of the commutator, -1 for commutation (default), 1 for anti-commutation. |
Tries to create a Commutator object of A and B of sign sign.
If the result is CSL_0, this function returns CSL_0. If A and/or B are products, the functions expands the give at the end a more complicated expression but with just (anti-)commutators of single elements, expressions of type [{E,F}] with E and F neither sums nor products.
| A | Left hand side of the Commutator. |
| B | Right hand side of the Commutator. |
| t_sign | Sign of the Commutator. |
| bool csl::comparePlaceIndependant | ( | std::vector< T > | A, |
| std::vector< T > | B | ||
| ) |
Template function that compares the elements in two vectors A and B, independently on their order.
| T | Type of data, must have a well-defined operator==. |
| A | Left hand side. |
| B | Right hand side. |
Copy an Abstract to depth 1.
Copy the depth 0 structure. For example the copy of cos(x+exp(y)) creates another cos function but take a reference to x+exp(y). Note that copy a Variable will create another with the same name. It could create misunderstanding in the following operations.
| expr | Abstract to copy. |
Creates an object of type Cos acting on expr.
As all the outside-class functions, this one take into account the fact that the final object could not be an cosonential. Then the return value is not an Cos object but something else, so we must implement a function that will create the good object. For example cos(0) returns 1 (a Number) and not cos(0) (a Cos).
| expr | Argment of the cos function. |
Creates an object of type Cosh acting on expr.
As all the outside-class functions, this one take into account the fact that the final object could not be an coshonential. Then the return value is not an Cosh object but something else, so we must implement a function that will create the good object. For example cosh(0) returns 1 (a Number) and not cosh(0) (a Cosh).
| expr | Argment of the cosh function. |
See DeepCopy(const Expr& expr).
Refreshed recursively an Abstract and apply basic simplifications.
Apply all simplifications that take place normally at the creation of an Abstract. For example, a sum with only one term gives just the term in question. The refresh is resursive.
| expr | The Abstract to refresh. |
Returns the derivative of leftOperand wrt rightOperand, applying basic simplifications.
This function possibly returns an object different from a Derivative object if the simplification requires so.
| leftOperand | Left operand. |
| rightOperand | Right operand. |
| order | Order of derivation. |
| Iterator csl::dichotomyFindIf | ( | Iterator | first, |
| Iterator | last, | ||
| Comparator && | f | ||
| ) |
Template dichotomy algorithm using a comparator.
For the insertion of an element e, the comparator given must take one argument (of the same type as the range's elements) and return +1 if the element to insert is simpler than the argument, -1 if it is less simple, and 0 otherwise.
| Iterator | Iterator type. |
| Comparator | Comparator type. |
| first | First iterator in the range. |
| last | Last iterator in the range. |
| f | Comparator function. |
Creates an object of type Exp acting on expr.
As all the outside-class functions, this one take into account the fact that the final object could not be an exponential. Then the return value is not an Exp object but something else, so we must implement a function that will create the good object. For example exp(0) returns 1 (a Number) and not exp(0) (an Exp).
| expr | Argment of the exponential function. |
| double csl::factorial | ( | int | n | ) |
Returns the factorial of a.
| a |
| Expr csl::FindIfLeaf | ( | Expr const & | init, |
| std::function< bool(Expr const &)> const & | f, | ||
| size_t | depth = -1 |
||
| ) |
Searches and returns an expression in another.
If one of the leafs of init compares to value successfully using the condition f given by the user the function returns it. Else it returns nullptr. Beware that in this case the result is invalid.
| init | Expression in which the function searches. |
| f | std::function (can be a c++ lambda expression) taking an Expr as parameter and returning a boolean. |
| depth | Depth of recursion in the search (default = -1, full recursion). |
| Expr csl::FindIfNode | ( | Expr const & | init, |
| std::function< bool(Expr const &)> const & | f, | ||
| size_t | depth = -1 |
||
| ) |
Searches and returns an expression in another.
If one of the nodes of init compares to value successfully using the condition f given by the user the function returns it. Else it returns nullptr. Beware that in this case the result is invalid.
| init | Expression in which the function searches. |
| f | std::function (can be a c++ lambda expression) taking an Expr as parameter and returning a boolean. |
| depth | Depth of recursion in the search (default = -1, full recursion). |
Searches and returns an expression in another.
If one of the leafs of init compares to value successfully the function returns it. Else it returns nullptr. Beware that in this case the result is invalid.
| init | Expression in which the function searches. |
| value | Sub-expression to find. |
| depth | Depth of recursion in the search (default = -1, full recursion). |
Searches and returns an expression in another.
If one of the nodes of init compares to value successfully the function returns it. Else it returns nullptr. Beware that in this case the result is invalid.
| init | Expression in which the function searches. |
| value | Sub-expression to find. |
| depth | Depth of recursion in the search (default = -1, full recursion). |
Tells if any of the leafs of an expression respect a certain condition given by the user. The condition function may apply on the go on the expression found.
If one of the leafs of init respects the condition f given by the user the function returns true. Else it returns false. Once one node has been found, the function stops completely.
| init | Expression in which the function searches recursively. |
| f | std::function (can be a c++ lambda expression) taking an Expr& as parameter and returning a boolean. May modify the content of the expression. |
Tells if any of the nodes of an expression respect a certain condition given by the user. The condition function may apply on the go on the expression found.
If one of the nodes of init respects the condition f given by the user the function returns true. Else it returns false. Once one node has been found, the function stops completely.
| init | Expression in which the function searches recursively. |
| f | std::function (can be a c++ lambda expression) taking an Expr& as parameter and returning a boolean. May modify the content of the expression. |
Applies a user function on each leaf of an expression. The expression may be modified.
This algorithm browses the whole expression applying f to each leaf. If the user function f does not modify the leafs, consider using VisitEachLeaf() instead.
| init | Expression to browse. |
| f | std::function (can be a c++ lambda expression) taking an Expr& (may or may not modify it) as parameter. |
| depth | Depth of recursion in the search (default = -1, full recursion). |
Applies a user function on each node of an expression. The expression may be modified.
This algorithm browses the whole expression applying f to each node. If the user function f does not modify the nodes, consider using VisitEachNode() instead.
| init | Expression to browse. |
| f | std::function (can be a c++ lambda expression) taking an Expr& (may or may not modify it) as parameter. |
| depth | Depth of recursion in the search (default = -1, full recursion). |
Applies a user function on each node of an expression. The expression may be modified.
This algorithm browses the whole expression applying f to each node. If the user function f does not modify the nodes, consider using VisitEachNodeCut() instead. The user function must return a boolean. If true, the algorithm stops on the node (other branches are still explored).
| init | Expression to browse. |
| f | std::function (can be a c++ lambda expression) taking an Expr& (may or may not modify it) as parameter. Must return a boolean that tells if the algorithm must stop to search in that branch, if that boolean is true. |
| depth | Depth of recursion in the search (default = -1, full recursion). |
Returns the fraction of the two operands, applying basic simplifications.
This function possibly returns an object different from a Fraction object if the simplification requires so. For example 1/(x^(-1)) -> x that is a Variable.
| leftOperand | Left operand. |
| rightOperand | Right operand. |
Generates a tensor of name name that lives in a list of spaces, filled with variables given by nameTensor().
| name | Name of the tensor. |
| spaces | List of spaces in which the tensor lives (just to get the dimensions). |
| csl::vector_expr csl::getRecursiveAlternateForms | ( | const Expr & | expr, |
| int | depth = -1 |
||
| ) |
Returns the alternate forms of expr by applying recursively internalRecursiveAlternateForms() MAX_RECURSION_ALTERNATE times: take alternates, then alternates of the alternates etc.
| expr | Expression from which we search alternates. |
| depth | Recursion depth transmitted to internalRecursiveAlternateForms(). |
| std::vector< Permutation > csl::getSpan | ( | const std::vector< Permutation > & | init | ) |
Calculates all permutations spanned by an ensemble of initial Permutations init.
| init | Initial permutations in a std::vector of Permutation. |
| void csl::getSpan | ( | std::vector< Permutation > & | spanned, |
| const Permutation & | element | ||
| ) |
This function adds an element in an already complete set of permutations. It assumes that the std::vector spanned is already complete by itself and modifies it by adding all the permutations spanned by itself and the new permutation element.
| spanned | Initial set of Permutation objects, must be already complete. It is modified during the call of the function. |
| element | Permutation to add. |
| bool csl::hasWeakDependency | ( | csl::Expr const & | expr, |
| std::function< bool(csl::Expr const &)> const & | predicate | ||
| ) |
Search for a true value for a given predicate in an expression, considering also sub-expressions encapsulated by abbreviations.
| expr | The expression in which the search is done. |
| predicate | Boolean predicate. |
| long long int csl::internal_factorial | ( | long long int | n | ) |
Returns the factorial of a.
| a |
| int csl::internal_PGCD | ( | long long int | a, |
| long long int | b | ||
| ) |
Returns the PGCD of a and b.
This function is called only by PGCD(int a, int b) that do the nexessary checks on a and b before the calculation. Then the algorithm implemented in internal_PGCD() is Euclid's (recursive). The separation of the cjeck function PGCD() and the calculation function internal_PGCD() allows to check only once a and b since the algorithm is recursive.
| a | |
| b |
| csl::vector_expr csl::internalRecursiveAlternateForms | ( | const Expr & | expr, |
| int | depth = -1 |
||
| ) |
Calculates and return all alternate forms of expr, by getting (once) alternate forms of the possible arguments of expr, and then the specific alternates of expr.
| expr | Expression from which we get alternate forms. |
| depth | Recursion depth (default = -1, we take the alternate forms of all the recursion tree). |
| Expr csl::intfactorial_s | ( | int | value | ) |
| value | Initializer of the IntFactorial. |
Creates an object of type Log acting on expr.
As all the outside-class functions, this one take into account the fact that the final object could not be an logarithm. Then the return value is not an Log object but something else, so we must implement a function that will create the good object. For example log(1) returns 0 (a Number) and not log(1) (a Log).
| expr | Argment of the logarithm function. |
| size_t csl::MemorySizeOf | ( | Expr const & | expression | ) |
Calculates an estimate of the total memory that an expression takes.
This function is not exact. It should be extended. The problem is that it is not possible for class with pointers to determine automatically the size of all elements and pointed elements. It has to be hard coded. This function ignores all pointed elements that are not accessible by the Abstract::getArgument() function.
| expression | Expression from which we measure the size. |
| void csl::mergeSort | ( | std::vector< Expr > & | argument | ) |
Applies the merge sort algorithm
on a container.
This function is recursive, calling a merge sort on parts of the container. Once the size of these parts are bellow minMergeSize, selectionSort() is called instead. For std::shared_ptr (the case for the Expr type) the optimal size is around 10. This means that with less than 10 elements, selectionSort() is still faster that mergeSort(). Above, the
complexity of mergeSort() is of course better and better with large
.
| argument | Container to sort. |
Applies the merge sort algorithm
on a container.
This function is recursive, calling a merge sort on parts of the container. Once the size of these parts are bellow minMergeSize, selectionSort() is called instead. For std::shared_ptr (the case for the Expr type) the optimal size is around 10. This means that with less than 10 elements, selectionSort() is still faster that mergeSort(). Above, the
complexity of mergeSort() is of course better and better with large
.
| first | Iterator pointing to the first element (.begin()). |
| last | Iterator pointing to the last element (.end()). |
Returns the sum of the two operands (with a minus sign), applying basic simplifications.
This function possibly returns an object different from a Sum object if the simplification requires so. For example 0+x -> x that is a Variable. The Minus object does not exists, this function applies leftOperand + (-1*rightOperand).
| leftOperand | Left operand. |
| rightOperand | Right operand. |
| void csl::nameTensor | ( | const std::string & | name, |
| Expr & | tensor, | ||
| bool | first = true |
||
| ) |
Fills an tensor with variables of the same name with the numbers correponding to their place in the tensor. Allows for example to name elements of a vector
:
.
The parameter first is due to the recursive nature of the function. It allows to know if the call of nameTensor() is the user's (first = true) or from another nameTensor()'s call (first = false). This parameter should then not be given by the user, but let to its default value true.
| std::ostream& csl::operator<< | ( | std::ostream & | fout, |
| csl::Type | type | ||
| ) |
Displays the name of a given csl::Type in order to be readable.
| fout | Out stream in which the type is send. |
| type | Type to display. |
| std::ostream& csl::operator<< | ( | std::ostream & | fout, |
| csl::PrimaryType | primaryType | ||
| ) |
Displays the name of a given csl::PrimaryType in order to be readable.
| fout | Out stream in which the type is send. |
| type | PrimaryType to display. |
| std::ostream& csl::operator<< | ( | std::ostream & | fout, |
| const Permutation & | permutation | ||
| ) |
| fout | Output flux. |
| permutation | Permutation to diplay. |
| std::ostream& csl::operator<< | ( | std::ostream & | fout, |
| const Symmetry & | symmetry | ||
| ) |
| fout | Output flux. |
| permutation | Symmetry to diplay. |
| std::ostream& csl::operator<< | ( | std::ostream & | fout, |
| const AbstractParent & | parent | ||
| ) |
std::ostream& operator<<(std::ostream& fout , const AbstractParent& p)
| std::ostream& csl::operator<< | ( | std::ostream & | fout, |
| const TensorParent & | i | ||
| ) |
std::ostream& operator<<(std::ostream& fout, const TensorParent& p)
| bool csl::partialComparePlaceIndependant | ( | std::vector< T > | A, |
| std::vector< T > | B | ||
| ) |
Template function that compares the elements in two vectors A and B, independently on their order, A can be bigger, this function determines if all elements in B are present in A.
| T | Type of data, must have a well-defined operator==. |
| A | Left hand side. |
| B | Right hand side. |
| std::vector<std::vector<int> > csl::permutations | ( | std::vector< int > | init | ) |
Gets all permutations (int the form of vectors of integers) of n elements, n beeing the size of init. The vector init must contain all integers between 0 and n-1.
| init | Initial set of n integers. |
| vector< Permutation > csl::permutations | ( | const Permutation & | init | ) |
Gets all permutations (int the form of Permutation objects) of n elements, n beeing the size of init.
| init | Initial Permutation of n elements, can be identity. |
| int csl::PGCD | ( | double | a, |
| double | b | ||
| ) |
Returns the PGCD of a and b.
If a and b are integers ( a == floor(a) and also for b) this function calls PGCD(int a, int b).
| a | |
| b |
| long long int csl::PGCD | ( | long long int | a, |
| long long int | b | ||
| ) |
Returns the PGCD of a and b.
Proceeds to verifications on a and b (sign, non zero, etc) and calls internal_PGCD(int a, int b) if everythiong is Ok.
| a | |
| b |
Returns the exponentiation of the two operands, applying basic simplifications.
This function possibly returns an object different from a Pow object if the simplification requires so. For example x^1 -> x that is a Variable.
| leftOperand | Left operand. |
| rightOperand | Right operand. |
| void csl::printVector | ( | const csl::vector_expr & | vector | ) |
Display a vector of expressions. Useful in debug.
| vector | std::vector of expressions to display. |
Returns the product of the two operands, applying basic simplifications.
This function possibly returns an object different from a Prod object if the simplification requires so. For example 1*x -> x that is a Variable.
| leftOperand | Left operand. |
| rightOperand | Right operand. |
| explicitProd | If true Prod::mergeTerms() is not called and no simplification is done concerning the reordering/merging of terms. |
| void csl::reduceAlternate | ( | csl::vector_expr & | alternateForms | ) |
Reduces the number of elements in alternateForms to MAX_ALTERNATE_FORMS.
| alternateForms | std::vector of expressions to reduce. |
| void csl::reducePermutation | ( | std::vector< Permutation > & | permutation | ) |
Takes a vector of Permutation objects and erase the redundant ones, i.e. the permutations present several times in the vector.
| permutation | std::vector of Permutation to reduce (modified during the call of the function). |
See Refreshed(const Expr& expr).
|
inline |
Converts a replacementRule into a predicate.
| rule | The replacement rule to convert. |
| void csl::selectionSort | ( | std::vector< Expr > & | argument | ) |
Applies the selection sort algorithm
on a container.
| argument | Container to sort. |
Applies the selection sort algorithm
on a container.
| first | Iterator pointing to the first element (.begin()). |
| last | Iterator pointing to the last element (.end()). |
| long long int csl::sgn | ( | long long int | a | ) |
Returns the sign of a.
| a |
| int csl::sgn | ( | double | a | ) |
Returns the sign of a.
| a |
Simplifies expr depending on its type.
| expr | Expression to reduce. |
| depth | Depth of simplification. Default=1: max depth. |
Creates an object of type Sin acting on expr.
As all the outside-class functions, this one take into account the fact that the final object could not be an sin. Then the return value is not an Sin object but something else, so we must implement a function that will create the good object. For example sin(0) returns 0 (a Number) and not sin(0) (an Sin).
| expr | Argment of the sin function. |
Creates an object of type Sinh acting on expr.
As all the outside-class functions, this one take into account the fact that the final object could not be an sinh. Then the return value is not an Sinh object but something else, so we must implement a function that will create the good object. For example sinh(0) returns 0 (a Number) and not sinh(0) (an Sinh).
| expr | Argment of the sinh function. |
| void csl::sort | ( | std::vector< Expr > & | argument | ) |
Sorts a container using mergeSort().
| argument | Container to sort. |
Sorts a container using mergeSort().
| first | Iterator pointing to the first element (.begin()). |
| last | Iterator pointing to the last element (.end()). |
Creates an object of type Tan acting on expr.
As all the outside-class functions, this one take into account the fact that the final object could not be an tan. Then the return value is not an Tan object but something else, so we must implement a function that will create the good object. For example tan(0) returns 0 (a Number) and not tan(0) (a Tan).
| expr | Argment of the tan function. |
Creates an object of type Tanh acting on expr.
As all the outside-class functions, this one take into account the fact that the final object could not be an tanh. Then the return value is not an Tanh object but something else, so we must implement a function that will create the good object. For example tanh(0) returns 0 (a Number) and not tanh(0) (a Tanh).
| expr | Argment of the tanh function. |
Applies a user function on each node of an expression. The expression may be modified. If it is, the expression is refreshed.
This algorithm browses the whole expression applying f to each node. The user function must return true if the expression has to be refreshed after the transformation, false else. If you do not want to refresh the expression (powerful but heavy) consider using ForEachNode() instead.
| init | Expression to browse. |
| f | std::function (can be a c++ lambda expression) taking an Expr& (may or may not modify it) as parameter. Must return a boolean, true if the expression requires a refresh after the call, false else. |
| depth | Depth of recursion in the search (default = -1, full recursion). |
| void csl::VisitEachLeaf | ( | Expr const & | init, |
| std::function< void(Expr const &)> const & | f, | ||
| int | depth = -1 |
||
| ) |
Visits all leafs of an expression, applying a function on it without modifying it.
This algorithm browses all the leafs of init applying f each time.
| init | Expression to browse. |
| f | std::function (can be a c++ lambda expression) taking an Expr const& as parameter and returning nothing. |
| depth | Depth of recursion in the search (default = -1, full recursion). |
| void csl::VisitEachNode | ( | Expr const & | init, |
| std::function< void(Expr const &)> const & | f, | ||
| int | depth = -1 |
||
| ) |
Visits all nodes of an expression, applying a function on it without modifying it.
This algorithm browses the whole expression applying f to each node.
| init | Expression to browse. |
| f | std::function (can be a c++ lambda expression) taking an Expr const& as parameter and returning nothing. |
| depth | Depth of recursion in the search (default = -1, full recursion). |
| void csl::VisitEachNodeCut | ( | Expr const & | init, |
| std::function< bool(Expr const &)> const & | f, | ||
| int | depth = -1 |
||
| ) |
Visits all nodes of an expression, applying a function on it without modifying it. When the user function returns true on one node, the underlying branch (if there is) is not explored.
This algorithm browses the whole expression applying f to each node. The user function must return a boolean. If true, the algorithm stops on the node (other branches are still explored).
| init | Expression to browse. |
| f | std::function (can be a c++ lambda expression) taking an Expr const& as parameter and returning a boolean telling if the algorithm must stop on that branch. |
| depth | Depth of recursion in the search (default = -1, full recursion). |
Returns the result of the (anit-)commutation of A and B. In most cases it returns CSL_0, and returns CSL_UNDEF else. Useful to test if two objects commute. In the special of this function, A is an object that is not commutable (attribute Abstract::commutable) and B is commutable.
| A | Left hand side. |
| B | Right hand side. |
| sign | Sign of the commutator, -1 for commutation (default), 1 for anti-commutation. |
|
inline |
Minimum size for a container to be sorted with mergeSort().
For smaller containers, selectionSort() is called instead, even trying to use specifically mergeSort().
1.8.13