weldx.core.MathematicalExpression.equals#

MathematicalExpression.equals(other, check_parameters=True, check_structural_equality=False)#

Compare the instance with another object for equality and return the result.

If the other object is not a MathematicalExpression this function always returns ‘False’. The function offers the choice to compare for structural or mathematical equality by setting the ‘structural_expression_equality’ parameter accordingly. Additionally, the comparison can be limited to the expression only, if ‘check_parameters’ is set to ‘False’.

Parameters:
  • other (Any) – Arbitrary other object.

  • check_parameters (bool) – Set to ‘True’ if the parameters should be included during the comparison. If ‘False’, only the expression is checked for equality.

  • check_structural_equality (bool) – Set to ‘True’ if the expression should be checked for structural equality. Set to ‘False’ if mathematical equality is sufficient.

Returns:

‘True’ if both objects are equal, ‘False’ otherwise

Return type:

bool