18 Commits

Author SHA1 Message Date
Jos de Jong
80fb20fbe7 Fix some unit tests failing on IE 11 2020-07-19 11:50:17 +02:00
Jos de Jong
84f2746128 Merge branch 'Undo' of https://github.com/Veeloxfire/mathjs into Veeloxfire-Undo 2020-07-19 10:59:23 +02:00
Tom Hickson
1fd3c8bd10 Added one-based indexing for diff inside the parse
Also added bignumbers as indexes as that could be useful
2020-07-17 19:54:15 +01:00
Tom Hickson
3ecf86e9ee spelling in diff.test.js 2020-07-17 18:30:24 +01:00
Tom Hickson
fbebed77a1 added better(?) support for matrices
Matrices are all treated as arrays (of arrays) now. This was to prep for writing better docs
2020-07-17 18:29:51 +01:00
Tom Hickson
0c61d21c95 added unit tests for diff Errors
Added Unit tests for the 4 Errors. Also changed some small things
2020-07-17 17:49:17 +01:00
Tom Hickson
e993e8350c Added other types to diff.test.js
Tests for bignumber, fraction and units.
2020-07-17 17:15:03 +01:00
josdejong
6c7f4c860e Fix #1882: have DenseMatrix.resize and SparseMatrix.resize accept DenseMatrix and SparseMatrix as inputs too 2020-06-13 13:19:40 +02:00
josdejong
23e38bea60 Remove all deprecated code and warnings 2020-05-06 21:57:33 +02:00
Tom Hickson
1348d67b7e Updated diff function to allow selecting a dimension 2020-04-24 18:15:34 +01:00
Tom Hickson
9a66b80bff Finalized Diff function
Added tests and then fixed all linting issues
2020-04-08 19:28:02 +01:00
Michal Grňo
aafef5760c
Improve dot product (#1773)
* make dot product faster and correct for ℂ

* minor fixes

* added tests, fixed bugs

* add dot for sparse matrices

* make multiply(vec, vec) use dot

* add test for complex vectors

* added test for mul(vec, vec), removed one TODO comment

Co-authored-by: Jos de Jong <wjosdejong@gmail.com>
2020-03-29 17:04:57 +02:00
jos
5624e6938f Fix #1789: Function eigs not calculating with BigNumber precision when input contains BigNumbers 2020-03-29 16:17:19 +02:00
jos
0c863f4e07 Fixed #1727: validate matrix size when creating a DenseMatrix using fromJSON 2020-02-01 17:37:34 +01:00
jos
b9246d9a45 Replace Array.fill with a helper function, replace var with let/const, return .values as Matrix too when input is a Matrix. See #1705 2020-01-20 20:08:34 +01:00
Arkajit Mandal
0b188e385c Adding eigs function (#1705)
* eigs test file initialize

* file for function for diagonalization of a real symmetrix matrix

* eigs typed function written according to mathjs requirements

* some linting issues addressed

* more linting issues in eigs

* linting passed for eigs (blank template function)

* making eigs fail

* eigs added to factory any

* initial check of input in eigs

* linting issues fix in eigs

* added rotation and theta matrix

* diagonalization loop added

* diagonalization result return

* diagonalization returns eigenvalue and eigenvectors

* function for updating Sij

* function for updating matrix

* a small bug fix

* some linting fixed in eigs

* lint and bug fix at eigs

* linting passed in eigs

* tests for input in eigs

* tests for trivial eigenvalue problem (sanity check)

* 2x2 check for non-diagonal matrix

* sorting added to eigs

* sorting function lint fix in eigs

* example for eigs updated

* 3x3 diagonalization by eigs passed

* bug in eigenvector

* eigenvalues seem to work

* cloning array so that original matrix do not get transformed in eigs

* eigenvector check

* eigenvector deep check and eigs description modified

* embedding dos for eigs

* doc for eigs fix

* slight change in example

* adding checkInput type

* type error for bad matrix elements

* type error for every element

* name change for typecheck function

* check matrix type of array input

* type error message update in eigs

* type error message grammer in eigs

* eigs bug fix

* eigs bug fix in check function

* eigs typecheck test

* some lint fix in eigs and corresponding tests

* before adding bingNumber implementation in eigs

* support for fractions

* obtain angle for bigNumber type

* theta for bignumbers

* update overlap for bigNumber

* jacobi rotation of input matrix for BigNumbers

* largest element for bigNumbers

* diagonalization for bigNumbers

* adding dependedncies

* diagonization for bigNumber

* diag for bigNumber is tested

* linting fix for eig and eigs test

* problem for bigNumber fix

* error message modification for eigs

* more coverage for eigs function

* eigs test bug fix

* simplify test

* is Symmetric function

* use matrix instead in eigs

* slight cleanup

* is symmetric bug fix

* no need to return in isSymmetrix

* small bug fix for fractions

* using scalar function when possible

* small lint correction

* return object in eigs

* bug fix in array eigs

* test object implementation

* description update

Co-authored-by: Jos de Jong <wjosdejong@gmail.com>
2020-01-20 19:50:07 +01:00
jos
d8a4f3a00a Update to standard@13.0.2 2019-07-20 13:46:31 +02:00
jos
db4910bed4 Move all test related stuff in folder test 2019-06-05 11:45:02 +02:00