ConstrainedOptPack::MatrixSymPosDefBandedChol Class Reference

Matrix subclass for banded symmetric positive definite matrices and their Cholesky factors. More...

#include <ConstrainedOptPack_MatrixSymPosDefBandedChol.hpp>

List of all members.

Public Types

typedef Teuchos::RefCountPtr<
MemMngPack::ReleaseResource
release_resource_ptr_t
 

Public Member Functions

 MatrixSymPosDefBandedChol (size_type n=0, size_type kd=0, DMatrixSlice *MB=NULL, const release_resource_ptr_t &MB_release_resource_ptr=NULL, BLAS_Cpp::Uplo MB_uplo=BLAS_Cpp::lower, DMatrixSlice *UB=NULL, const release_resource_ptr_t &UB_release_resource_ptr=NULL, BLAS_Cpp::Uplo UB_uplo=BLAS_Cpp::lower, bool update_factor=false, value_type scale=1.0)
 Construct and Initialize.
void initialize (size_type n=0, size_type kd=0, DMatrixSlice *MB=NULL, const release_resource_ptr_t &MB_release_resource_ptr=NULL, BLAS_Cpp::Uplo MB_uplo=BLAS_Cpp::lower, DMatrixSlice *UB=NULL, const release_resource_ptr_t &UB_release_resource_ptr=NULL, BLAS_Cpp::Uplo UB_uplo=BLAS_Cpp::lower, bool update_factor=false, value_type scale=1.0)
 Initialize.
size_type kd () const
 
DMatrixSliceMB ()
 Get view of MB.
const DMatrixSliceMB () const
 
BLAS_Cpp::Uplo MB_uplo () const
 
DMatrixSliceUB ()
 Get view of UB.
const DMatrixSliceUB () const
 
BLAS_Cpp::Uplo UB_uplo () const
 
size_type rows () const
 
size_type nz () const
 
std::ostream & output (std::ostream &out) const
 
void Vp_StMtV (DVectorSlice *vs_lhs, value_type alpha, BLAS_Cpp::Transp trans_rhs1, const DVectorSlice &vs_rhs2, value_type beta) const
 
void Vp_StMtV (DVectorSlice *vs_lhs, value_type alpha, BLAS_Cpp::Transp trans_rhs1, const SpVectorSlice &sv_rhs2, value_type beta) const
 
void Vp_StPtMtV (DVectorSlice *vs_lhs, value_type alpha, const GenPermMatrixSlice &P_rhs1, BLAS_Cpp::Transp P_rhs1_trans, BLAS_Cpp::Transp M_rhs2_trans, const DVectorSlice &vs_rhs3, value_type beta) const
 
void Vp_StPtMtV (DVectorSlice *vs_lhs, value_type alpha, const GenPermMatrixSlice &P_rhs1, BLAS_Cpp::Transp P_rhs1_trans, BLAS_Cpp::Transp M_rhs2_trans, const SpVectorSlice &sv_rhs3, value_type beta) const
 
void V_InvMtV (DVectorSlice *vs_lhs, BLAS_Cpp::Transp trans_rhs1, const DVectorSlice &vs_rhs2) const
 With throw exception if factorization is not allowed.

Private Member Functions

void assert_initialized () const
void update_factorization () const

Private Attributes

size_type n_
size_type kd_
DMatrixSlice MB_
release_resource_ptr_t MB_release_resource_ptr_
BLAS_Cpp::Uplo MB_uplo_
DMatrixSlice UB_
release_resource_ptr_t UB_release_resource_ptr_
BLAS_Cpp::Uplo UB_uplo_
bool factor_updated_
value_type scale_


Detailed Description

Matrix subclass for banded symmetric positive definite matrices and their Cholesky factors.

This class is designed to support the LAPACK routines for banded symmetric positive definite matrices. The banded matrix and/or its cholesky factor are stored in simple flat rectangular matrices compatible with the LAPACK routines.

