Table of Contents

Class VariableBinaryExpression

Namespace
xFunc.Maths.Expressions.Programming
Assembly
xFunc.Maths.dll

The base class for binary operations with variable as first (left) operand.

public abstract class VariableBinaryExpression : IExpression
Inheritance
VariableBinaryExpression
Implements
Derived
Inherited Members
Extension Methods

Constructors

VariableBinaryExpression(Variable, IExpression)

Initializes a new instance of the VariableBinaryExpression class.

protected VariableBinaryExpression(Variable variable, IExpression value)

Parameters

variable Variable

The left (first) operand.

value IExpression

The right (second) operand.

Properties

Value

Gets the value.

public IExpression Value { get; }

Property Value

IExpression

Variable

Gets the variable.

public Variable Variable { get; }

Property Value

Variable

Methods

AnalyzeInternal<TResult>(IAnalyzer<TResult>)

Analyzes the current expression.

protected abstract TResult AnalyzeInternal<TResult>(IAnalyzer<TResult> analyzer)

Parameters

analyzer IAnalyzer<TResult>

The analyzer.

Returns

TResult

The analysis result.

Type Parameters

TResult

The type of the result.

AnalyzeInternal<TResult, TContext>(IAnalyzer<TResult, TContext>, TContext)

Analyzes the current expression.

protected abstract TResult AnalyzeInternal<TResult, TContext>(IAnalyzer<TResult, TContext> analyzer, TContext context)

Parameters

analyzer IAnalyzer<TResult, TContext>

The analyzer.

context TContext

The context.

Returns

TResult

The analysis result.

Type Parameters

TResult

The type of the result.

TContext

The type of additional parameter for analyzer.

Analyze<TResult>(IAnalyzer<TResult>)

Analyzes the current expression.

public TResult Analyze<TResult>(IAnalyzer<TResult> analyzer)

Parameters

analyzer IAnalyzer<TResult>

The analyzer.

Returns

TResult

The analysis result.

Type Parameters

TResult

The type of the result.

Analyze<TResult, TContext>(IAnalyzer<TResult, TContext>, TContext)

Analyzes the current expression.

public TResult Analyze<TResult, TContext>(IAnalyzer<TResult, TContext> analyzer, TContext context)

Parameters

analyzer IAnalyzer<TResult, TContext>

The analyzer.

context TContext

The context.

Returns

TResult

The analysis result.

Type Parameters

TResult

The type of the result.

TContext

The type of additional parameter for analyzer.

Clone(Variable?, IExpression?)

Clones this instance of the IExpression.

public abstract IExpression Clone(Variable? variable = null, IExpression? value = null)

Parameters

variable Variable

The variable argument of new expression.

value IExpression

The value argument of new expression.

Returns

IExpression

Returns the new instance of IExpression that is a clone of this instance.

Equals(object?)

Determines whether the specified object is equal to the current object.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

Execute()

Executes this expression. Don't use this method if your expression has variables or user-functions.

public object Execute()

Returns

object

A result of the execution.

Execute(NumberValue, NumberValue)

Executes this expression.

protected abstract object Execute(NumberValue variableValue, NumberValue value)

Parameters

variableValue NumberValue

The value of variable.

value NumberValue

The value.

Returns

object

A result of the execution.

Execute(ExpressionParameters?)

Executes this expression.

public object Execute(ExpressionParameters? parameters)

Parameters

parameters ExpressionParameters

An object that contains all parameters and functions for expressions.

Returns

object

A result of the execution.

See Also

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

ToString(IFormatter)

Returns a string that represents this instance.

public string ToString(IFormatter formatter)

Parameters

formatter IFormatter

The formatter.

Returns

string

A string that represents this instance.