equations library

This package is used to solve numerical analysis problems, such as:

  • finding roots of polynomial equations;
  • finding roots of nonlinear equations;
  • solving linear systems of equations;
  • evaluating definite integrals;
  • manipulating and decomposing matrices;
  • interpolate data points using interpolation algorithms.

Additionally, the package also has utilities to work with complex numbers, real/complex matrices, fractions, and expression parsing.

Classes

AdaptiveQuadrature
The "Adaptive quadrature" is a technique for approximating the value of a definite integral.
Algebraic
Abstract class representing an algebraic equation, also know as polynomial equation, which has a single variable with a maximum degree.
AlgebraicDivision
This utility class holds the quotient and the remainder of a division between two polynomials. When you use operator/ on two Algebraic objects, this class is returned. For example:
Bisection
Implements the 'bisection' method to find the roots of a given equation.
Brent
Implements Brent's method to find the roots of a given equation.
CholeskySolver
Implementation of the "Cholesky decomposition" algorithm for solving a system of linear equations. It only works with square, Hermitian, positive-definite matrices.
Chords
Implements the 'chords' method to find the roots of a given equation.
Complex
A Dart representation of a complex number in the form a + bi where a is the real part and bi is the imaginary (or complex) part.
ComplexMatrix
A simple Dart implementation of an m x n matrix whose data type is Complex.
Constant
Concrete implementation of Algebraic that represents a constant value a. It can be either real or complex.
Cubic
Concrete implementation of Algebraic that represents a third degree polynomial equation in the form ax^3 + bx^2 + cx + d = 0.
DurandKerner
The Durand–Kerner method, also known as Weierstrass method, is a root finding algorithm for solving polynomial equations. With this class, you can find all roots of a polynomial of any degree.
ExpressionParser
Parses mathematical expressions with real numbers and the x variable (if any). The only allowed variable name is x: any other type of value isn't recognized. Some expressions examples are:
Fraction
Dart representation of a fraction having both numerator and denominator as integers. If the denominator is zero, a FractionException object is thrown.
GaussianElimination
Implementation of the "Gaussian elimination" algorithm, also known as "row reduction", for solving a system of linear equations. This method only works with square matrices.
GaussSeidelSolver
Solves a system of linear equations using the Gauss-Seidel iterative method. The given input matrix, representing the system of linear equations, must be square.
Interpolation
An abstract class that represents an interpolation strategy, used to find new data points based on a given discrete set of data points (called nodes). The algorithms implemented by this package are:
InterpolationNode
A point in the cartesian coordinate system used by Interpolation types to represent interpolation nodes. This class simply represents the x and y coordinates of a point on a cartesian plane.
IntervalsIntegration
This class is extended by classes whose algorithms divide the integration bounds into smaller intervals to compute the result. There currently are three subclasses of IntervalsIntegration:
JacobiSolver
Solves a system of linear equations using the Jacobi iterative method. The given input matrix, representing the system of linear equations, must be square.
Linear
Concrete implementation of Algebraic that represents a first degree polynomial equation in the form ax + b = 0.
LinearInterpolation
Linear interpolation is a curve fitting method that uses linear polynomials to construct new data points within the range of a discrete set of known data points.
LUSolver
Solves a system of linear equations using the 'LU decomposition' method. The given input matrix, representing the system of linear equations, must be square.
Matrix<T>
A simple Dart implementation of a matrix whose size is m x n. Thanks to its generic nature, you can decide to work with int, double, Complex or any other kind of numerical type. This library implements:
MidpointRule
The "midpoint rule" is a technique for approximating the value of a definite integral.
MixedFraction
Dart representation of a 'mixed fraction', which is made up by the whole part and a proper fraction. A proper fraction is a fraction in which the relation numerator <= denominator is true.
Newton
Implements Newton's method to find the roots of a given equation.
NewtonInterpolation
Newton interpolation is an interpolation polynomial for a given set of data points. It can be expressed using forward or backward divided differences.
NonLinear
An abstract class that represents a nonlinear equation, which can be solved with a particular root-finding algorithm. No complex numbers are allowed.
NumericalIntegration
When it comes to analysis, the term numerical integration indicates a group of algorithms for calculating the numerical value of a definite integral on an interval.
PolarComplex
A wrapper class, returned by a Complex object, that represents a complex number in polar coordinates.
PolynomialInterpolation
Polynomial interpolation is the interpolation of a given data set by the polynomial of lowest possible degree that passes through the points of the data set.
PolynomialLongDivision
The "Polynomial long division" algorithm divides a polynomial by another polynomial of the same or lower degree.
Quadratic
Concrete implementation of Algebraic that represents a second degree polynomial equation in the form ax^2 + bx + c = 0.
Quartic
Concrete implementation of Algebraic that represents a fourth degree polynomial equation in the form ax^4 + bx^3 + cx^2 + dx + e = 0.
Rational
Dart representation of a rational number.
RealMatrix
A simple Dart implementation of an m x n matrix whose data type is double.
RegulaFalsi
Implements the regula falsi method (also known as "false position method") to find the roots of a given equation.
Riddler
Implements the Riddler's method to find the roots of a given equation.
Secant
Implements the secant method to find the roots of a given equation.
SimpsonRule
The "Simpson rule" is a technique for approximating the value of a definite integral.
SORSolver
Solves a system of linear equations using the SOR iterative method. The given input matrix, representing the system of linear equations, must be square.
SplineInterpolation
Performs spline interpolation given a set of control points. The algorithm can compute a "monotone cubic spline" or a "linear spline" based on the properties of the control points.
Steffensen
Implements Seffensen's method to find the roots of a given equation.
SylvesterMatrix
A Sylvester matrix is used to compute the discriminant of a polynomial starting from its coefficients.
SystemSolver
An abstract class that represents a system of equations, which can be solved using various algorithms that manipulate the data of a matrix and a vector.
TrapezoidalRule
The "trapezoidal rule" is a technique for approximating the value of a definite integral.

Extensions

ExpressionParserX on String
Extension method for ExpressionParser on String types.
FractionNum on num
Extension method that adds Fraction functionalities to num.
FractionString on String
Extension method that adds Fraction functionalities to String.
MixedFractionNum on num
Extension method that adds MixedFraction functionalities to num.
MixedFractionString on String
Extension method that adds MixedFraction functionalities to String.

Exceptions / Errors

AlgebraicException
Exception object thrown by Algebraic.
ComplexException
Exception object thrown by Complex.
EquationException
Base class for exception objects in this package.
ExpressionParserException
Exception object thrown by ExpressionParser.
FractionException
Exception object thrown by a Fraction object.
InterpolationException
Exception object thrown by Interpolation.
MatrixException
Exception object thrown by Matrix.
MixedFractionException
Exception object thrown by a MixedFraction object.
NonlinearException
Exception object thrown by NonLinear.
PolynomialLongDivisionException
Exception object thrown by PolynomialLongDivision.
SystemSolverException
Exception object thrown by SystemSolver.