For example, for #n = 8, kd = 3# the original matrix M# (if set) is stored in the following format MB#: {verbatim}

M MB

[ x x x x ] [ x x x x x x x x ] [ x x x x x ] lower triangle [ x x x x x x x o ] [ x x x x x x ] => [ x x x x x x o o ] [ x x x x x x x ] [ x x x x x o o o ] [ x x x x x x x ] [ x x x x x x ] [ o o o x x x x x ] [ x x x x x ] upper triangle [ o o x x x x x x ] [ x x x x ] => [ o x x x x x x x ] [ x x x x x x x x ] {verbatim} The Cholesky factor U# is sorted in a similar format UB#. Technically, the matrix is M = scale * U'*U# so that M# may be negative definite as well.

Definition at line 65 of file ConstrainedOptPack_MatrixSymPosDefBandedChol.hpp.


Member Typedef Documentation

typedef Teuchos::RefCountPtr< MemMngPack::ReleaseResource> ConstrainedOptPack::MatrixSymPosDefBandedChol::release_resource_ptr_t
 

Definition at line 71 of file ConstrainedOptPack_MatrixSymPosDefBandedChol.hpp.


Constructor & Destructor Documentation

ConstrainedOptPack::MatrixSymPosDefBandedChol::MatrixSymPosDefBandedChol size_type  n = 0,
size_type  kd = 0,
DMatrixSlice MB = NULL,
const release_resource_ptr_t MB_release_resource_ptr = NULL,
BLAS_Cpp::Uplo  MB_uplo = BLAS_Cpp::lower,
DMatrixSlice UB = NULL,
const release_resource_ptr_t UB_release_resource_ptr = NULL,
BLAS_Cpp::Uplo  UB_uplo = BLAS_Cpp::lower,
bool  update_factor = false,
value_type  scale = 1.0
 

Construct and Initialize.

This constructor just calls #this->initialize(...)#.

Definition at line 69 of file ConstrainedOptPack_MatrixSymPosDefBandedChol.cpp.


Member Function Documentation

void ConstrainedOptPack::MatrixSymPosDefBandedChol::initialize size_type  n = 0,
size_type  kd = 0,
DMatrixSlice MB = NULL,
const release_resource_ptr_t MB_release_resource_ptr = NULL,
BLAS_Cpp::Uplo  MB_uplo = BLAS_Cpp::lower,
DMatrixSlice UB = NULL,
const release_resource_ptr_t UB_release_resource_ptr = NULL,
BLAS_Cpp::Uplo  UB_uplo = BLAS_Cpp::lower,
bool  update_factor = false,
value_type  scale = 1.0
 

Initialize.

If called with all of the default arguments then #this# will become uninitialized.

ToDo: Finish pre and post conditions!

Parameters:
n [in] Determines the size of the banded matrix (n x n). If #n == 0# then all of the following arguments should be left at their defaults and #this# will become uninitialized.
kd [in] Determines the band width of the matrix as defined by xPBTRF(...).
MB [in/state] If MB != NULL# then this matrix (size (kd+1) x n) is used to store the original banded matrix MB# in the format of xPBTRF(...). This matrix must be initialized on input.
MB_release_resource_ptr [in] Only significant if MB != NULL#. Points to a resource to be released when MB# is no longer needed.
MB_uplo [in] Determines if MB# is stores the upper or lower triangular elements.
UB [in/state] If UB != NULL# then this matrix (size (kd+1) x n) is used to store the Cholesky factor of the banded matrix in the format of xPBTRF(...). This matrix may or may not be initialized on input. If #update_factor == false# this this matrix must already be initialized. If #update_factor == true# then this matrix will be computed. 2 * If UB == NULL# then storage for the Cholesky factor will be computed on the fly and will be factored.
UB_release_resource_ptr [in] Only significant if UB != NULL#. Points to a resource to be released when UB# is no longer needed.
UB_uplo [in] Determines if UB# is stores the upper or lower triangular elements.
update_factor [in] If true then the factor will be computed within this function call.
scale [in] Only significant if MB != NULL# or UB != NULL# (see intro).

