AngouriMath
Public Member Functions | List of all members
AngouriMath.Core.EquationSystem Class Reference

A class for systems of equations. More...

Inheritance diagram for AngouriMath.Core.EquationSystem:
Inheritance graph
[legend]
Collaboration diagram for AngouriMath.Core.EquationSystem:
Collaboration graph
[legend]

Public Member Functions

 EquationSystem (IEnumerable< Entity > equations)
 The equations you pass should not have an MathS.Equality node. More...
 
 EquationSystem (params Entity[] equations)
 The equations you pass should not have an MathS.Equality node. More...
 
Matrix Solve (params Variable[] vars)
 Solves a system of equations, if possible. More...
 
string Latexise ()
 
Returns
Latexised version of the system.
More...
 
override string ToString ()
 

Detailed Description

A class for systems of equations.

Is not part of AM's ecosystem, that is, it is not an Entity, just an intermediate class. It is a system of arbitrary equations, not only those linear. However, it is not a system of Statements.

Constructor & Destructor Documentation

◆ EquationSystem() [1/2]

AngouriMath.Core.EquationSystem.EquationSystem ( IEnumerable< Entity equations)

The equations you pass should not have an MathS.Equality node.

After having created a system of equations, you may solve or latexise it.

Parameters
equationsAny IEnumerable<T> parameter, such as List<T> or System.Array.
var eq = new EquationSystem(new Entity[] {
"x + sin(y)2 + 3",
"y - a"
});

◆ EquationSystem() [2/2]

AngouriMath.Core.EquationSystem.EquationSystem ( params Entity []  equations)

The equations you pass should not have an MathS.Equality node.

After having created a system of equations, you may solve or latexise it.

Parameters
equationsAn System.Array
var eq = new EquationSystem(
"x + sin(y)2 + 3",
"y - a"
);

Member Function Documentation

◆ Latexise()

string AngouriMath.Core.EquationSystem.Latexise ( )
inline

Returns
Latexised version of the system.

It adds zero equality to all the provided expressions

Implements AngouriMath.Core.ILatexiseable.

◆ Solve()

Matrix AngouriMath.Core.EquationSystem.Solve ( params Variable []  vars)

Solves a system of equations, if possible.

Parameters
varsThe umber of variables must match number of equations

<return> If there exists at least one solution, returns a solution matrix The first axis of the matrix corresponds to the number of solutions, the second one corresponds to the number of variables.

The i-th column of the matrix represents the possible values of the i-th variable.

If no solution was found, returns a null. </return>


The documentation for this class was generated from the following file: