About stdlib...
We believe in a future in which the web is a preferred environment for numerical computation. To help realize this future, we've built stdlib. stdlib is a standard library, with an emphasis on numerical and scientific computation, written in JavaScript (and C) for execution in browsers and in Node.js.
The library is fully decomposable, being architected in such a way that you can swap out and mix and match APIs and functionality to cater to your exact preferences and use cases.
When you use stdlib, you can be absolutely certain that you are using the most thorough, rigorous, well-written, studied, documented, tested, measured, and high-quality code out there.
To join us in bringing numerical computing to the web, get started by checking us out on GitHub, and please consider financially supporting stdlib. We greatly appreciate your continued support!
Base (i.e., lower-level) basic linear algebra subprograms (BLAS).
npm install @stdlib/blas-base
Alternatively,
- To load the package in a website via a
script
tag without installation and bundlers, use the ES Module available on theesm
branch (see README). - If you are using Deno, visit the
deno
branch (see README for usage intructions). - For use in Observable, or in browser/node environments, use the Universal Module Definition (UMD) build available on the
umd
branch (see README).
The branches.md file summarizes the available branches and displays a diagram illustrating their relationships.
To view installation and usage instructions specific to each branch build, be sure to explicitly navigate to the respective README files on each branch, as linked to above.
var blas = require( '@stdlib/blas-base' );
Namespace for "base" (i.e., lower-level) basic linear algebra subprograms (BLAS).
var o = blas;
// returns {...}
caxpy( N, ca, cx, strideX, cy, strideY )
: scale a single-precision complex floating-point vector by a single-precision complex floating-point constant and add the result to a single-precision complex floating-point vector.ccopy( N, x, strideX, y, strideY )
: copy values from one complex single-precision floating-point vector to another complex single-precision floating-point vector.cscal( N, ca, cx, strideX )
: scales a single-precision complex floating-point vector by a single-precision complex floating-point constant.csrot( N, cx, strideX, cy, strideY, c, s )
: applies a plane rotation.cswap( N, x, strideX, y, strideY )
: interchange two complex single-precision floating-point vectors.dasum( N, x, stride )
: compute the sum of absolute values (L1 norm).daxpy( N, alpha, x, strideX, y, strideY )
: multiply a vectorx
by a constantalpha
and add the result toy
.dcopy( N, x, strideX, y, strideY )
: copy values fromx
intoy
.ddot( N, x, strideX, y, strideY )
: calculate the dot product of two double-precision floating-point vectors.dnrm2( N, x, stride )
: calculate the L2-norm of a double-precision floating-point vector.drot( N, x, strideX, y, strideY, c, s )
: apply a plane rotation.drotg( a, b )
: construct a Givens plane rotation.drotm( N, x, strideX, y, strideY, param )
: apply a modified Givens plane rotation.dscal( N, alpha, x, stride )
: multiply a double-precision floating-point vectorx
by a constantalpha
.dsdot( N, x, strideX, y, strideY )
: calculate the dot product with extended accumulation and result of two single-precision floating-point vectors.dswap( N, x, strideX, y, strideY )
: interchange two double-precision floating-point vectors.dznrm2( N, zx, strideX )
: compute the L2-norm of a complex double-precision floating-point vector.gasum( N, x, stride )
: compute the sum of absolute values (L1 norm).gaxpy( N, alpha, x, strideX, y, strideY )
: multiplyx
by a constantalpha
and add the result toy
.gcopy( N, x, strideX, y, strideY )
: copy values fromx
intoy
.gdot( N, x, strideX, y, strideY )
: calculate the dot product of two vectors.gnrm2( N, x, stride )
: calculate the L2-norm of a vector.gscal( N, alpha, x, stride )
: multiply a vectorx
by a constantalpha
.gswap( N, x, strideX, y, strideY )
: interchange two vectors.idamax( N, x, strideX )
: find the index of the first element having the maximum absolute value.isamax( N, x, strideX )
: find the index of the first element having the maximum absolute value.sasum( N, x, stride )
: compute the sum of absolute values (L1 norm).saxpy( N, alpha, x, strideX, y, strideY )
: multiply a vectorx
by a constantalpha
and add the result toy
.scasum( N, cx, strideX )
: compute the sum of the absolute values of the real and imaginary components of a single-precision complex floating-point vector.scnrm2( N, cx, strideX )
: compute the L2-norm of a complex single-precision floating-point vector.scopy( N, x, strideX, y, strideY )
: copy values fromx
intoy
.sdot( N, x, strideX, y, strideY )
: calculate the dot product of two single-precision floating-point vectors.sdsdot( N, scalar, x, strideX, y, strideY )
: calculate the dot product of two single-precision floating-point vectors with extended accumulation.snrm2( N, x, stride )
: calculate the L2-norm of a single-precision floating-point vector.srot( N, x, strideX, y, strideY, c, s )
: apply a plane rotation.srotg( a, b )
: construct a Givens plane rotation.srotm( N, x, strideX, y, strideY, param )
: apply a modified Givens plane rotation.sscal( N, alpha, x, stride )
: multiply a single-precision floating-point vectorx
by a constantalpha
.sswap( N, x, strideX, y, strideY )
: interchange two single-precision floating-point vectors.zaxpy( N, za, zx, strideX, zy, strideY )
: scale a double-precision complex floating-point vector by a double-precision complex floating-point constant and add the result to a double-precision complex floating-point vector.zcopy( N, x, strideX, y, strideY )
: copy values from one complex double-precision floating-point vector to another complex double-precision floating-point vector.zdrot( N, zx, strideX, zy, strideY, c, s )
: applies a plane rotation.zscal( N, za, zx, strideX )
: scales a double-precision complex floating-point vector by a double-precision complex floating-point constant.zswap( N, x, strideX, y, strideY )
: interchange two complex double-precision floating-point vectors.
dspmv( order, uplo, N, α, AP, x, sx, β, y, sy )
: perform the matrix-vector operationy = α*A*x + β*y
whereα
andβ
are scalars,x
andy
areN
element vectors and,A
is anN
byN
symmetric matrix supplied in packed form.dsymv( order, uplo, N, α, A, LDA, x, sx, β, y, sy )
: perform the matrix-vector operationy = α*A*x + β*y
whereα
andβ
are scalars,x
andy
areN
element vectors, andA
is anN
byN
symmetric matrix.dsyr( order, uplo, N, α, x, sx, A, LDA )
: perform the symmetric rank 1 operationA = α*x*x^T + A
.dsyr2( order, uplo, N, α, x, sx, y, sy, A, LDA )
: perform the symmetric rank 2 operationA = α*x*y^T + α*y*x^T + A
.dtrmv( order, uplo, trans, diag, N, A, LDA, x, sx )
: perform one of the matrix-vector operationsx = A*x
orx = A^T*x
.sgemv( ord, trans, M, N, α, A, LDA, x, sx, β, y, sy )
: perform one of the matrix-vector operationsy = α*A*x + β*y
ory = α*A^T*x + β*y
.sspmv( order, uplo, N, α, AP, x, sx, β, y, sy )
: perform the matrix-vector operationy = α*A*x + β*y
whereα
andβ
are scalars,x
andy
areN
element vectors and,A
is anN
byN
symmetric matrix supplied in packed form.ssymv( order, uplo, N, α, A, LDA, x, sx, β, y, sy )
: perform the matrix-vector operationy = α*A*x + β*y
whereα
andβ
are scalars,x
andy
areN
element vectors, andA
is anN
byN
symmetric matrix.ssyr( order, uplo, N, α, x, sx, A, LDA )
: perform the symmetric rank 1 operationA = α*x*x**T + A
.ssyr2( order, uplo, N, α, x, sx, y, sy, A, LDA )
: perform the symmetric rank 2 operationA = α*x*y^T + α*y*x^T + A
.strmv( order, uplo, trans, diag, N, A, LDA, x, sx )
: perform one of the matrix-vector operationsx = A*x
orx = A^T*x
.
dcabs1( z )
: compute the sum of the absolute values of the real part and imaginary components of a double-precision complex floating-point number.scabs1( z )
: compute the sum of the absolute values of the real and imaginary components of a single-precision complex floating-point number.
assert
: base BLAS assertion utilities.diagonalTypeEnum2Str( value )
: return the BLAS diagonal type string associated with a BLAS diagonal type enumeration constant.diagonalTypeResolveEnum( value )
: return the enumeration constant associated with a supported BLAS diagonal type value.diagonalTypeResolveStr( value )
: return the diagonal type string associated with a supported BLAS diagonal type value.diagonalTypeStr2Enum( diagonal )
: return the enumeration constant associated with a BLAS diagonal type.diagonalTypes()
: BLAS diagonal element types.layoutEnum2Str( layout )
: return the BLAS memory layout string associated with a BLAS memory layout enumeration constant.layoutResolveEnum( layout )
: return the enumeration constant associated with a supported BLAS memory layout value.layoutResolveStr( layout )
: return the layout string associated with a supported BLAS memory layout value.layoutStr2Enum( layout )
: return the enumeration constant associated with a BLAS memory layout string.layouts()
: BLAS memory layouts.matrixTriangleEnum2Str( value )
: return the BLAS matrix triangle string associated with a BLAS matrix triangle enumeration constant.matrixTriangleResolveEnum( value )
: return the enumeration constant associated with a supported BLAS matrix triangle value.matrixTriangleResolveStr( value )
: return the matrix triangle string associated with a supported BLAS matrix triangle value.matrixTriangleStr2Enum( operation )
: return the enumeration constant associated with a BLAS matrix triangle.matrixTriangles()
: BLAS matrix triangles.operationSideEnum2Str( operation )
: return the BLAS operation side string associated with a BLAS operation side enumeration constant.operationSideResolveEnum( operation )
: return the enumeration constant associated with a supported BLAS operation side value.operationSideResolveStr( operation )
: return the operation side string associated with a supported BLAS operation side value.operationSideStr2Enum( operation )
: return the enumeration constant associated with a BLAS operation side.operationSides()
: BLAS operation sides.transposeOperationEnum2Str( operation )
: return the BLAS transpose operation string associated with a BLAS transpose operation enumeration constant.transposeOperationResolveEnum( operation )
: return the enumeration constant associated with a supported BLAS transpose operation value.transposeOperationResolveStr( operation )
: return the transpose operation string associated with a supported BLAS transpose operation value.transposeOperationStr2Enum( operation )
: return the enumeration constant associated with a BLAS transpose operation.transposeOperations()
: BLAS transpose operations.
var objectKeys = require( '@stdlib/utils-keys' );
var blas = require( '@stdlib/blas-base' );
console.log( objectKeys( blas ) );
This package is part of stdlib, a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more.
For more information on the project, filing bug reports and feature requests, and guidance on how to develop stdlib, see the main project repository.
See LICENSE.
Copyright © 2016-2024. The Stdlib Authors.