extended_math 0.0.15

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 66

Library that add functionality of all maths sections that don't exist in 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 MIT-style license.

Overview

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.

Features and bugs

Please file feature requests and bugs at the issue tracker.

0.0.15

  • Moves functionality of CompositeNumber class to Integer class.

0.0.14+1

  • Downgrade required Dart SDK to 2.1.0-dev.9.4.

0.0.14

  • Remove Complex.toComplex() constructor.
  • Rewrite calculate() method of EquationBase class to calculate complex roots.
  • Change return object of eigenDecomposition() method of SquareMatrix class.
  • Fix calculate() method of CubicEquation class.
  • Allow * and / operators of Complex class for work with real numbers.
  • Create CopyableMixin which extends MatrixBase, VectorBase and Complex classes.
  • Add isReal(), conjugate() and toReal() methods to Complex class.
  • Change rootsOf() method of Complex class to return all roots.
  • Add Number, Integer and Double classes in subsuction of discrete mathematics.
  • Implement *, /, + and - operators for new types.
  • Small changes in README.

0.0.13

  • Rename multiplyByMatrix() to matrixProduct() of MatrixBase class.
  • Fix gaussian() method.
  • Add eigenDecomposition() method to SquareMatrix class.
  • Add svd() method to MatrixBase class.

0.0.12

  • Add swapRows(), swapColumns(), submatrix(), gaussian(), rank() and isUpperTriangle() methods to MatrixBase class.
  • Distinct insert(Row/Column)() to (replace/append)(Row/Column)() methods of MatrixBase class.
  • Split toMatrix() mathod of VectorBase class to toMatrix(Row/Column)() methods.
  • Move / operator to SquareMatrix class from MatrixBase.
  • Removes _multiplyByVector() method from MatrixBase class.
  • Change methods for work with rows and columns of matrix to work with self instance.
  • Set data to private and create getter with the same name which returns copy of data.
  • Add CONTRIBUTING.md.

0.0.11

  • Removes overridden multiplyByVector() method in DiagonalMatrix class.
  • Change multiplyByVector() and multiplyBy() methods to private methods.
  • Comment eigenDecomposition() and svd() methods of SquareMatrix class - they aren't finished.
  • Rename I class to Complex class.
  • Implement rootOf() and pow() methods of Complex class.

0.0.10

  • Fix QuadraticEquation's and CubicEquation's calculate() method.
  • Fix factorizate() method of CompositeNumber class.
  • Implement *, /, + and - operators for complex number I.
  • Add module, argument getters to I class.
  • Changed double type of elements to num type.
  • Override == operator for MatrixBase, VectorBase and Complex classes.

0.0.9

  • Override *, /, + and - operators of VectorBase class.
  • Removes add() and subtract() methods of VectorBase class.
  • Override *, /, + and - operators of MatrixBase class.
  • Removes add() and subtract() methods of MatrixBase class.

0.0.8

  • Unit number_theory and linear_algebra into discrete_mathematics.
  • Add Probability theory subsection with NumbersGenerator class.
  • Correct title in LICENSE.

0.0.7

  • Add Complex analysis, General and Number theory sections.
  • Implement QuadraticEquation and CubicEquation classes of General section.
  • Implement CompositeNumber of Number theory section.
  • Add eliminate() method to SquareMatrix class.

0.0.6

  • Add rowAsVector(), columnAsVector() methods to MatrixBase class.
  • Override multiplyByVector() and inverse() methods in DiagonalMatrix class.
  • Add isSymmetric() and isOrthogonal() methods to SquareMatrix class.
  • Add hadamardProduct(), transform(), isUnit(), isOrthogonalTo(), isOrthonormalWith() methods to VectorBase class.

0.0.5

  • Inner refactoring of support methods.
  • Create DiagonalMatrix class.
  • Add isSquare(), isDiagonal(), isIdentity(), mainDiagonal(), toSquareMatrix() and toDiagonalMatrix() methods to MatrixBase class.
  • Add length getter and crossProduct() method to VectorBase class.

0.0.4

  • Add frobeniusNorm() method to MatrixBase class.
  • Add norm(), euclideanNorm(), maxNorm() and angleBetween() methods to VectorBase class.
  • Fix dot() method of VectorBase class.

0.0.3

  • Add isIdentity(), replaceRow() and replaceColumn methods to MatrixBase class.
  • Add inverse(), isSingular() and isNotSingular() methods to SquareMatrix class.
  • Fix getDeterminant() method.
  • Small changes in classes with access to items of matrices and vectors.

0.0.2

  • Add and implement add(), subtract() methods to Vector class.
  • Add SquareMatrix class.
  • Implement getDeterminant() methods of SquareMatrix class.
  • Add identity() constructor for matrices.
  • Move generate() constructor from Matrix class to MatrixBase and add to it identity parameter.

0.0.1

  • Add Vector, Matrix and Tensor classes for working with according objects of linear algebra.
  • Implements addition, subtraction, multiplication methods of 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));
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  extended_math: ^0.0.15

2. Install it

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.

3. Import it

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 Go to the documentation of extended_math 0.0.15 Download extended_math 0.0.15 archive
0.0.14+1 Jan 17, 2019 Go to the documentation of extended_math 0.0.14+1 Download extended_math 0.0.14+1 archive
0.0.14 Jan 12, 2019 Go to the documentation of extended_math 0.0.14 Download extended_math 0.0.14 archive
0.0.13 Jan 10, 2019 Go to the documentation of extended_math 0.0.13 Download extended_math 0.0.13 archive
0.0.12 Jan 5, 2019 Go to the documentation of extended_math 0.0.12 Download extended_math 0.0.12 archive
0.0.11 Jan 1, 2019 Go to the documentation of extended_math 0.0.11 Download extended_math 0.0.11 archive
0.0.10 Jan 1, 2019 Go to the documentation of extended_math 0.0.10 Download extended_math 0.0.10 archive
0.0.9 Dec 27, 2018 Go to the documentation of extended_math 0.0.9 Download extended_math 0.0.9 archive
0.0.7 Dec 24, 2018 Go to the documentation of extended_math 0.0.7 Download extended_math 0.0.7 archive
0.0.6 Dec 14, 2018 Go to the documentation of extended_math 0.0.6 Download extended_math 0.0.6 archive

All 15 versions...

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 up-to-date the package is. [more]
90
Overall:
Weighted score of the above. [more]
66
Learn more about scoring.

We analyzed this package on Jan 17, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.1.0
  • pana: 0.12.10

Platforms

Detected platforms: Flutter, web, other

No platform restriction found in primary library package:extended_math/extended_math.dart.

Maintenance suggestions

Package is pre-v0.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.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0-dev.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