Definition at line 86 of file ConstrainedOptPack_MatrixSymPosDefBandedChol.cpp.

size_type ConstrainedOptPack::MatrixSymPosDefBandedChol::kd  )  const [inline]
 

Definition at line 219 of file ConstrainedOptPack_MatrixSymPosDefBandedChol.hpp.

DMatrixSlice & ConstrainedOptPack::MatrixSymPosDefBandedChol::MB  )  [inline]
 

Get view of MB.

Definition at line 225 of file ConstrainedOptPack_MatrixSymPosDefBandedChol.hpp.

const DMatrixSlice & ConstrainedOptPack::MatrixSymPosDefBandedChol::MB  )  const [inline]
 

Definition at line 231 of file ConstrainedOptPack_MatrixSymPosDefBandedChol.hpp.

BLAS_Cpp::Uplo ConstrainedOptPack::MatrixSymPosDefBandedChol::MB_uplo  )  const [inline]
 

Definition at line 237 of file ConstrainedOptPack_MatrixSymPosDefBandedChol.hpp.

DMatrixSlice & ConstrainedOptPack::MatrixSymPosDefBandedChol::UB  )  [inline]
 

Get view of UB.

Definition at line 243 of file ConstrainedOptPack_MatrixSymPosDefBandedChol.hpp.

const DMatrixSlice & ConstrainedOptPack::MatrixSymPosDefBandedChol::UB  )  const [inline]
 

Definition at line 249 of file ConstrainedOptPack_MatrixSymPosDefBandedChol.hpp.

BLAS_Cpp::Uplo ConstrainedOptPack::MatrixSymPosDefBandedChol::UB_uplo  )  const [inline]
 

Definition at line 255 of file ConstrainedOptPack_MatrixSymPosDefBandedChol.hpp.

size_type ConstrainedOptPack::MatrixSymPosDefBandedChol::rows  )  const
 

Definition at line 175 of file ConstrainedOptPack_MatrixSymPosDefBandedChol.cpp.

size_type ConstrainedOptPack::MatrixSymPosDefBandedChol::nz  )  const
 

Definition at line 180 of file ConstrainedOptPack_MatrixSymPosDefBandedChol.cpp.

std::ostream & ConstrainedOptPack::MatrixSymPosDefBandedChol::output std::ostream &  out  )  const
 

Definition at line 185 of file ConstrainedOptPack_MatrixSymPosDefBandedChol.cpp.

void ConstrainedOptPack::MatrixSymPosDefBandedChol::Vp_StMtV DVectorSlice vs_lhs,
value_type  alpha,
BLAS_Cpp::Transp  trans_rhs1,
const DVectorSlice vs_rhs2,
value_type  beta
const
 

Definition at line 190 of file ConstrainedOptPack_MatrixSymPosDefBandedChol.cpp.

void ConstrainedOptPack::MatrixSymPosDefBandedChol::Vp_StMtV DVectorSlice vs_lhs,
value_type  alpha,
BLAS_Cpp::Transp  trans_rhs1,
const SpVectorSlice sv_rhs2,
value_type  beta
const
 

Definition at line 208 of file ConstrainedOptPack_MatrixSymPosDefBandedChol.cpp.

void ConstrainedOptPack::MatrixSymPosDefBandedChol::Vp_StPtMtV DVectorSlice vs_lhs,
value_type  alpha,
const GenPermMatrixSlice &  P_rhs1,
BLAS_Cpp::Transp  P_rhs1_trans,
BLAS_Cpp::Transp  M_rhs2_trans,
const DVectorSlice vs_rhs3,
value_type  beta
const
 

