dart:math
Currently this library is under heavy development! I appreciate any help in implementing any functionality of any section and hope this library will be helpful for developers and scientists.
Created under a MITstyle license.
At the moment library have 4 sections:
1. General mathematics
* Elementary algebra
2. Complex analysis
3. Discrete mathematics
* General algebraic systems
* Linear algebra
* Number theory
4. Applied mathematics
* Probability theory
Each section don't have full implementation yet. See dartdoc for which functionality are implemented.
Sections are created according to Mathematics Subject Classification.
Please file feature requests and bugs at the issue tracker.
CompositeNumber
class to Integer
class.2.1.0dev.9.4
.Complex.toComplex()
constructor.calculate()
method of EquationBase
class to calculate complex roots.eigenDecomposition()
method of SquareMatrix
class.calculate()
method of CubicEquation
class.*
and /
operators of Complex
class for work with real numbers.CopyableMixin
which extends MatrixBase
, VectorBase
and Complex
classes.isReal()
, conjugate()
and toReal()
methods to Complex
class.rootsOf()
method of Complex
class to return all roots.Number
, Integer
and Double
classes in subsuction of discrete mathematics.*
, /
, +
and 
operators for new types.multiplyByMatrix()
to matrixProduct()
of MatrixBase
class.gaussian()
method.eigenDecomposition()
method to SquareMatrix
class.svd()
method to MatrixBase
class.swapRows()
, swapColumns()
, submatrix()
, gaussian()
, rank()
and isUpperTriangle()
methods to MatrixBase
class.insert(Row/Column)()
to (replace/append)(Row/Column)()
methods of MatrixBase
class.toMatrix()
mathod of VectorBase
class to toMatrix(Row/Column)()
methods./
operator to SquareMatrix
class from MatrixBase
._multiplyByVector()
method from MatrixBase
class.data
to private and create getter with the same name which returns copy of data
.CONTRIBUTING.md
.multiplyByVector()
method in DiagonalMatrix
class.multiplyByVector()
and multiplyBy()
methods to private methods.eigenDecomposition()
and svd()
methods of SquareMatrix
class  they aren't finished.I
class to Complex
class.rootOf()
and pow()
methods of Complex
class.QuadraticEquation
's and CubicEquation
's calculate()
method.factorizate()
method of CompositeNumber
class.*
, /
, +
and 
operators for complex number I
.module
, argument
getters to I
class.double
type of elements to num
type.==
operator for MatrixBase
, VectorBase
and Complex
classes.*
, /
, +
and 
operators of VectorBase
class.add()
and subtract()
methods of VectorBase
class.*
, /
, +
and 
operators of MatrixBase
class.add()
and subtract()
methods of MatrixBase
class.number_theory
and linear_algebra
into discrete_mathematics
.Probability theory
subsection with NumbersGenerator
class.LICENSE
.Complex analysis
, General
and Number theory
sections.QuadraticEquation
and CubicEquation
classes of General
section.CompositeNumber
of Number theory
section.eliminate()
method to SquareMatrix
class.rowAsVector()
, columnAsVector()
methods to MatrixBase
class.multiplyByVector()
and inverse()
methods in DiagonalMatrix
class.isSymmetric()
and isOrthogonal()
methods to SquareMatrix
class.hadamardProduct()
, transform()
, isUnit()
, isOrthogonalTo()
, isOrthonormalWith()
methods to VectorBase
class.DiagonalMatrix
class.isSquare()
, isDiagonal()
, isIdentity()
, mainDiagonal()
, toSquareMatrix()
and toDiagonalMatrix()
methods to MatrixBase
class.length
getter and crossProduct()
method to VectorBase
class.frobeniusNorm()
method to MatrixBase
class.norm()
, euclideanNorm()
, maxNorm()
and angleBetween()
methods to VectorBase
class.dot()
method of VectorBase
class.isIdentity()
, replaceRow()
and replaceColumn
methods to MatrixBase
class.inverse()
, isSingular()
and isNotSingular()
methods to SquareMatrix
class.getDeterminant()
method.add()
, subtract()
methods to Vector
class.SquareMatrix
class.getDeterminant()
methods of SquareMatrix
class.identity()
constructor for matrices.generate()
constructor from Matrix
class to MatrixBase
and add to it
identity
parameter.Vector
, Matrix
and Tensor
classes for working with according objects of linear algebra.Vector
and Matrix
.example/extended_math_example.dart
import 'package:extended_math/extended_math.dart';
void main() {
final v1 = Vector(<double>[1, 2, 3]);
final v2 = Vector(<double>[4, 5, 6]);
// Multiply vectors
final double res = v1.dotProduct(v2);
// Add vectors
final Vector res1 = v1 + v2;
final v5 = Vector(<double>[6, 3]);
final v6 = Vector(<double>[5, 13]);
// Gets angle between two vectors
print(v5.angleBetween(v6));
final v3 = SquareMatrix(<List<double>>[
<double>[9, 3, 5],
<double>[6, 9, 7],
<double>[1, 8, 1]
]);
// Gets determinant of matrix
final double det = v3.determinant();
// Computes eigenvalues and eigenvectors of square matrix
final Map<num, Vector> result = v3.eigenDecomposition();
final m = Matrix(<List<double>>[
<double>[2, 1, 5],
<double>[0, 2, 1],
<double>[3, 1, 1]
]);
// Computes Frobenius norm of matrix
print(m.frobeniusNorm());
final c = Complex(re: 4);
final c2 = Complex(re: 4);
// Gets root of complex number
final r = c.rootsOf(2);
// Divides complex numbers
print(c / c2);
// Gets pow of complex number
print(Complex(re: 2).pow(2));
}
Add this to your package's pubspec.yaml file:
dependencies:
extended_math: ^0.0.15
You can install packages from the command line:
with pub:
$ pub get
with Flutter:
$ flutter packages get
Alternatively, your editor might support pub get
or flutter packages get
.
Check the docs for your editor to learn more.
Now in your Dart code, you can use:
import 'package:extended_math/extended_math.dart';
Version  Uploaded  Documentation  Archive 

0.0.15  Jan 17, 2019  
0.0.14+1  Jan 17, 2019  
0.0.14  Jan 12, 2019  
0.0.13  Jan 10, 2019  
0.0.12  Jan 5, 2019  
0.0.11  Jan 1, 2019  
0.0.10  Jan 1, 2019  
0.0.9  Dec 27, 2018  
0.0.7  Dec 24, 2018  
0.0.6  Dec 14, 2018 
Popularity:
Describes how popular the package is relative to other packages.
[more]

37

Health:
Code health derived from static analysis.
[more]

100

Maintenance:
Reflects how tidy and uptodate the package is.
[more]

90

Overall:
Weighted score of the above.
[more]

66

We analyzed this package on Jan 17, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
Detected platforms: Flutter, web, other
No platform restriction found in primary library
package:extended_math/extended_math.dart
.
Package is prev0.1 release. (10 points)
While there is nothing inherently wrong with versions of 0.0.*
, it usually means that the author is still experimenting with the general direction of the API.
Package  Constraint  Resolved  Available 

Direct dependencies  
Dart SDK  >=2.1.0dev.9.4 <3.0.0  
data  ^0.0.6  0.0.6  
meta  ^1.1.7  1.1.7  
quiver  ^2.0.1  2.0.1  
Transitive dependencies  
collection  1.14.11  
matcher  0.12.4  
more  1.12.1  
path  1.6.2  
stack_trace  1.9.3  
Dev dependencies  
test  ^1.5.1 