604 Commits

Author SHA1 Message Date
Lazersmoke
05860b8c19
Clarify eigs documentation (#1847)
The matrix `math.eigs(H).vectors` contains the eigenvectors as columns, not rows, as previously suggested.
Also includes example of how to access the relevant vectors using `math.column`.

Co-authored-by: Jos de Jong <wjosdejong@gmail.com>
2020-05-09 12:12:10 +02:00
josdejong
23e38bea60 Remove all deprecated code and warnings 2020-05-06 21:57:33 +02:00
josdejong
23c1ebfd25 Update version number to 7.0.0 2020-05-06 21:02:22 +02:00
josdejong
aafa456e6f Merge branch 'develop' into v7
# Conflicts:
#	HISTORY.md
#	package-lock.json
#	package.json
2020-05-06 20:50:53 +02:00
josdejong
37d91849bb Publish v6.6.5 2020-05-04 20:57:01 +02:00
josdejong
6038d12e29 Fix #1842: value Infinity not turned into the latex symbol \\infty 2020-05-04 20:50:27 +02:00
josdejong
f9487554bc Fix broken bundle tests and linting issues 2020-05-03 16:04:22 +02:00
josdejong
28b7a02f01 Fix #1834: value Infinity cannot be serialized and deserialized 2020-05-03 15:41:03 +02:00
josdejong
8945f00fca Publish v6.6.4 2020-04-15 10:37:44 +02:00
josdejong
750126525c Publish v6.6.3 2020-04-11 14:13:59 +02:00
josdejong
8fcf7d22cf Improve explanation of engineering notation in function format 2020-04-11 13:31:56 +02:00
josdejong
3f6646f9e3 Fix #1813: bug in engineering notation for numbers of function format, sometimes resulting in needless trailing zeros 2020-04-11 13:26:46 +02:00
Jos de Jong
7833e237a2
Fix #1808: toNumber() not working on a unitless unit (#1811) 2020-04-08 16:12:42 +02:00
Veeloxfire
fae65276ba
Should be able to take NAMED_DELIMITER as object keys (#1798)
Co-authored-by: Jos de Jong <wjosdejong@gmail.com>
2020-04-04 17:14:39 +02:00
jos
7e8d128bd6 Fixed eigs not using config.epsilon (see #1789) 2020-04-04 17:05:30 +02: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
1496cc597e Publish v6.6.2 2020-03-29 16:28:02 +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
033a6baac7 Publish v6.6.1 2020-02-26 14:55:28 +01:00
jos
52f6defe1c Fix examples in documentation of row and column, see #230 2020-02-26 11:16:44 +01:00
David Bramwell
88733f70af
Let simplify handle a/(b/c) (#1734)
Co-authored-by: Jos de Jong <wjosdejong@gmail.com>
2020-02-04 20:34:37 +01:00
jos
1d5ad22296 Remove redundant code causing a vague error, see #1724 2020-02-04 20:30:35 +01:00
jos
7cbd0d3e97 Publish v6.6.0 2020-02-01 17:51:52 +01:00
jos
8bf5206daf Fix lint error 2020-02-01 17:42:32 +01: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
b063d35395 Publish v6.5.0 2020-01-08 10:29:05 +01:00
Eric Mansfield
97ff95b32c Added baseName option to createUnit (#1708)
* Fixed unit base recognition and formatting for user-defined units

* Added baseName option to createUnit

* Trailing spaces

* Fixed line in docs
2020-01-08 10:23:23 +01:00
jos
ec19f010e7 Commit updated version in version.js 2020-01-06 20:29:46 +01:00
jos
b3236b6592 Publish v6.4.0 2020-01-06 20:03:52 +01:00
Veeloxfire
10449b2326 Extend distance with support for n-dimensions 2020-01-04 21:03:53 +01:00
jos
dd414a6e93 Publish v6.3.0 2019-12-31 11:44:02 +01:00
Bartosz Leoniak
1f10538588 Improve performance of factorial for BigNumbers (#1691) 2019-12-31 11:31:35 +01:00
jos
2c24d72562 Publish v6.2.5 2019-11-20 12:43:20 +01:00
jos
b9175a1a29 Fixed IndexNode using a hardcoded, one-based implementation of index. See #782 2019-11-20 12:23:06 +01:00
jos
ebe38b23b0 Publish v6.2.4 2019-11-20 08:54:31 +01:00
Harry Sarson
462f46947f fix qr and sign edge cases (#1670)
* fix qr and sign edge cases

qr() was throwing an error if the pivots of a matrix were zero.
This commit fixes that and ensures that the results are consistant
with wolfram alpha.

Whilst doing this I found a bug in complex.js, I have added a work
around but we should flag this upstream.

I also addressed the long standing concerns about assert statements
within the body of the qr function.

Fixes #1669
Fixes #942

* further improvements to qr and sign

mainly fixing things I got wrong in previous commit

* add array test

* fix: remove only from tests and disallow

Uses mochas `--forbid-only` flag as advised by
https://github.com/standard/standard/issues/988
2019-11-18 20:03:09 +01:00
jos
d62b30efb2 Publish v6.2.3 2019-10-06 10:49:33 +02:00
Arthur Guiot
34b676a1cc Improved performances for isPrime (#1641)
* Improved performances for isPrime

The prime test performance have been improved compared to previous version.

* Fixed build

* Fixed build for isPrime

* Removed extra semicolons to fix lint
2019-10-06 10:40:48 +02:00
Clinton Curry
69dd165afb Allow taking means of quantities with units. (#1644)
* Allow taking means of quantities with units.

* Fix silly error in test.

The test as written did not test anything about units.

* Fix same error again...
2019-10-03 20:28:25 +02:00
jos
2713431b84 Fixed #1639: function min listed twice in the "See also" section of the embedded docs of function std 2019-10-01 21:56:01 +02:00
jos
c08132fe6b Publish v6.2.2 2019-09-23 20:32:01 +02:00
jos
7b1cd7753e Fixed #1628: Cannot call methods on empty strings or numbers with value 0 2019-09-23 20:23:39 +02:00
Rian McGuire
a8d94cbbeb Copy IndexNode dotNotation property in map and clone methods (#1623)
* Copy dotNotation in IndexNode.prototype.map

* Copy dotNotation in IndexNode.prototype.clone
2019-09-20 20:11:18 +02:00
jos
a4f84512cd Fixed #1615: error in the docs of isNumeric 2019-09-11 10:10:46 +02:00
jos
33f4ffcb2c Publish v6.2.1 2019-08-31 09:59:49 +02:00
Waseem Yusuf
430a00f7b2 Refactor combinations.js to be more readable (#1607) 2019-08-31 09:54:56 +02:00
jos
e37cc81735 Fixed #1606: function format not working for expressions 2019-08-29 10:17:57 +02:00
jos
ce6f29788c Publish v6.2.0 2019-08-28 16:07:35 +02:00