This page introduces the main structures and the functions available in the interface to Blas and Lapack. Other features are described in the documentation.
Available Structures
Vector structures:
- Full vectors:
Vector<T>
- Sparse vectors:
Vector<T, VectSparse>
Matrix structures:
- Full matrices:
Matrix<T>
- Sparse matrices:
Matrix<T, P, RowSparse>
- Alternative sparse matrices:
Matrix<T, P, ArrayRowSparse>
- Complex sparse matrices:
Matrix<T, P, RowComplexSparse>
- Alternative complex sparse matrices:
Matrix<T, P, ArrayRowComplexSparse>
- Symmetric sparse matrices:
Matrix<T, P, RowSymSparse>
- Symmetric complex sparse matrices:
Matrix<T, P, RowSymComplexSparse>
- Symmetric matrices:
Matrix<T, P, RowSym>
- Symmetric packed matrices:
Matrix<T, P, RowSymPacked>
- Hermitian matrices:
Matrix<T, P, RowHerm>
- Hermitian packed matrices:
Matrix<T, P, RowHermPacked>
- Lower triangular matrices:
Matrix<T, P, RowLoTriang>
- Upper triangular matrices:
Matrix<T, P, RowUpTriang>
- Lower triangular packed matrices:
Matrix<T, P, RowLoTriangPacked>
- Upper triangular packed matrices:
Matrix<T, P, RowUpTriangPacked>
T
can be any
type: double
, float
, int
,
bool
, Vector<double>
, ...
P
is a property, usually General
(i.e., no
special property) or Symmetric
.
One can always switch to column-oriented storage: simply
replace Row
with Col
; e.g. ColSparse
or ColLoTriangPacked
.
3D array structure:
- Full 3D arrays (provided for
convenience):
Array3D<T>
The way the vectors, matrices and arrays are allocated can be controlled
through a class called "allocator". This allocator is the last template
argument of every structure. For instance, a full matrix may be declared
as Matrix<double, General, RowMajor>
(same
as Matrix<double>
) or as Matrix<double, General,
RowMajor, NaNAlloc<double> >
to use an allocator that sets
to NaN (not a number) every allocated element.
Interface to Blas and Lapack
Available Blas functions (Seldon functions):
- [Blas 1] xROTG (GenRot), xROTMG (GenModifRot), xROT (ApplyRot), xROTM (ApplyModifRot), xSWAP (Swap), xSCAL (Mlt), xCOPY (Copy), xAXPY (Add), xDOT (DotProd), xDOTU (DotProd), SDSDOT (ScaledDotProd), xDOTC (DotProdConj), xASUM (Norm1), xNRM2 (Norm2), IxAMAX (GetMaxAbsIndex);
- [Blas 2] xTRMV (Mlt), xTPMV (Mlt), xGEMV (MltAdd), xHEMV (MltAdd), xHPMV (MltAdd), xSYMV (MltAdd), xSPMV (MltAdd), xGER (Rank1Update), xGERU (Rank1Update), xGERC (Rank1Update), xSPR (Rank1Update), xHPR (Rank1Update), xSPR2 (Rank2Update), xHPR2 (Rank2Update), xTRSV (Solve), xTPSV (Solve);
- [Blas 3] xGEMM (MltAdd), xSYMM (MltAdd), xHEMM (MltAdd), xTRMM (Mlt), xTRSM (Solve).
Available Lapack functions (Seldon functions):
- [Linear algebra] xGETRF (GetLU), xSYTRF (GetLU), xSPTRF (GetLU), xHETRF (GetLU), xHPTRF (GetLU), xGETRS (SolveLU), xSYTRS (SolveLU), xSPTRS (SolveLU), xHETRS (SolveLU), xHPTRS (SolveLU), xTRTRS (SolveLU), xTPTRS (SolveLU), xGECON (ReciprocalConditionNumber), xSYCON (ReciprocalConditionNumber), xSPCON (ReciprocalConditionNumber), xHECON (ReciprocalConditionNumber), xHPCON (ReciprocalConditionNumber), xTRCON (ReciprocalConditionNumber), xTPCON (ReciprocalConditionNumber), xGERFS (RefineSolutionLU), xSYRFS (RefineSolutionLU), xSPRFS (RefineSolutionLU), xHERFS (RefineSolutionLU), xHPRFS (RefineSolutionLU), xTRRFS (RefineSolutionLU), xTPRFS (RefineSolutionLU), xGETRI (GetInverse), xSYTRI (RefineSolutionLU), xSPTRI (RefineSolutionLU), xHETRI (RefineSolutionLU), xHPTRI (RefineSolutionLU), xTRTRI (RefineSolutionLU), xTPTRI (RefineSolutionLU), xGEEQU (GetScalingFactors);
- [Eigen values] xGEEV (GetEigenvalues, GetEigenvaluesEigenvectors), xSYEV (GetEigenvalues, GetEigenvaluesEigenvectors), xHEEV (GetEigenvalues, GetEigenvaluesEigenvectors), xSPEV (GetEigenvalues, GetEigenvaluesEigenvectors), xHPEV (GetEigenvalues, GetEigenvaluesEigenvectors), xSYGV (GetEigenvalues, GetEigenvaluesEigenvectors), xGGEV (GetEigenvalues, GetEigenvaluesEigenvectors), xHEGV (GetEigenvalues, GetEigenvaluesEigenvectors), xSPGV (GetEigenvalues, GetEigenvaluesEigenvectors), xHPGV (GetEigenvalues, GetEigenvaluesEigenvectors), xGESVD (GetSVD), xGEQRF (GetHessian), ZGEQRF + ZUNGQR + ZUNMQR + ZGGHRD (GetHessian), ZGEQRF + ZUNGQR + ZUNMQR + ZGGHRD + ZHGEQZ (GetQZ), (SolveSylvester);
- [Least squares] xGEQRF (GetQR, GetLQ), xGELQF (GetQR, GetLQ), xGEQP3 (GetQR_Pivot), xORGQR (GetQ_FromQR), xUNGQR (GetQ_FromQR), xUNMQR (MltQ_FromQR), xORMQR (MltQ_FromQR), xORMQR + xTRSM (SolveQR), ZUNMQR + ZTRSM (SolveQR), xORMLQ + xTRSM (SolveQR), ZUNMLQ + ZTRSM (SolveQR), xTRSM + xORMLQ (SolveLQ), ZTRSM + ZUNMLQ (SolveLQ), xTRSM + xORMQR (SolveLQ), ZTRSM + ZUNMQR (SolveLQ).