An Operator with additional information about its commutativity etc.

Operators have a number of properties:

  • A symbol or name of the operator "+".
  • The number of arguments NO_ARGS 0, UNARY 1 (e.g. UMINUS -x), BINARY 2 (e.g. x+y), and NARY either 3 ( a>b ? a : b) or unspecified like a list [x,y,z,w].
  • The binding of the operator, LEFT 1+2+3 -> (1+2)+3 or RIGHT 1=2=3 -> 1=(2=3).
  • Whether the operator is ASSOCIATIVE or COMMUTATIVE.
  • The precedence of the operators + has a higher precedence than *.
  • For unary operators they can either be PREFIX like -x or SUFFIX like x%.
  • Comparative operators can be REFLEXIVE, SYMMETRIC, TRANSITIVE or EQUIVALENCE which has all three properties.
  • A reference to a PostfixtMathCommandI object which is used to evaluate an equation containing the operator.
Various is... and get... methods are provided to query the properties of the operator.

Namespace:  SingularSys.Jep
Assembly:  Jep (in Jep.dll) Version: (1.0.0)


public class Operator
Visual Basic (Declaration)
<SerializableAttribute> _
Public Class Operator
Visual C++
public ref class Operator


Original Author (java version): Rich Morris (19-Oct-2003). Ported to C#: Daniel Funk (May-2009)

Inheritance Hierarchy

See Also