* 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>
* 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>
* 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#1669Fixes#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
* 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...
* Implemented the `multicombinations` function
* Write unit tests for `multicombinations` function
* Integrate the `multicombinations` function throughout codebase
1. Include multicombinations factory function in factoriesAny.js and factoriesNumber.js
2. Write embedded docs for multicombinations
3. Added latex support
4. Refer to multicombinations in the "see also"-section of related functions
* Change name from `multichoose` to `combinationsWithRep`
* Update combinationsWithRep.js
Instead of always cancelling `n-1 factorial` from the denominator and ignoring `k factorial`, added a conditional to cancel the the larger of the two, therefore further reducing redundant calculations.
* Revert "Update combinationsWithRep.js"
This reverts commit efef6d3bd4c381aa12f00869a7624a622268805c.
* Update combinationsWithRep.js
Instead of always cancelling `n-1 factorial` from the denominator and ignoring `k factorial`, added a conditional to cancel the the larger of the two, therefore further reducing redundant calculations.
* Add one more test for the case: k > n-1
* Refactor single for-loop into two separate ones
* Implemented the `multicombinations` function
* Write unit tests for `multicombinations` function
* Integrate the `multicombinations` function throughout codebase
1. Include multicombinations factory function in factoriesAny.js and factoriesNumber.js
2. Write embedded docs for multicombinations
3. Added latex support
4. Refer to multicombinations in the "see also"-section of related functions
* Change name from `multichoose` to `combinationsWithRep`