Class LexicographicExprCompare

Class Documentation

class LexicographicExprCompare

Strict weak order of expressions based on Expr::lexicographic_compare, i.e. on their contents rather than their hash values. Hence, unlike the (faster) order defined by Expr::operator< , it does not change when the hashing algorithm changes.

Note

the comparison options (in particular the cardinal tensor labels) are captured on construction

Public Functions

inline LexicographicExprCompare()

uses LexicographicCompareOptions::from_default_context()

inline explicit LexicographicExprCompare(LexicographicCompareOptions opts)
inline std::weak_ordering compare(const Expr &a, const Expr &b) const
Returns:

the order of a relative to b

inline bool operator()(const Expr &a, const Expr &b) const
Returns:

true if a precedes b

inline bool operator()(const ExprPtr &a, const ExprPtr &b) const
Returns:

true if a precedes b

inline const LexicographicCompareOptions &options() const