Definition at line 216 of file ConstrainedOptPack_MatrixSymPosDefBandedChol.cpp.

void ConstrainedOptPack::MatrixSymPosDefBandedChol::Vp_StPtMtV DVectorSlice vs_lhs,
value_type  alpha,
const GenPermMatrixSlice &  P_rhs1,
BLAS_Cpp::Transp  P_rhs1_trans,
BLAS_Cpp::Transp  M_rhs2_trans,
const SpVectorSlice sv_rhs3,
value_type  beta
const
 

Definition at line 226 of file ConstrainedOptPack_MatrixSymPosDefBandedChol.cpp.

void ConstrainedOptPack::MatrixSymPosDefBandedChol::V_InvMtV DVectorSlice vs_lhs,
BLAS_Cpp::Transp  trans_rhs1,
const DVectorSlice vs_rhs2
const
 

With throw exception if factorization is not allowed.

Definition at line 238 of file ConstrainedOptPack_MatrixSymPosDefBandedChol.cpp.

void ConstrainedOptPack::MatrixSymPosDefBandedChol::assert_initialized  )  const [private]
 

Definition at line 275 of file ConstrainedOptPack_MatrixSymPosDefBandedChol.cpp.

void ConstrainedOptPack::MatrixSymPosDefBandedChol::update_factorization  )  const [private]
 

Definition at line 282 of file ConstrainedOptPack_MatrixSymPosDefBandedChol.cpp.


Member Data Documentation

size_type ConstrainedOptPack::MatrixSymPosDefBandedChol::n_ [private]
 

Definition at line 196 of file ConstrainedOptPack_MatrixSymPosDefBandedChol.hpp.

size_type ConstrainedOptPack::MatrixSymPosDefBandedChol::kd_ [private]
 

Definition at line 197 of file ConstrainedOptPack_MatrixSymPosDefBandedChol.hpp.

DMatrixSlice ConstrainedOptPack::MatrixSymPosDefBandedChol::MB_ [private]
 

Definition at line 198 of file ConstrainedOptPack_MatrixSymPosDefBandedChol.hpp.

release_resource_ptr_t ConstrainedOptPack::MatrixSymPosDefBandedChol::MB_release_resource_ptr_ [private]
 

Definition at line 199 of file ConstrainedOptPack_MatrixSymPosDefBandedChol.hpp.

BLAS_Cpp::Uplo ConstrainedOptPack::MatrixSymPosDefBandedChol::MB_uplo_ [private]
 

Definition at line 200 of file ConstrainedOptPack_MatrixSymPosDefBandedChol.hpp.

DMatrixSlice ConstrainedOptPack::MatrixSymPosDefBandedChol::UB_ [mutable, private]
 

Definition at line 201 of file ConstrainedOptPack_MatrixSymPosDefBandedChol.hpp.

release_resource_ptr_t ConstrainedOptPack::MatrixSymPosDefBandedChol::UB_release_resource_ptr_ [mutable, private]
 

Definition at line 202 of file ConstrainedOptPack_MatrixSymPosDefBandedChol.hpp.

BLAS_Cpp::Uplo ConstrainedOptPack::MatrixSymPosDefBandedChol::UB_uplo_ [mutable, private]
 

Definition at line 203 of file ConstrainedOptPack_MatrixSymPosDefBandedChol.hpp.

bool ConstrainedOptPack::MatrixSymPosDefBandedChol::factor_updated_ [mutable, private]
 

Definition at line 204 of file ConstrainedOptPack_MatrixSymPosDefBandedChol.hpp.

value_type ConstrainedOptPack::MatrixSymPosDefBandedChol::scale_ [private]
 

Definition at line 205 of file ConstrainedOptPack_MatrixSymPosDefBandedChol.hpp.


The documentation for this class was generated from the following files:
Generated on Thu Sep 18 12:36:15 2008 for MOOCHO (Single Doxygen Collection) by doxygen 1.3.9.1