Function sequant::operator==(const Context&, const Context&)¶
Defined in File context.cpp
Function Documentation¶
-
bool sequant::operator==(const Context &ctx1, const Context &ctx2)¶
Context object equality comparison
Note
index basis registries and cardinal tensor labels are compared by value (contexts without a registry are equal in that respect), the registries including the dimensions and fields of their spaces; tensor canonicalizers and index comparers by identity, hence a comparer replaced by a behaviourally identical one compares unequal (re-install a comparer through its shared pointer, e.g. Context::index_comparer_ptr(), to keep contexts equal)
Note
the versions of the contexts are ignored, and equal contexts may have different ones: Context::version() compares index basis registries as objects, not by value
- Parameters:
ctx1 –
ctx2 –
- Returns:
true if
ctx1andctx2are equal