Global namespace object
- Source:
- /var/www/html/software/jsmatrix/jsmatrix.src.js, line 72
Classes
Members
-
<static> eye
-
Alias for dentity(), see identity
- Source:
- /var/www/html/software/jsmatrix/jsmatrix.src.js, line 4516
-
<static> identity
-
Returned identity matrix of given size, see {@JSMatrix.Matrix#Identity}
- Source:
- /var/www/html/software/jsmatrix/jsmatrix.src.js, line 4512
Example
m = JSMatrix.identity(3); // m = Matrix([[1,0,0],[0,1,0],[0,0,1]])
-
<static> mat
-
Returns new Matrix object from given array
- Source:
- /var/www/html/software/jsmatrix/jsmatrix.src.js, line 4468
Example
m = JSMatrix.mat([[1,2,3],[4,5,6],[7,8,9]]) // m = Matrix([[1,2,3],[4,5,6],[7,8,9]])
-
<static, constant> TOL
-
( = 1e-8)
- Source:
- /var/www/html/software/jsmatrix/jsmatrix.src.js, line 88
-
<static, constant> TOL2
-
( = 1e-32)
- Source:
- /var/www/html/software/jsmatrix/jsmatrix.src.js, line 92
-
<static> unitMatrix
-
Alias for dentity(), see identity
- Source:
- /var/www/html/software/jsmatrix/jsmatrix.src.js, line 4520
-
<static> vec
-
Returns new Vector object from given array
- Source:
- /var/www/html/software/jsmatrix/jsmatrix.src.js, line 4476
Example
v = JSMatrix.vec([1,2,3,4]) // v = Vector([1,2,3,4])
-
<static, constant> X
-
( = 0 )
- Source:
- /var/www/html/software/jsmatrix/jsmatrix.src.js, line 76
-
<static, constant> Y
-
( = 1 )
- Source:
- /var/www/html/software/jsmatrix/jsmatrix.src.js, line 80
-
<static, constant> Z
-
( = 2 )
- Source:
- /var/www/html/software/jsmatrix/jsmatrix.src.js, line 84
Methods
-
<static> eigSymmetric(params) → {Object}
-
Eigenvalues and eigenvectors solver for symmetric matrices. Returns first nEigModes eigenvales (lambda) and eigenvectors (phi) of problem mat1*phi=lambda*mat2*phi. See JSMatrix.Matrix#eigSymmetric for input description (except mat1 and mat2). Eigenvectors are normalized with respect to mat2
Parameters:
Name Type Argument Description params
Object <optional>
Properties
Name Type Description mat1
JSMatrix.Matrix mat1 in above equation mat2
JSMatrix.Matrix mat2 in above equation, mat in JSMatrix.Matrix#eigSymmetric - Source:
- /var/www/html/software/jsmatrix/jsmatrix.src.js, line 4554
Returns:
[[lambda1,lambda2,...,lambdaN],[phi1,phi2,...,phiN]], lambdai is i-th eigenvale, phii is i-th eigenvector. N = nEigModes- Type
- Object
-
<static> linSolve(a, rhs, method, saveOrig, precompDecomps) → {JSMatrix.Vector|Array.<JSMatrix.Vector>|JSMatrix.Matrix}
-
Linear system equation solver. Returns vector x as a solution of a*ret=rhs, see {@JSMatrix.Matrix#linSolve} for input desription
Parameters:
Name Type Argument Description a
JSMatrix.Matrix rhs
JSMatrix.Vector | Array.<JSMatrix.Vector> | JSMatrix.Matrix method
string <optional>
="default"] saveOrig
boolean <optional>
=true] precompDecomps
Array.<JSMatrix.Matrix> <optional>
] - Source:
- /var/www/html/software/jsmatrix/jsmatrix.src.js, line 4537
Returns:
solution x of a*x=rhs- Type
- JSMatrix.Vector | Array.<JSMatrix.Vector> | JSMatrix.Matrix
-
<static> ones(nRows, nCols) → {JSMatrix.Matrix|JSMatrix.Vector}
-
Returns new Vector or Matrix full of given size full of ones
Parameters:
Name Type Argument Description nRows
number number of rows of returned object nCols
number <optional>
] if specified, new Matrix of size (nRows,nCols) is returned, new vector of size nRows otherwise - Source:
- /var/www/html/software/jsmatrix/jsmatrix.src.js, line 4500
Returns:
new Matrix or Vector object- Type
- JSMatrix.Matrix | JSMatrix.Vector
Example
m = JSMatrix.ones(2,3); // m = Matrix([[1,1,1],[1,1,1]]) v = JSMatrix.ones(4) // v = Vector([1,1,1,1])
-
<static> range(a, b, c) → {Array.<number>}
-
Returns sequence (array) with start, stop, step. Inspired by Python syntax
Parameters:
Name Type Argument Description a
number start/stop (according to b, see example) b
number <optional>
stop c
number <optional>
(default=1) step - Source:
- /var/www/html/software/jsmatrix/jsmatrix.src.js, line 4588
Returns:
array containing given sequence- Type
- Array.<number>
Example
r = JSMatrix.range(8); // r = [0,1,2,3,4,5,6,7] r = JSMatrix.range(2,8); // r = [2,3,4,5,7] r = JSMatrix.range(2,8,2); // r = [2,4,6]
-
<static> zeros(nRows, nCols) → {JSMatrix.Matrix|JSMatrix.Vector}
-
Returns new Vector or Matrix full of given size full of zeros
Parameters:
Name Type Argument Description nRows
number number of rows of returned object nCols
number <optional>
] if specified, new Matrix of size (nRows,nCols) is returned, new vector of size nRows otherwise - Source:
- /var/www/html/software/jsmatrix/jsmatrix.src.js, line 4486
Returns:
new Matrix or Vector object- Type
- JSMatrix.Matrix | JSMatrix.Vector
Example
m = JSMatrix.zeros(2,3); // m = Matrix([[0,0,0],[0,0,0]]) v = JSMatrix.zeros(4) // v = Vector([0,0,0,0])