Sparse Direct Solver (SuperLU)
SuperLU sparse direct solver.
slu.analysis.computeMatrixNorm
Compute the norm of a sparse matrix.
slu.analysis.computeMatrixNorm(A, normType?)
slu.analysis.estimateConditionNumber
Estimate the condition number of a matrix using its LU factorization.
slu.analysis.estimateConditionNumber(lu, normType?, matrixNorm?)
slu.analysis.iterativelyRefine
Improve the accuracy of a computed solution using iterative refinement.
slu.analysis.iterativelyRefine(A, lu, b, x, options?)
slu.analysis.getEliminationTree
Compute the elimination tree for a sparse matrix.
slu.analysis.getEliminationTree(A, columnPermutation?)
slu.analysis.getEliminationTreeStatistics
Compute statistics about the elimination tree.
slu.analysis.getEliminationTreeStatistics(etree, A, _columnPermutation?)
slu.analysis.getFlopsEstimate
Estimate floating point operations for LU factorization.
slu.analysis.getFlopsEstimate(A)
slu.analysis.predictFillIn
Predict fill-in for LU factorization.
slu.analysis.predictFillIn(A, perm)
slu.core.clearSolveHistory
Clear the solve history.
slu.core.clearSolveHistory()
slu.core.enableDetailedLogging
Enable or disable detailed logging.
slu.core.enableDetailedLogging(level?)
slu.core.getLastSolveStatistics
Get statistics from the last solve operation.
slu.core.getLastSolveStatistics()
slu.core.getLoggingLevel
Get the current logging level.
slu.core.getLoggingLevel()
slu.core.getSolveHistory
Get the solve history.
slu.core.getSolveHistory(limit?)
slu.core.getErrorMessage
Get a human-readable error message for a SuperLU error code.
slu.core.getErrorMessage(errorCode)
slu.core.allocateDoubles
# SuperLUWasm
slu.core.allocateDoubles(module, values, size?)
slu.core.allocateFloats
Allocate a Float32Array in WASM memory and optionally initialize with values.
slu.core.allocateFloats(module, values, size?)
slu.core.allocateInts
Allocate an Int32Array in WASM memory and optionally initialize with values.
slu.core.allocateInts(module, values, size?)
slu.core.allocateValues
Allocate values based on data type.
slu.core.allocateValues(module, values, dtype, size?)
slu.core.checkSuperLUError
Check SuperLU return code and throw if error.
slu.core.checkSuperLUError(info, routine)
slu.core.freeAll
Free multiple pointers at once.
slu.core.freeAll(module, ptrs)
slu.core.getElementSize
Get element size in bytes for a data type.
slu.core.getElementSize(dtype)
slu.core.getSuperLUErrorMessage
Get error message for a SuperLU info code.
slu.core.getSuperLUErrorMessage(info, routine?)
slu.core.isComplexType
Check if a data type is complex.
slu.core.isComplexType(dtype)
slu.core.readByte
Read a single byte/char from WASM memory.
slu.core.readByte(module, ptr)
slu.core.readDouble
Read a single double from WASM memory.
slu.core.readDouble(module, ptr)
slu.core.readDoubles
Read doubles from WASM memory.
slu.core.readDoubles(module, ptr, length)
slu.core.readFloats
Read floats from WASM memory.
slu.core.readFloats(module, ptr, length)
slu.core.readInt
Read a single integer from WASM memory.
slu.core.readInt(module, ptr)
slu.core.readInts
Read integers from WASM memory.
slu.core.readInts(module, ptr, length)
slu.core.readValues
Read values based on data type.
slu.core.readValues(module, ptr, length, dtype)
slu.core.toFloat32Array
Convert a JavaScript array to Float32Array.
slu.core.toFloat32Array(arr)
slu.core.toFloat64Array
Convert a JavaScript array to Float64Array.
slu.core.toFloat64Array(arr)
slu.core.toInt32Array
Convert a JavaScript array to Int32Array.
slu.core.toInt32Array(arr)
slu.core.withAllocations
RAII-style resource management.
slu.core.withAllocations(module, allocations, fn)
slu.core.writeByte
Write a single byte to WASM memory.
slu.core.writeByte(module, ptr, value)
slu.core.writeDouble
Write a single double to WASM memory.
slu.core.writeDouble(module, ptr, value)
slu.core.writeDoubles
Write doubles to WASM memory.
slu.core.writeDoubles(module, ptr, values)
slu.core.writeFloats
Write floats to WASM memory.
slu.core.writeFloats(module, ptr, values)
slu.core.writeInt
Write a single integer to WASM memory.
slu.core.writeInt(module, ptr, value)
slu.core.writeInts
Write integers to WASM memory.
slu.core.writeInts(module, ptr, values)
slu.core.configureSuperLU
Configure SuperLU WASM module loading options.
slu.core.configureSuperLU(config)
slu.core.getSuperLUConfig
Get the current SuperLU loading configuration.
slu.core.getSuperLUConfig()
slu.core.getSuperLUModule
Get the loaded SuperLU WASM module synchronously.
slu.core.getSuperLUModule()
slu.core.isSuperLULoaded
Check if the SuperLU WASM module has been fully loaded.
slu.core.isSuperLULoaded()
slu.core.isSuperLULoading
Check if the SuperLU WASM module is currently loading.
slu.core.isSuperLULoading()
slu.core.loadSuperLUModule
Load and initialize the SuperLU WASM module.
slu.core.loadSuperLUModule()
slu.core.resetSuperLUModule
Reset the SuperLU module state completely.
slu.core.resetSuperLUModule()
slu.core.allocateWorkspace
Allocate a workspace buffer in WASM memory.
slu.core.allocateWorkspace(size)
slu.core.deallocateWorkspace
Deallocate a previously allocated workspace.
slu.core.deallocateWorkspace(ptr)
slu.core.estimateMemoryRequired
Estimate memory required for LU factorization.
slu.core.estimateMemoryRequired(A, _options?)
slu.core.freeFactorization
Free memory used by an LU factorization.
slu.core.freeFactorization(lu)
slu.core.getMemoryUsage
Get memory usage of LU factors.
slu.core.getMemoryUsage(lu)
slu.core.getWorkspaceSize
Get the current global workspace size limit.
slu.core.getWorkspaceSize()
slu.core.queryFactorStatistics
Query statistics about a completed factorization.
slu.core.queryFactorStatistics(lu)
slu.core.setWorkspaceSize
Set the global workspace size limit.
slu.core.setWorkspaceSize(bytes)
slu.equilibration.applyEquilibrationScaling
Apply equilibration scaling to a sparse matrix.
slu.equilibration.applyEquilibrationScaling(A, rowScale, columnScale)
slu.equilibration.computeEquilibrationScaling
Compute equilibration scaling factors for a sparse matrix.
slu.equilibration.computeEquilibrationScaling(A, options?)
slu.equilibration.scaleRightHandSide
Scale the right-hand side vector for equilibration.
slu.equilibration.scaleRightHandSide(b, rowScale)
slu.equilibration.undoEquilibrationScaling
Undo equilibration scaling on the solution vector.
slu.equilibration.undoEquilibrationScaling(x, columnScale)
slu.factorization.sparseILU
Compute an Incomplete LU (ILU) factorization.
slu.factorization.sparseILU(A, options?)
slu.factorization.sparseLU
Compute the LU factorization of a sparse matrix.
slu.factorization.sparseLU(A, options?)
slu.matrix.cooToCSC
Convert COO format to CSC format.
slu.matrix.cooToCSC(coo)
slu.matrix.cooToCSR
Convert COO format to CSR format.
slu.matrix.cooToCSR(coo)
slu.matrix.createDenseMatrix
Create a dense matrix.
slu.matrix.createDenseMatrix(data, m, n, rowMajor?)
slu.matrix.createSparseCOO
Create a sparse matrix in Coordinate (COO) format.
slu.matrix.createSparseCOO(m, n, rows, cols, values, dtype?)
slu.matrix.createSparseCSC
Create a sparse matrix in Compressed Sparse Column (CSC) format.
slu.matrix.createSparseCSC(m, n, rowIndices, colPointers, values, dtype?)
slu.matrix.createSparseCSR
Create a sparse matrix in Compressed Sparse Row (CSR) format.
slu.matrix.createSparseCSR(m, n, colIndices, rowPointers, values, dtype?)
slu.matrix.createSparseDiagonal
Create a sparse diagonal matrix in CSC format.
slu.matrix.createSparseDiagonal(diag, dtype?)
slu.matrix.createSparseIdentity
Create a sparse identity matrix in CSC format.
slu.matrix.createSparseIdentity(n, dtype?)
slu.matrix.convertCSCtoCSR
Convert a CSC matrix to CSR format.
slu.matrix.convertCSCtoCSR(A)
slu.matrix.convertCSRtoCSC
Convert a CSR matrix to CSC format.
slu.matrix.convertCSRtoCSC(A)
slu.matrix.denseToSparse
Convert a dense matrix to sparse format.
slu.matrix.denseToSparse(dense, format?, tolerance?)
slu.matrix.denseToSparseCSC
Convert a dense matrix to sparse CSC format.
slu.matrix.denseToSparseCSC(dense, tolerance?)
slu.matrix.denseToSparseCSR
Convert a dense matrix to sparse CSR format.
slu.matrix.denseToSparseCSR(dense, tolerance?)
slu.matrix.getTransposeCSC
Compute the transpose of a CSC matrix.
slu.matrix.getTransposeCSC(A)
slu.matrix.getTransposeCSR
Compute the transpose of a CSR matrix.
slu.matrix.getTransposeCSR(A)
slu.matrix.sparseToDense
Convert a sparse matrix to a dense array.
slu.matrix.sparseToDense(matrix, rowMajor?)
slu.matrix.toCOO
Convert any sparse matrix format to COO (coordinate) format.
slu.matrix.toCOO(matrix)
slu.matrix.toCSC
Convert any sparse matrix format to CSC format.
slu.matrix.toCSC(matrix)
slu.matrix.toCSR
Convert any sparse matrix format to CSR format.
slu.matrix.toCSR(matrix)
slu.matrix.copySparseMatrix
Create a deep copy of a sparse matrix.
slu.matrix.copySparseMatrix(A)
slu.matrix.getDiagonal
Get the diagonal elements of a sparse matrix.
slu.matrix.getDiagonal(A)
slu.matrix.getMatrixNonzeros
Get information about the nonzero elements of a matrix.
slu.matrix.getMatrixNonzeros(A, maxEntries?)
slu.matrix.getMatrixStatistics
Compute statistics about a sparse matrix.
slu.matrix.getMatrixStatistics(A)
slu.matrix.getSparsityPattern
Extract the sparsity pattern (nonzero locations) of a matrix.
slu.matrix.getSparsityPattern(A)
slu.matrix.getSupernodeStructure
Analyze supernode structure of a matrix.
slu.matrix.getSupernodeStructure(A, perm?)
slu.matrix.scaleMatrixCols
Scale the columns of a sparse matrix in-place.
slu.matrix.scaleMatrixCols(A, scale)
slu.matrix.scaleMatrixRows
Scale the rows of a sparse matrix in-place.
slu.matrix.scaleMatrixRows(A, scale)
slu.matrix.checkFactorization
Verify that a factorization satisfies PAQ ≈ LU.
slu.matrix.checkFactorization(_A, _lu, _tolerance?)
slu.matrix.detectMatrixProperties
Detect various properties of a sparse matrix.
slu.matrix.detectMatrixProperties(A, tolerance?)
slu.matrix.isHermitianSparse
Check if a sparse matrix is Hermitian (A = A^H) within tolerance.
slu.matrix.isHermitianSparse(A, tolerance?)
slu.matrix.isPositiveDefiniteSparse
Check if a sparse matrix appears to be positive definite.
slu.matrix.isPositiveDefiniteSparse(A)
slu.matrix.isSymmetricSparse
Check if a sparse matrix is symmetric (A = A^T) within tolerance.
slu.matrix.isSymmetricSparse(A, tolerance?)
slu.matrix.validateSparseMatrix
Validate a sparse matrix for format consistency.
slu.matrix.validateSparseMatrix(A)
slu.permutation.computeColumnPermutation
Compute a column permutation for fill-in reduction.
slu.permutation.computeColumnPermutation(A, strategy?)
slu.permutation.computeRowPermutation
Compute a row permutation for numerical stability.
slu.permutation.computeRowPermutation(A, strategy?)
slu.permutation.invertPermutation
Compute the inverse of a permutation.
slu.permutation.invertPermutation(perm)
slu.permutation.permuteSparseMatrix
Apply row and column permutations to a sparse matrix.
slu.permutation.permuteSparseMatrix(A, rowPerm, colPerm)
slu.permutation.permuteVector
Apply a permutation to a vector.
slu.permutation.permuteVector(x, perm)
slu.permutation.permuteVectorInverse
Apply inverse permutation to a vector.
slu.permutation.permuteVectorInverse(x, perm)
slu.solvers.solveMultipleRHS
Solve a sparse linear system AX = B with multiple right-hand sides.
slu.solvers.solveMultipleRHS(A, B, nrhs, options?)
slu.solvers.solveReusedFactorization
Solve a sparse linear system using a pre-computed LU factorization.
slu.solvers.solveReusedFactorization(lu, b, options?)
slu.solvers.solveWithDeflation
Solve a sparse linear system using deflation.
slu.solvers.solveWithDeflation(A, b, deflationVectors, options?)
slu.solvers.solveSparseConjugateTranspose
Solve A^H x = b (conjugate transpose) where A is complex.
slu.solvers.solveSparseConjugateTranspose(A, b, options?)
slu.solvers.solveSparseCSC
Solve a sparse linear system Ax = b where A is in CSC format.
slu.solvers.solveSparseCSC(A, b, options?)
slu.solvers.solveSparseCSR
Solve a sparse linear system Ax = b where A is in CSR format.
slu.solvers.solveSparseCSR(A, b, options?)
slu.solvers.solveSparseTranspose
Solve A^T x = b (transpose system) where A is in CSC format.
slu.solvers.solveSparseTranspose(A, b, options?)
slu.solvers.solveSparseExpert
Expert sparse solver with full control over all SuperLU options.
slu.solvers.solveSparseExpert(A, b, options?)
slu.solvers.solveLeastSquaresSparse
Solve a sparse least squares problem min ||Ax - b||_2.
slu.solvers.solveLeastSquaresSparse(A, b, options?)
slu.solvers.solveWithIterativeRefinement
Solve a sparse linear system with iterative refinement.
slu.solvers.solveWithIterativeRefinement(A, lu, b, x, options?)
slu.solvers.solveShiftedSystem
Solve a shifted linear system (A - σI)x = b.
slu.solvers.solveShiftedSystem(A, shift, b, options?)
slu.solvers.solveHermitianSparse
Solve a Hermitian sparse linear system Ax = b.
slu.solvers.solveHermitianSparse(A, b, options?)
slu.solvers.solveSymmetricSparse
Solve a symmetric sparse linear system Ax = b.
slu.solvers.solveSymmetricSparse(A, b, options?)
slu.solvers.solveTriangularCSC
Solve a triangular system Tx = b where T is a sparse triangular CSC matrix.
slu.solvers.solveTriangularCSC(T, b, options?)
slu.solvers.solveTriangularCSR
Solve a triangular system Tx = b where T is a sparse triangular CSR matrix.
slu.solvers.solveTriangularCSR(T, b, options?)
slu.solvers.solveTriangularLU
Solve Ax = b using precomputed LU factors.
slu.solvers.solveTriangularLU(lu, b, options?)
slu.solvers.solveTriangularLUConjugateTranspose
Solve A^H x = b using precomputed LU factors (complex matrices).
slu.solvers.solveTriangularLUConjugateTranspose(lu, b, options?)
slu.solvers.solveTriangularLUTranspose
Solve A^T x = b using precomputed LU factors.
slu.solvers.solveTriangularLUTranspose(lu, b, options?)
slu.testing.createTestMatrix
Create a standard test matrix.
slu.testing.createTestMatrix(type, n, options?)
slu.testing.getTestMatrixTypes
Get a list of available test matrix types with descriptions.
slu.testing.getTestMatrixTypes()
slu.getNnz
Get the number of nonzeros in a sparse matrix.
slu.getNnz(matrix)
slu.inferDataType
Infer the data type from an array.
slu.inferDataType(arr)
slu.isSparseMatrixCSC
Check if a sparse matrix is in CSC format.
slu.isSparseMatrixCSC(matrix)
slu.isSparseMatrixCSR
Check if a sparse matrix is in CSR format.
slu.isSparseMatrixCSR(matrix)