SystemSolver class abstract

A solver for systems of linear equations whose coefficients are only real numbers. There must be n equations in n unknowns.

The coefficients of the various equations are put inside a square matrix, which is generally called A, and the known values are represented by a vector, usually known as b. From this, we get an equation in the form Ax = b.

The method solve returns the vector x of the Ax = b equation.

Implementers

Constructors

SystemSolver({required int size, required List<List<double>> A, required List<double> b, double precision = 1.0e-10})
Given an equation in the form Ax = b, A is a square matrix containing n equations in n unknowns and b is the vector of the known values.
SystemSolver.flatMatrix({required int size, required List<double> A, required List<double> b, double precision = 1.0e-10})
Given an equation in the form Ax = b, A is a square matrix containing n equations in n unknowns and b is the vector of the known values.

Properties

equations RealMatrix
The equations of the system to be solved.
latefinal
hashCode int
The hash code for this object.
no setteroverride
knownValues List<double>
The vector containing the known values of the equation.
no setter
precision double
The accuracy of the algorithm.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
size int
The dimension of the system (which is N equations in N unknowns).
no setter

Methods

determinant() double
Computes the determinant of the associated matrix.
hasSolution() bool
Computes whether the system can be solved or not.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
solve() List<double>
Solves the Ax = b equation and returns the x vector containing the solutions of the system.
toString() String
A string representation of this object.
override
toStringAugmented() String
Prints the augmented matrix of this instance, which is the equations matrix plus the known values vector to the right. For example, if...

Operators

operator ==(Object other) bool
The equality operator.
override

Static Methods

backSubstitution(List<List<double>> source, List<double> vector) List<double>
Back substitution is an iterative process that solves equation matrices in the form Ux = b, where U is an upper triangular matrix.
forwardSubstitution(List<List<double>> source, List<double> vector) List<double>
Forward substitution is an iterative process that solves equation matrices in the form Lx = b, where L is a lower triangular matrix.