Cantera
2.1.2
|
A class for banded matrices, involving matrix inversion processes. More...
#include <BandMatrix.h>
Public Member Functions | |
BandMatrix () | |
Base Constructor. More... | |
BandMatrix (size_t n, size_t kl, size_t ku, doublereal v=0.0) | |
Creates a banded matrix and sets all elements to zero. More... | |
BandMatrix (const BandMatrix &y) | |
Copy constructor. More... | |
BandMatrix & | operator= (const BandMatrix &y) |
assignment operator More... | |
void | resize (size_t n, size_t kl, size_t ku, doublereal v=0.0) |
Resize the matrix problem. More... | |
void | bfill (doublereal v=0.0) |
Fill or zero the matrix. More... | |
doublereal & | operator() (size_t i, size_t j) |
Index into the (i,j) element. More... | |
doublereal | operator() (size_t i, size_t j) const |
Constant Index into the (i,j) element. More... | |
doublereal & | value (size_t i, size_t j) |
Return a changeable reference to element (i,j). More... | |
doublereal | value (size_t i, size_t j) const |
Return the value of element (i,j). More... | |
size_t | index (size_t i, size_t j) const |
Returns the location in the internal 1D array corresponding to the (i,j) element in the banded array. More... | |
doublereal | _value (size_t i, size_t j) const |
Return the value of the (i,j) element for (i,j) within the bandwidth. More... | |
virtual size_t | nRows () const |
Return the number of rows in the matrix. More... | |
virtual size_t | nRowsAndStruct (size_t *const iStruct=0) const |
Return the size and structure of the matrix. More... | |
size_t | nColumns () const |
Number of columns. More... | |
size_t | nSubDiagonals () const |
Number of subdiagonals. More... | |
size_t | nSuperDiagonals () const |
Number of superdiagonals. More... | |
size_t | ldim () const |
Return the number of rows of storage needed for the band storage. More... | |
vector_int & | ipiv () |
Return a reference to the pivot vector. More... | |
virtual void | mult (const doublereal *b, doublereal *prod) const |
Multiply A*b and write result to prod. More... | |
virtual void | leftMult (const doublereal *const b, doublereal *const prod) const |
Multiply b*A and write result to prod. More... | |
int | factor () |
Perform an LU decomposition, the LAPACK routine DGBTRF is used. More... | |
int | solve (const doublereal *const b, doublereal *const x) |
Solve the matrix problem Ax = b. More... | |
int | solve (doublereal *b) |
Solve the matrix problem Ax = b. More... | |
virtual vector_fp::iterator | begin () |
Returns an iterator for the start of the band storage data. More... | |
vector_fp::iterator | end () |
Returns an iterator for the end of the band storage data. More... | |
vector_fp::const_iterator | begin () const |
Returns a const iterator for the start of the band storage data. More... | |
vector_fp::const_iterator | end () const |
Returns a const iterator for the end of the band storage data. More... | |
virtual void | zero () |
Zero the matrix elements. More... | |
virtual int | factorQR () |
Factors the A matrix using the QR algorithm, overwriting A. More... | |
virtual doublereal | rcondQR () |
Returns an estimate of the inverse of the condition number for the matrix. More... | |
virtual doublereal | rcond (doublereal a1norm) |
Returns an estimate of the inverse of the condition number for the matrix. More... | |
virtual void | useFactorAlgorithm (int fAlgorithm) |
Change the way the matrix is factored. More... | |
virtual int | factorAlgorithm () const |
Returns the factor algorithm used. More... | |
virtual doublereal | oneNorm () const |
Returns the one norm of the matrix. More... | |
virtual GeneralMatrix * | duplMyselfAsGeneralMatrix () const |
Duplicator member function. More... | |
virtual bool | factored () const |
Report whether the current matrix has been factored. More... | |
virtual doublereal * | ptrColumn (size_t j) |
Return a pointer to the top of column j, column values are assumed to be contiguous in memory. More... | |
virtual doublereal *const * | colPts () |
Return a vector of const pointers to the columns. More... | |
virtual void | copyData (const GeneralMatrix &y) |
Copy the data from one array into another without doing any checking. More... | |
virtual void | clearFactorFlag () |
Clear the factored flag. More... | |
virtual size_t | checkRows (doublereal &valueSmall) const |
Check to see if we have any zero rows in the jacobian. More... | |
virtual size_t | checkColumns (doublereal &valueSmall) const |
Check to see if we have any zero columns in the jacobian. More... | |
Public Member Functions inherited from GeneralMatrix | |
GeneralMatrix (int matType) | |
Base Constructor. More... | |
GeneralMatrix (const GeneralMatrix &right) | |
Copy Constructor. More... | |
GeneralMatrix & | operator= (const GeneralMatrix &right) |
Assignment operator. More... | |
virtual | ~GeneralMatrix () |
Destructor. Does nothing. More... | |
Protected Attributes | |
vector_fp | data |
Matrix data. More... | |
vector_fp | ludata |
Factorized data. More... | |
bool | m_factored |
Boolean indicating whether the matrix is factored. More... | |
size_t | m_n |
Number of rows and columns of the matrix. More... | |
size_t | m_kl |
Number of subdiagonals of the matrix. More... | |
size_t | m_ku |
Number of super diagonals of the matrix. More... | |
doublereal | m_zero |
value of zero More... | |
vector_int | m_ipiv |
Pivot vector. More... | |
std::vector< doublereal * > | m_colPtrs |
Vector of column pointers. More... | |
vector_int | iwork_ |
Extra work array needed - size = n. More... | |
vector_fp | work_ |
Extra dp work array needed - size = 3n. More... | |
Private Member Functions | |
void | err (const std::string &msg) const |
Error function that gets called for unhandled cases. More... | |
Additional Inherited Members | |
Public Attributes inherited from GeneralMatrix | |
int | matrixType_ |
Matrix type. More... | |
A class for banded matrices, involving matrix inversion processes.
The class is based upon the LAPACK banded storage matrix format.
An important issue with this class is that it stores both the original data and the LU factorization of the data. This means that the banded matrix typically will take up twice the room that it is expected to take.
QR factorizations of banded matrices are not included in the original LAPACK work. Add-ons are available. However, they are not included here. Instead we just use the stock LU decompositions.
This class is a derived class of the base class GeneralMatrix. However, within the oneD directory, the class is used as is, without reference to the GeneralMatrix base type.
Definition at line 37 of file BandMatrix.h.
BandMatrix | ( | ) |
Base Constructor.
0
by 0
matrix, and initialize all elements to 0
. Definition at line 24 of file BandMatrix.cpp.
References BandMatrix::data, and BandMatrix::ludata.
Referenced by BandMatrix::duplMyselfAsGeneralMatrix().
BandMatrix | ( | size_t | n, |
size_t | kl, | ||
size_t | ku, | ||
doublereal | v = 0.0 |
||
) |
Creates a banded matrix and sets all elements to zero.
Create an n
by n
banded matrix, and initialize all elements to v
.
n | size of the square matrix |
kl | band size on the lower portion of the matrix |
ku | band size on the upper portion of the matrix |
v | initial value of all matrix components. |
Definition at line 36 of file BandMatrix.cpp.
References BandMatrix::data, BandMatrix::ludata, BandMatrix::m_colPtrs, BandMatrix::m_ipiv, and BandMatrix::m_n.
BandMatrix | ( | const BandMatrix & | y | ) |
Copy constructor.
y | Matrix to be copied |
Definition at line 56 of file BandMatrix.cpp.
References BandMatrix::data, BandMatrix::ludata, BandMatrix::m_colPtrs, BandMatrix::m_factored, BandMatrix::m_ipiv, BandMatrix::m_kl, BandMatrix::m_ku, and BandMatrix::m_n.
BandMatrix & operator= | ( | const BandMatrix & | y | ) |
assignment operator
y | reference to the matrix to be copied |
Definition at line 78 of file BandMatrix.cpp.
References BandMatrix::data, BandMatrix::ludata, BandMatrix::m_colPtrs, BandMatrix::m_factored, BandMatrix::m_ipiv, BandMatrix::m_kl, BandMatrix::m_ku, BandMatrix::m_n, and GeneralMatrix::operator=().
void resize | ( | size_t | n, |
size_t | kl, | ||
size_t | ku, | ||
doublereal | v = 0.0 |
||
) |
Resize the matrix problem.
All data is lost
n | size of the square matrix |
kl | band size on the lower portion of the matrix |
ku | band size on the upper portion of the matrix |
v | initial value of all matrix components. |
Definition at line 99 of file BandMatrix.cpp.
References BandMatrix::data, BandMatrix::ludata, BandMatrix::m_colPtrs, BandMatrix::m_factored, BandMatrix::m_ipiv, BandMatrix::m_kl, BandMatrix::m_ku, and BandMatrix::m_n.
void bfill | ( | doublereal | v = 0.0 | ) |
Fill or zero the matrix.
v | Fill value, defaults to zero. |
Definition at line 116 of file BandMatrix.cpp.
References BandMatrix::data, and BandMatrix::m_factored.
Referenced by MultiJac::eval().
|
virtual |
Index into the (i,j) element.
i | row |
j | column |
Returns a changeable reference to the matrix entry
Implements GeneralMatrix.
Definition at line 128 of file BandMatrix.cpp.
References BandMatrix::value().
|
virtual |
Constant Index into the (i,j) element.
i | row |
j | column |
Returns an unchangeable reference to the matrix entry
Implements GeneralMatrix.
Definition at line 133 of file BandMatrix.cpp.
References BandMatrix::value().
doublereal & value | ( | size_t | i, |
size_t | j | ||
) |
Return a changeable reference to element (i,j).
Since this method may alter the element value, it may need to be refactored, so the flag m_factored is set to false.
i | row |
j | column |
Definition at line 138 of file BandMatrix.cpp.
References BandMatrix::data, BandMatrix::index(), BandMatrix::m_factored, BandMatrix::m_kl, and BandMatrix::m_zero.
Referenced by BandMatrix::checkColumns(), BandMatrix::checkRows(), MultiJac::eval(), BandMatrix::oneNorm(), and BandMatrix::operator()().
doublereal value | ( | size_t | i, |
size_t | j | ||
) | const |
Return the value of element (i,j).
This method does not alter the array.
i | row |
j | column |
Definition at line 147 of file BandMatrix.cpp.
References BandMatrix::data, BandMatrix::index(), and BandMatrix::m_kl.
size_t index | ( | size_t | i, |
size_t | j | ||
) | const |
Returns the location in the internal 1D array corresponding to the (i,j) element in the banded array.
i | row |
j | column |
Definition at line 155 of file BandMatrix.cpp.
References BandMatrix::m_kl, and BandMatrix::m_ku.
Referenced by BandMatrix::_value(), and BandMatrix::value().
doublereal _value | ( | size_t | i, |
size_t | j | ||
) | const |
Return the value of the (i,j) element for (i,j) within the bandwidth.
For efficiency, this method does not check that (i,j) are within the bandwidth; it is up to the calling program to insure that this is true.
i | row |
j | column |
Definition at line 163 of file BandMatrix.cpp.
References BandMatrix::data, and BandMatrix::index().
Referenced by BandMatrix::leftMult(), and BandMatrix::mult().
|
virtual |
Return the number of rows in the matrix.
Implements GeneralMatrix.
Definition at line 168 of file BandMatrix.cpp.
References BandMatrix::m_n.
Referenced by BandMatrix::factor(), BandMatrix::mult(), and Cantera::operator<<().
|
virtual |
Return the size and structure of the matrix.
iStruct | OUTPUT Pointer to a vector of ints that describe the structure of the matrix. istruct[0] = kl istruct[1] = ku |
Implements GeneralMatrix.
Definition at line 173 of file BandMatrix.cpp.
References BandMatrix::m_kl, BandMatrix::m_ku, and BandMatrix::m_n.
size_t nColumns | ( | ) | const |
Number of columns.
Definition at line 183 of file BandMatrix.cpp.
References BandMatrix::m_n.
Referenced by BandMatrix::factor(), BandMatrix::leftMult(), Cantera::operator<<(), and BandMatrix::solve().
size_t nSubDiagonals | ( | ) | const |
Number of subdiagonals.
Definition at line 189 of file BandMatrix.cpp.
References BandMatrix::m_kl.
Referenced by BandMatrix::factor(), and BandMatrix::solve().
size_t nSuperDiagonals | ( | ) | const |
Number of superdiagonals.
Definition at line 195 of file BandMatrix.cpp.
References BandMatrix::m_ku.
Referenced by BandMatrix::factor(), and BandMatrix::solve().
size_t ldim | ( | ) | const |
Return the number of rows of storage needed for the band storage.
Definition at line 200 of file BandMatrix.cpp.
References BandMatrix::m_kl, and BandMatrix::m_ku.
Referenced by BandMatrix::factor(), and BandMatrix::solve().
vector_int & ipiv | ( | ) |
Return a reference to the pivot vector.
Definition at line 205 of file BandMatrix.cpp.
References BandMatrix::m_ipiv.
Referenced by BandMatrix::factor(), and BandMatrix::solve().
|
virtual |
Multiply A*b and write result to prod.
b | Vector to do the rh multiplication |
prod | OUTPUT vector to receive the result |
Implements GeneralMatrix.
Definition at line 213 of file BandMatrix.cpp.
References BandMatrix::_value(), BandMatrix::m_kl, BandMatrix::m_ku, BandMatrix::m_n, and BandMatrix::nRows().
|
virtual |
Multiply b*A and write result to prod.
b | Vector to do the lh multiplication |
prod | OUTPUT vector to receive the result |
Implements GeneralMatrix.
Definition at line 230 of file BandMatrix.cpp.
References BandMatrix::_value(), BandMatrix::m_kl, BandMatrix::m_ku, BandMatrix::m_n, and BandMatrix::nColumns().
|
virtual |
Perform an LU decomposition, the LAPACK routine DGBTRF is used.
The factorization is saved in ludata.
Implements GeneralMatrix.
Definition at line 248 of file BandMatrix.cpp.
References BandMatrix::data, DATA_PTR, BandMatrix::ipiv(), BandMatrix::ldim(), BandMatrix::ludata, BandMatrix::m_factored, BandMatrix::nColumns(), BandMatrix::nRows(), BandMatrix::nSubDiagonals(), and BandMatrix::nSuperDiagonals().
Referenced by BandMatrix::factorQR(), and BandMatrix::solve().
int solve | ( | const doublereal *const | b, |
doublereal *const | x | ||
) |
Solve the matrix problem Ax = b.
b | INPUT rhs of the problem |
x | OUTPUT solution to the problem |
Definition at line 267 of file BandMatrix.cpp.
References BandMatrix::m_n.
Referenced by MultiNewton::step().
|
virtual |
Solve the matrix problem Ax = b.
b | INPUT rhs of the problem OUTPUT solution to the problem |
Implements GeneralMatrix.
Definition at line 273 of file BandMatrix.cpp.
References DATA_PTR, BandMatrix::factor(), BandMatrix::ipiv(), BandMatrix::ldim(), BandMatrix::ludata, BandMatrix::m_factored, BandMatrix::nColumns(), BandMatrix::nSubDiagonals(), and BandMatrix::nSuperDiagonals().
|
virtual |
Returns an iterator for the start of the band storage data.
Iterator points to the beginning of the data, and it is changeable.
Implements GeneralMatrix.
Definition at line 293 of file BandMatrix.cpp.
References BandMatrix::data, and BandMatrix::m_factored.
vector_fp::iterator end | ( | ) |
Returns an iterator for the end of the band storage data.
Iterator points to the end of the data, and it is changeable.
Definition at line 299 of file BandMatrix.cpp.
References BandMatrix::data, and BandMatrix::m_factored.
|
virtual |
Returns a const iterator for the start of the band storage data.
Iterator points to the beginning of the data, and it is not changeable.
Implements GeneralMatrix.
Definition at line 305 of file BandMatrix.cpp.
References BandMatrix::data.
vector_fp::const_iterator end | ( | ) | const |
Returns a const iterator for the end of the band storage data.
Iterator points to the end of the data, and it is not changeable.
Definition at line 310 of file BandMatrix.cpp.
References BandMatrix::data.
|
virtual |
Zero the matrix elements.
Implements GeneralMatrix.
Definition at line 122 of file BandMatrix.cpp.
References BandMatrix::data, and BandMatrix::m_factored.
|
virtual |
Factors the A matrix using the QR algorithm, overwriting A.
we set m_factored to 2 to indicate the matrix is now QR factored
Implements GeneralMatrix.
Definition at line 333 of file BandMatrix.cpp.
References BandMatrix::factor().
|
virtual |
Returns an estimate of the inverse of the condition number for the matrix.
The matrix must have been previously factored using the QR algorithm
Implements GeneralMatrix.
Definition at line 339 of file BandMatrix.cpp.
References BandMatrix::oneNorm(), and BandMatrix::rcond().
|
virtual |
Returns an estimate of the inverse of the condition number for the matrix.
The matrix must have been previously factored using the LU algorithm
a1norm | Norm of the matrix |
Implements GeneralMatrix.
Definition at line 345 of file BandMatrix.cpp.
References DATA_PTR, Cantera::int2str(), BandMatrix::iwork_, BandMatrix::ludata, BandMatrix::m_factored, BandMatrix::m_ipiv, BandMatrix::m_kl, BandMatrix::m_ku, BandMatrix::m_n, BandMatrix::work_, and Cantera::writelogf().
Referenced by BandMatrix::rcondQR().
|
virtual |
Change the way the matrix is factored.
fAlgorithm | integer 0 LU factorization 1 QR factorization |
Implements GeneralMatrix.
Definition at line 376 of file BandMatrix.cpp.
|
virtual |
Returns the factor algorithm used.
0 LU decomposition 1 QR decomposition
This routine will always return 0
Implements GeneralMatrix.
Definition at line 381 of file BandMatrix.cpp.
|
virtual |
Returns the one norm of the matrix.
Implements GeneralMatrix.
Definition at line 386 of file BandMatrix.cpp.
References BandMatrix::m_colPtrs, BandMatrix::m_kl, BandMatrix::m_ku, BandMatrix::m_n, and BandMatrix::value().
Referenced by BandMatrix::rcondQR().
|
virtual |
Duplicator member function.
This function will duplicate the matrix given a generic GeneralMatrix
Implements GeneralMatrix.
Definition at line 456 of file BandMatrix.cpp.
References BandMatrix::BandMatrix().
|
virtual |
Report whether the current matrix has been factored.
Implements GeneralMatrix.
Definition at line 461 of file BandMatrix.cpp.
References BandMatrix::m_factored.
|
virtual |
Return a pointer to the top of column j, column values are assumed to be contiguous in memory.
The LAPACK bandstructure has column values which are contiguous in memory:
On entry, the matrix A in band storage, in rows KL+1 to 2*KL+KU+1; rows 1 to KL of the array need not be set. The j-th column of A is stored in the j-th column of the array AB as follows: AB(KL + KU + 1 + i - j,j) = A(i,j) for max(1, j - KU) <= i <= min(m, j + KL)
This routine returns the position of AB(1,j) (fortran-1 indexing) in the above format
So to address the (i,j) position, you use the following indexing:
double *colP_j = matrix.ptrColumn(j); double a_i_j = colP_j[kl + ku + i - j];
j | Value of the column |
Implements GeneralMatrix.
Definition at line 466 of file BandMatrix.cpp.
References BandMatrix::m_colPtrs.
|
virtual |
Return a vector of const pointers to the columns.
Note the value of the pointers are protected by their being const. However, the value of the matrix is open to being changed.
Implements GeneralMatrix.
Definition at line 471 of file BandMatrix.cpp.
References BandMatrix::m_colPtrs.
|
virtual |
Copy the data from one array into another without doing any checking.
This differs from the assignment operator as no resizing is done and memcpy() is used.
y | Array to be copied |
Implements GeneralMatrix.
Definition at line 476 of file BandMatrix.cpp.
References BandMatrix::data, DATA_PTR, BandMatrix::m_factored, BandMatrix::m_kl, BandMatrix::m_ku, BandMatrix::m_n, and GeneralMatrix::ptrColumn().
|
virtual |
Clear the factored flag.
Implements GeneralMatrix.
Definition at line 484 of file BandMatrix.cpp.
References BandMatrix::m_factored.
|
virtual |
Check to see if we have any zero rows in the jacobian.
This utility routine checks to see if any rows are zero. The smallest row is returned along with the largest coefficient in that row
valueSmall | OUTPUT value of the largest coefficient in the smallest row |
Implements GeneralMatrix.
Definition at line 404 of file BandMatrix.cpp.
References BandMatrix::m_kl, BandMatrix::m_ku, BandMatrix::m_n, Cantera::npos, and BandMatrix::value().
|
virtual |
Check to see if we have any zero columns in the jacobian.
This utility routine checks to see if any columns are zero. The smallest column is returned along with the largest coefficient in that column
valueSmall | OUTPUT value of the largest coefficient in the smallest column |
Implements GeneralMatrix.
Definition at line 430 of file BandMatrix.cpp.
References BandMatrix::m_kl, BandMatrix::m_ku, BandMatrix::m_n, Cantera::npos, and BandMatrix::value().
|
private |
Error function that gets called for unhandled cases.
msg | String containing the message. |
Definition at line 328 of file BandMatrix.cpp.
|
protected |
Matrix data.
Definition at line 341 of file BandMatrix.h.
Referenced by BandMatrix::_value(), BandMatrix::BandMatrix(), BandMatrix::begin(), BandMatrix::bfill(), BandMatrix::copyData(), BandMatrix::end(), BandMatrix::factor(), BandMatrix::operator=(), BandMatrix::resize(), BandMatrix::value(), and BandMatrix::zero().
|
protected |
Factorized data.
Definition at line 344 of file BandMatrix.h.
Referenced by BandMatrix::BandMatrix(), BandMatrix::factor(), BandMatrix::operator=(), BandMatrix::rcond(), BandMatrix::resize(), and BandMatrix::solve().
|
protected |
Boolean indicating whether the matrix is factored.
Definition at line 347 of file BandMatrix.h.
Referenced by BandMatrix::BandMatrix(), BandMatrix::begin(), BandMatrix::bfill(), BandMatrix::clearFactorFlag(), BandMatrix::copyData(), BandMatrix::end(), BandMatrix::factor(), BandMatrix::factored(), BandMatrix::operator=(), BandMatrix::rcond(), BandMatrix::resize(), BandMatrix::solve(), BandMatrix::value(), and BandMatrix::zero().
|
protected |
Number of rows and columns of the matrix.
Definition at line 350 of file BandMatrix.h.
Referenced by BandMatrix::BandMatrix(), BandMatrix::checkColumns(), BandMatrix::checkRows(), BandMatrix::copyData(), BandMatrix::leftMult(), BandMatrix::mult(), BandMatrix::nColumns(), BandMatrix::nRows(), BandMatrix::nRowsAndStruct(), BandMatrix::oneNorm(), BandMatrix::operator=(), BandMatrix::rcond(), BandMatrix::resize(), and BandMatrix::solve().
|
protected |
Number of subdiagonals of the matrix.
Definition at line 353 of file BandMatrix.h.
Referenced by BandMatrix::BandMatrix(), BandMatrix::checkColumns(), BandMatrix::checkRows(), BandMatrix::copyData(), BandMatrix::index(), BandMatrix::ldim(), BandMatrix::leftMult(), BandMatrix::mult(), BandMatrix::nRowsAndStruct(), BandMatrix::nSubDiagonals(), BandMatrix::oneNorm(), BandMatrix::operator=(), BandMatrix::rcond(), BandMatrix::resize(), and BandMatrix::value().
|
protected |
Number of super diagonals of the matrix.
Definition at line 356 of file BandMatrix.h.
Referenced by BandMatrix::BandMatrix(), BandMatrix::checkColumns(), BandMatrix::checkRows(), BandMatrix::copyData(), BandMatrix::index(), BandMatrix::ldim(), BandMatrix::leftMult(), BandMatrix::mult(), BandMatrix::nRowsAndStruct(), BandMatrix::nSuperDiagonals(), BandMatrix::oneNorm(), BandMatrix::operator=(), BandMatrix::rcond(), and BandMatrix::resize().
|
protected |
|
protected |
Pivot vector.
Definition at line 362 of file BandMatrix.h.
Referenced by BandMatrix::BandMatrix(), BandMatrix::ipiv(), BandMatrix::operator=(), BandMatrix::rcond(), and BandMatrix::resize().
|
protected |
Vector of column pointers.
Definition at line 365 of file BandMatrix.h.
Referenced by BandMatrix::BandMatrix(), BandMatrix::colPts(), BandMatrix::oneNorm(), BandMatrix::operator=(), BandMatrix::ptrColumn(), and BandMatrix::resize().
|
protected |
Extra work array needed - size = n.
Definition at line 368 of file BandMatrix.h.
Referenced by BandMatrix::rcond().
|
protected |
Extra dp work array needed - size = 3n.
Definition at line 371 of file BandMatrix.h.
Referenced by BandMatrix::rcond().