#include <sybmd.h>
Declaration | |
LaSymmBandMatDouble () | |
LaSymmBandMatDouble (int n, int p) | |
LaSymmBandMatDouble (const LaSymmBandMatDouble &A) | |
~LaSymmBandMatDouble () | |
LaSymmBandMatDouble & | resize (int n, int p) |
LaSymmBandMatDouble & | resize (const LaSymmBandMatDouble &ob) |
Assignments and Access | |
LaSymmBandMatDouble & | operator= (double scalar) |
LaSymmBandMatDouble & | operator= (const LaSymmBandMatDouble &ob) |
double & | operator() (int i, int j) |
double & | operator() (int i, int j) const |
LaSymmBandMatDouble & | ref (LaSymmBandMatDouble &ob) |
LaSymmBandMatDouble & | copy (const LaSymmBandMatDouble &ob) |
Information | |
int | size (int d) const |
int | inc (int d) const |
int | gdim (int d) const |
double * | addr () const |
int | ref_count () const |
LaIndex | index (int d) const |
int | subdiags () |
int | subdiags () const |
Debugging information | |
int | shallow () const |
int | debug () const |
int | debug (int d) |
const LaSymmBandMatDouble & | info () const |
void | print_data () const |
Friends | |
std::ostream & | operator<< (std::ostream &s, const LaSymmBandMatDouble &ob) |
This matrix holds a symmetric positive definite n x n banded matrix with bandwidth p, that it, with k subdiagonals and k superdiagonals the bandwidth will be .
Internally a general matrix with dimension will be created for storage.
For factorization of this matrix see functions in sybfd.h .
LaSymmBandMatDouble::LaSymmBandMatDouble | ( | ) |
Constructs a null 0x0 matrix.
LaSymmBandMatDouble::LaSymmBandMatDouble | ( | int | n, | |
int | p | |||
) |
Constructs a n x n symmetric matrix with bandwidth p, that is, with k subdiagonals and k superdiagonals the bandwidth will be .
LaSymmBandMatDouble::LaSymmBandMatDouble | ( | const LaSymmBandMatDouble & | A | ) |
Create (deep) copy of another matrix.
LaSymmBandMatDouble::~LaSymmBandMatDouble | ( | ) |
Destroy matrix.
LaSymmBandMatDouble& LaSymmBandMatDouble::resize | ( | int | n, | |
int | p | |||
) |
Resize to a new matrix of dimension n x n with bandwidth p.
LaSymmBandMatDouble& LaSymmBandMatDouble::resize | ( | const LaSymmBandMatDouble & | ob | ) |
Resize to a new matrix with same dimension and bandwidth as A.
LaSymmBandMatDouble& LaSymmBandMatDouble::operator= | ( | double | scalar | ) |
Set elements of left-hand side to the scalar value s.
LaSymmBandMatDouble& LaSymmBandMatDouble::operator= | ( | const LaSymmBandMatDouble & | ob | ) |
Copy elements of other matrix. This is an alias for copy().
double & LaSymmBandMatDouble::operator() | ( | int | i, | |
int | j | |||
) | [inline] |
Return element (i,j) of the matrix. Start index is (0,0) (zero-based offset).
Optional runtime bounds checking (0 <= i,j < n) is set by the compile time macro LA_BOUNDS_CHECK.
double & LaSymmBandMatDouble::operator() | ( | int | i, | |
int | j | |||
) | const [inline] |
Return element (i,j) of the matrix. Start index is (0,0) (zero-based offset).
Optional runtime bounds checking (0 <= i,j < n) is set by the compile time macro LA_BOUNDS_CHECK.
LaSymmBandMatDouble & LaSymmBandMatDouble::ref | ( | LaSymmBandMatDouble & | ob | ) | [inline] |
Let this matrix reference the given matrix ob
, so that the given matrix memory s is now referenced by multiple objects (by the given object ob and now also by this object).
LaSymmBandMatDouble& LaSymmBandMatDouble::copy | ( | const LaSymmBandMatDouble & | ob | ) |
Release left-hand side and copy elements of elements of ob
.
int LaSymmBandMatDouble::size | ( | int | d | ) | const [inline] |
Returns the length N of the dth dimension. Because the matrix is symmetric it is size(0) == size(1) == N.
Important: The size does not return the size of the internal stored matrix as it was in Lapack versions <= 2.4.13.
int LaSymmBandMatDouble::inc | ( | int | d | ) | const [inline] |
Returns the distance between memory locations (in terms of number of elements) between consecutive elements along dimension d. For example, if inc(d)
returns 1, then elements along the dth dimension are contiguous in memory.
int LaSymmBandMatDouble::gdim | ( | int | d | ) | const [inline] |
Returns the global dimensions of the (possibly larger) matrix owning this space. This will only differ from size(d)
if the current matrix is actually a submatrix view of some larger matrix.
double* LaSymmBandMatDouble::addr | ( | ) | const [inline] |
Returns the memory address of the first element of the matrix. G.addr()
is equivalent to &G(0,0)
.
int LaSymmBandMatDouble::ref_count | ( | ) | const [inline] |
Returns the number of data objects which utilize the same (or portions of the same) memory space used by this matrix.
LaIndex LaSymmBandMatDouble::index | ( | int | d | ) | const [inline] |
Returns the index specifying this submatrix view in dimension d
. (See LaIndex class.) This will only differ from a unit-stride index if the current matrix is actually a submatrix view of some larger matrix.
int LaSymmBandMatDouble::subdiags | ( | ) | [inline] |
Returns bandwidth of matrix.
Watch out: Contrary to the name of this method, it does not return the number of subdiagonals. Instead the bandwidth p is returned, that is, with k subdiagonals and k superdiagonals the bandwidth will be .
int LaSymmBandMatDouble::subdiags | ( | ) | const [inline] |
Returns bandwidth of matrix.
Watch out: Contrary to the name of this method, it does not return the number of superdiagonals. Instead the bandwidth p is returned, that is, with k subdiagonals and k superdiagonals the bandwidth will be .
int LaSymmBandMatDouble::shallow | ( | ) | const [inline] |
Returns global shallow flag
int LaSymmBandMatDouble::debug | ( | ) | const [inline] |
Returns global debug flag
int LaSymmBandMatDouble::debug | ( | int | d | ) | [inline] |
Set global debug flag
const LaSymmBandMatDouble& LaSymmBandMatDouble::info | ( | ) | const [inline] |
void LaSymmBandMatDouble::print_data | ( | ) | const [inline] |
Print the matrix info (not the actual elements) to the standard output.
std::ostream& operator<< | ( | std::ostream & | s, | |
const LaSymmBandMatDouble & | ob | |||
) | [friend] |
Print the matrix to the given output stream. If the matrix info flag is set, then this prints only the matrix info, see LaGenMatDouble::info(). Otherwise all matrix elements are printed.