Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
Eliminate.cs
4
6{
11 {
21 {
22 }
23
27 public override string FunctionName => nameof(Eliminate);
28
36 {
37 if (Argument is IMatrix M)
38 {
39 IMatrix N = M.Reduce(true, false, out _, out _)
40 ?? throw new ScriptRuntimeException("Unable to reduce and eliminate matrix.", this);
41
42 return N;
43 }
44 else
45 throw new ScriptRuntimeException("Expected matrix argument.", this);
46 }
47 }
48}
Class managing a script expression.
Definition: Expression.cs:39
Eliminate(ScriptNode Argument, int Start, int Length, Expression Expression)
Eliminate(x)
Definition: Eliminate.cs:19
override IElement Evaluate(IElement Argument, Variables Variables)
Evaluates the function.
Definition: Eliminate.cs:35
override string FunctionName
Name of the function
Definition: Eliminate.cs:27
Base class for funcions of one variable.
ScriptNode Argument
Function argument.
Base class for all nodes in a parsed script tree.
Definition: ScriptNode.cs:69
int Length
Length of expression covered by node.
Definition: ScriptNode.cs:101
int Start
Start position in script expression.
Definition: ScriptNode.cs:92
Collection of variables.
Definition: Variables.cs:25
Basic interface for all types of elements.
Definition: IElement.cs:20
Basic interface for matrices.
Definition: IMatrix.cs:9
IMatrix Reduce(bool Eliminate, bool BreakIfZero, out int Rank, out ICommutativeRingWithIdentityElement Factor)
Reduces a matrix.