Function sequant::is_valid(const Expr&, std::string *)

Function Documentation

bool sequant::is_valid(const Expr &expr, std::string *msg)

Checks whether the given expression is valid (i.e. uses consistent indexing etc.)

Parameters:
  • expr – The expression to validate

  • msg – If given, the function will set the string to a message describing why the provided expression is considered to be invalid. If the expression is valid, the string will be left unchanged.

Returns:

The validity of the expression