IPrimitive<T> Interface

Expression component which contains child expression components of type T.

Definition

Namespace: SMath.Manager
Assembly: SMath.Manager (in SMath.Manager.dll) Version: 1.73.9126.0
C#
public interface IPrimitive<T> : IPrimitive
where T : IPrimitive
Implements
IPrimitive

Type Parameters

T
Type of the child expression component.

Properties

ArgsCount Number of children of the expression component. Can get values:
  • "0" - for the Operand;
  • "1" - for the Bracket;
  • "1" or "2" - for the Operator;
  • More then "1" or equal - for the Function.

(Inherited from IPrimitive)
Items Child items of the expression component.
Text Text value of the expression component.
(Inherited from IPrimitive)
Type Type of the expression component.
(Inherited from IPrimitive)

Methods

ToRevertedList

Retrieves the list of primitives in reverse order. It is guaranteed that recursion is not used.

  Tip

This method may be a bit slower than ToTermsList() and the resulting list has reverted order of items but it does not use recursion which prevents from StackOverflowException. This method is strongly recommended for complex expressions.

ToTermsList Converts the expression component to a list of terms in straight order.

See Also