MItem Class

Symbolic representation of a mathematical expression.

Definition

Namespace: SMath.Math.Symbolic
Assembly: SMath.Math.Symbolic (in SMath.Math.Symbolic.dll) Version: 1.73.9126.0
C#
public class MItem : IPrimitive<MItem>, 
	IPrimitive
Inheritance
Object    MItem
Derived
Implements
IPrimitive, IPrimitiveMItem

Constructors

MItem(Double) Automatically supports positive and negative values.
MItem(MItem) Math element constructor. Copies existing element content.
MItem(Double, Boolean, Boolean) Math element constructor. Copies existing element content.
MItem(MItem, Boolean, Boolean) Math element constructor. Copies existing element content.
MItem(MItem, String, NullableDouble, TermType, Boolean, Boolean) Math element constructor.

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.
Inverse Flag indicating the inverse element.
Item Element by its ordinal number.
Items Dependent elements of the current mathematical element.
Negative Sign of a mathematical element.
Text Text value of the expression component.
Type Type of the expression component.
Value Arithmetic value of the object.

Methods

ContainsSymbolicEntries Determines if current mathematical expression contains undefined variables.
ContainsUnits Checking a symbolic mathematical expression for the presence of units of measurement in it.
ContainsVariable Determines whether an expression contains any variable.
ContainsVariable(ListMItem) Checking a symbolic mathematical expression for the presence of variables in it.
Create(MItem) Creating a mathematical element depending on its content. An element of the class inherited from MItem is created if possible.
Create(MItem, String, NullableDouble, TermType, Boolean, Boolean) Creating a mathematical element depending on its content. An element of the class inherited from MItem is created if possible.
EqualsDetermines whether the specified object is equal to the current object.
(Overrides ObjectEquals(Object))
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
GetDenominatorList Get all the elements of a negative power (the items in the denominator).
GetHashCodeServes as the default hash function.
(Overrides ObjectGetHashCode)
GetItemWithOptions Obtaining a mathematical element without taking into account its sign and/or inverse.
GetNumeratorList Get all elements of positive power (elements located in the numerator).
GetRevertedEnumerator Enumerates the items of the mathematical expression in depth-first order: starts from this MItem and then recurses into the elements of Items collection starting from its first item.
GetTypeGets the Type of the current instance.
(Inherited from Object)
GetVariablesList Getting a list of variables represented in the mathematical expression.
IsDouble Method that determines whether the mathematical element is a number or not.
MathEqual Checks the values of MItem expressions for equality.
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
ToDouble Converting the element to a number.
ToEntry Converts current symbolic equation to Entry object.
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.

ToString Converts this MItem to its string representation.
(Overrides ObjectToString)
ToTerms Converts current symbolic equation to the array of Terms.
ToTermsList Converts the expression component to a list of terms in straight order.

Operators

Addition(MItem, MItem) Adds two MItem objects.
Division(MItem, MItem) Divides two MItem objects.
Equality(MItem, MItem) Returns if the operands are equal.
ExclusiveOr(MItem, MItem) Raises one MItem object to the power of another MItem object.
(Double to MItem) Provides implicit conversion from Double to MItem.
Inequality(MItem, MItem) Returns if the operands are not equal.
Multiply(MItem, MItem) Multiplies two MItem objects.
Subtraction(MItem, MItem) Subtracts two MItem objects.
UnaryNegation(MItem) Negates MItem object.

See Also