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...
#include <comparison.h>
|
|
static bool | freeIndexComparisonActive = false |
| | Tells if the index comparison is active or not. If true, two different indices (even free indices) can be equal. This is useful for comparing structures, independently of the names of the indices.
|
| |
|
static std::map< Index, Index > | indexCorrespondance = std::map<Index,Index>() |
| | Correspondance between indices during the comparison. Allows to keep track of all index comparisons we have done when the indices were not equal.
|
| |
|
static bool | dummyVecIntComparisonActive = false |
| |
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.
◆ compare()
| bool csl::Comparator::compare |
( |
const Index & |
A, |
|
|
const Index & |
B |
|
) |
| |
|
static |
Compares two indices. Depends on the bare comparison and the possible maps existing for the two indices.
- Parameters
-
| A | First index. |
| B | Second index. |
- Returns
- The result of the comparison.
◆ dummy()
◆ dummyComparison()
Compares a regular expression to an expression containing Arbitrary objects.
- Parameters
-
| expr | Regular expression, in the form of a **const Abstract*** so that it can be called by an object with itself in parameter in a const method. |
| dummyExpr | Expression containing Arbitrary objects. |
- Returns
- The result of the comparison.
◆ dummyName()
| string csl::Comparator::dummyName |
( |
| ) |
|
|
static |
- Returns
- The string that is given as a name to all Arbitrary objects in the program.
◆ freeIndexComparison()
Compares two expressions considering that the index structures must match no matter the names of free indices.
- Parameters
-
| A | First expression in the form of a **const Abstract*** so that it can be called by an object with itself in parameter in a const method. |
| B | Second expression. |
◆ getDummyComparisonActive()
| static bool csl::Comparator::getDummyComparisonActive |
( |
| ) |
|
|
inlinestatic |
- Returns
- dummyComparisonActive.
◆ getFreeIndexComparisonActive()
| static bool csl::Comparator::getFreeIndexComparisonActive |
( |
| ) |
|
|
inlinestatic |
- Returns
- freeIndexComparisonActive.
◆ setDummyComparisonActive()
| void csl::Comparator::setDummyComparisonActive |
( |
bool |
state | ) |
|
|
static |
- Parameters
-
| state | Boolean that will replace dummyComparisonActive. |
The documentation for this class was generated from the following files: