LaSymmBandMatDouble Class Reference

Symmetric Positive Definite Band Matrix Class. More...

#include <sybmd.h>

List of all members.

Declaration

 LaSymmBandMatDouble ()
 LaSymmBandMatDouble (int n, int p)
 LaSymmBandMatDouble (const LaSymmBandMatDouble &A)
 ~LaSymmBandMatDouble ()
LaSymmBandMatDoubleresize (int n, int p)
LaSymmBandMatDoubleresize (const LaSymmBandMatDouble &ob)

Assignments and Access

LaSymmBandMatDoubleoperator= (double scalar)
LaSymmBandMatDoubleoperator= (const LaSymmBandMatDouble &ob)
double & operator() (int i, int j)
double & operator() (int i, int j) const
LaSymmBandMatDoubleref (LaSymmBandMatDouble &ob)
LaSymmBandMatDoublecopy (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 LaSymmBandMatDoubleinfo () const
void print_data () const

Friends

std::ostream & operator<< (std::ostream &s, const LaSymmBandMatDouble &ob)


Detailed Description

Symmetric Positive Definite Band Matrix Class.

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 $ p=2k+1 $.

Internally a general matrix with dimension $2p+1 \times n$ will be created for storage.

For factorization of this matrix see functions in sybfd.h .

See also:
http://en.wikipedia.org/wiki/Band_matrix explains a general band matrix (not necessarily symmetric).


Constructor & Destructor Documentation

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 $ p=2k+1 $.

LaSymmBandMatDouble::LaSymmBandMatDouble ( const LaSymmBandMatDouble A  ) 

Create (deep) copy of another matrix.

LaSymmBandMatDouble::~LaSymmBandMatDouble (  ) 

Destroy matrix.


Member Function Documentation

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 $ p=2k+1 $.

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 $ p=2k+1 $.

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.


Friends And Related Function Documentation

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.

See also:
LaPreferences::setPrintFormat()


Generated on Sat Jul 14 11:40:37 2007 for Lapack++ by  doxygen 1.5.0