ConstrainedOptPack::MatrixHessianSuperBasic Class Reference

Matrix class that represents a hessian matrix where only the super submatrix for the super basic variables need be nonsingular. More...

#include <ConstrainedOptPack_MatrixHessianSuperBasic.hpp>

Inheritance diagram for ConstrainedOptPack::MatrixHessianSuperBasic:

[legend]
List of all members.

Provide access to constituent members

const GenPermMatrixSlice & Q_R () const
 
const GenPermMatrixSlice & Q_X () const
 
const bnd_fixed_tbnd_fixed () const
 
const B_RR_ptr_tB_RR_ptr () const
 
const B_RX_ptr_tB_RX_ptr () const
 
BLAS_Cpp::Transp B_RX_trans () const
 
const B_XX_ptr_tB_XX_ptr () const
 

Overridden from Matrix

size_type rows () const

Overridden from MatrixOp

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 &sv_rhs3, value_type beta) const
 
value_type transVtMtV (const SpVectorSlice &sv_rhs1, BLAS_Cpp::Transp trans_rhs2, const SpVectorSlice &sv_rhs3) const
 

Public Types

typedef Teuchos::RefCountPtr<
const MatrixSymWithOpFactorized > 
B_RR_ptr_t
 
typedef Teuchos::RefCountPtr<
const MatrixOp > 
B_RX_ptr_t
 
typedef Teuchos::RefCountPtr<
const MatrixSymOp > 
B_XX_ptr_t
 
typedef std::vector< EBoundsbnd_fixed_t
 

Public Member Functions

 MatrixHessianSuperBasic ()
 Constructs to uninitialized.
virtual void initialize (size_type n, size_type n_R, const size_type i_x_free[], const size_type i_x_fixed[], const EBounds bnd_fixed[], const B_RR_ptr_t &B_RR_ptr, const B_RX_ptr_t &B_RX_ptr, BLAS_Cpp::Transp B_RX_trans, const B_XX_ptr_t &B_XX_ptr)
 Initialize the matrix.

Protected Member Functions

void assert_initialized () const
 

Private Types

typedef std::vector< size_typerow_i_t
typedef std::vector< size_typecol_j_t

Private Attributes

size_type n_
size_type n_R_
GenPermMatrixSlice Q_R_
row_i_t Q_R_row_i_
col_j_t Q_R_col_j_
GenPermMatrixSlice Q_X_
row_i_t Q_X_row_i_
col_j_t Q_X_col_j_
bnd_fixed_t bnd_fixed_
B_RR_ptr_t B_RR_ptr_
B_RX_ptr_t B_RX_ptr_
BLAS_Cpp::Transp B_RX_trans_
B_XX_ptr_t B_XX_ptr_

Detailed Description

Matrix class that represents a hessian matrix where only the super submatrix for the super basic variables need be nonsingular.

Given a Hessian matrix B# and a partitioning of the variables #Q = [ Q_R Q_X ]# into free (superbasic) Q_R'*x# and fixed (nonbasic) Q_X'*x# variables, this class represents the following matrix: {verbatim} [n,n] == size(B) [n,n] == size(Q), Q is an othogonal permutation matrix (i.e. Q*Q' = Q'*Q = I) [n,n_R] == size(Q_R) [n,n_X] == size(Q_X)

B = Q*Q'*B*Q*Q' = [ Q_R Q_X ] * [ Q_R'*B*Q_R Q_R'*B*Q_X ] * [ Q_R' ] [ Q_X'*B*Q_R Q_X'*B*Q_X ] [ Q_X' ]

= [ Q_R Q_X ] * [ B_RR op(B_RX) ] * [ Q_R' ] [ op(B_RX') B_XX ] [ Q_X' ]

= Q_R*B_RR*Q_R' + Q_R*op(B_RX)*Q_X' + Q_X*op(B_RX')*Q_R + Q_X*B_XX*Q_X' {verbatim} Above, we allow the prepresentation of #op(B_RX) = Q_R'*B*Q_X# to be transposed to allow for more flexibility. Since #B_RR# and #B_XX# are symmetric, we do not need to worry about transpose or not. For this class the matrix #B_RR# is required to be symmetric and nonsingular (#MatrixSymWithOpFactorized# interface), but not necessarily positive definite. This is the condition necessary for the Hessian when projected into the active constraints at the solution for an NLP. The other matrices hold no other special properties other than #B_XX# being symmetric of course.

The default compiler generated constructors are allowed and initialize the matrix to uninitialized by default.

Definition at line 74 of file ConstrainedOptPack_MatrixHessianSuperBasic.hpp.


Member Typedef Documentation

typedef Teuchos::RefCountPtr<const MatrixSymWithOpFactorized> ConstrainedOptPack::MatrixHessianSuperBasic::B_RR_ptr_t
 

Definition at line 81 of file ConstrainedOptPack_MatrixHessianSuperBasic.hpp.

typedef Teuchos::RefCountPtr<const MatrixOp> ConstrainedOptPack::MatrixHessianSuperBasic::B_RX_ptr_t
 

Definition at line 84 of file ConstrainedOptPack_MatrixHessianSuperBasic.hpp.

typedef Teuchos::RefCountPtr<const MatrixSymOp> ConstrainedOptPack::MatrixHessianSuperBasic::B_XX_ptr_t
 

Definition at line 87 of file ConstrainedOptPack_MatrixHessianSuperBasic.hpp.

typedef std::vector<EBounds> ConstrainedOptPack::MatrixHessianSuperBasic::bnd_fixed_t
 

Definition at line 90 of file ConstrainedOptPack_MatrixHessianSuperBasic.hpp.

typedef std::vector<size_type> ConstrainedOptPack::MatrixHessianSuperBasic::row_i_t [private]
 

Definition at line 229 of file ConstrainedOptPack_MatrixHessianSuperBasic.hpp.

typedef std::vector<size_type> ConstrainedOptPack::MatrixHessianSuperBasic::col_j_t [private]
 

Definition at line 230 of file ConstrainedOptPack_MatrixHessianSuperBasic.hpp.


Constructor & Destructor Documentation

ConstrainedOptPack::MatrixHessianSuperBasic::MatrixHessianSuperBasic  ) 
 

Constructs to uninitialized.

Definition at line 45 of file ConstrainedOptPack_MatrixHessianSuperBasic.cpp.


Member Function Documentation

void ConstrainedOptPack::MatrixHessianSuperBasic::initialize size_type  n,
size_type  n_R,
const size_type  i_x_free[],
const size_type  i_x_fixed[],
const EBounds  bnd_fixed[],
const B_RR_ptr_t B_RR_ptr,
const B_RX_ptr_t B_RX_ptr,
BLAS_Cpp::Transp  B_RX_trans,
const B_XX_ptr_t B_XX_ptr
[virtual]
 

Initialize the matrix.

Preconditions:{itemize} [#i_x_free != NULL#] #0 < i_x_free[l-1] <= n, l = 1...n_R# (throw ???) [#i_x_fixed != NULL#]#0 < i_x_fixed[l-1] <= n, l = 1...n-n_R# (throw ???) [#i_x_free != NULL && i_x_fixed != NULL#] #i_x_free[l-1] != i_x_fixed[p-1], l = 1...n_R, p = 1...n-n_X# (throw ???) [#n_R > 0#] #B_RR_ptr.get() != NULL && B_RR_ptr->rows() == n_R && B_RR_ptr->cols() == n_R# (throw #std::invalid_argument#) [#n_R == 0#] #B_RR_ptr.get() == NULL# (throw #std::invalid_argument#) [#n_R < n && B_RX_ptr.get() != NULL && B_RX_trans == no_trans#] B_RX_ptr->rows() == n_R && B_RX_ptr->cols() == n-n_R# (throw #std::invalid_argument#) [#n_R < n && B_RX_ptr.get() != NULL && B_RX_trans == trans#] B_RX_ptr->rows() == n-n_R && B_RX_ptr->cols() == n_R# (throw #std::invalid_argument#) [#n_R == n#] #B_RX_ptr.get() == NULL# (throw ##std::invalid_argument#) [#n_R < n#] #B_XX_ptr.get() != NULL && B_XX_ptr->rows() == n-n_R && B_XX_ptr->cols() == n-n_R# (throw #std::invalid_argument#) [#n_R == n#] #B_XX_ptr.get() == NULL# (throw ##std::invalid_argument#) {itemize}

Parameters:
n [in] number of variables (used for consistency checking)
n_R [in] number of initially free variables (used for consistency checking)
i_x_free [in] array (size #n_R#): #i_x_free[l-1], l = 1...n_R# defines the matrix Q_R# as:\ #Q_R(:,l) = e(i_x_free[l-1]), l = 1...n_R#\ The ordering of these indices is significant. If #n == n_R# then #i_x_free == NULL# is allowed in which case it is assumed to be identity. If #n_R == 0# then of course #i_x_free == NULL# is allowed.
i_x_fixed [in] array (size #n_X = n - n_R#): #i_x_fixed[l-1], l = 1...n_X# defines the matrix Q_X# as:\ #Q_X(:,l) = e(i_x_fixed[l-1]), l = 1...n_X#\ The ordering of these indices is significant. If #n_R==0# then #i_x_fixed == NULL# is allowed in which case it is assumed to be identity. If #n_R == n# then of course #i_x_fixed == NULL# is allowed.
bnd_fixed [in] array (size #n_X#): bnd_fixed[l-1], l = 1...n_X# defines what bound the variables in #i_x_fixed[l-1], l = 1...n_X# are fixed at: LOWER#, UPPER# or EQUALITY#. If #n_R == n# then of course bnd_fixed == NULL# is allowed.
B_RR_ptr [in] Smart pointer to matrix #B_RR# (size #n_R x n_R#) for the free (super basic) variables. #B_RR_ptr.get() != NULL# must be true if #n_R > # or an exception will be thrown. if #n_R == 0# then #B_RR_ptr.get() == NULL# may be true.
B_RX_ptr [in] Smart pointer to matrix #B_RX# (size #n_R x n_X# if B_RX_trans==no_trans# or #n_X x n_R# if B_RX_trans==trans#) for the cross terms of free (super basic) and fixed (nonbasic) variables. It is allowed for #B_RX_ptr.get() == NULL#.
B_RX_trans [in] Determines if op(B_RX) = B_RX (no_trans#) or op(B_RX) = B_RX' (trans#). Ignored if #n_R == n#.
B_XX_ptr [in] Smart pointer to matrix B_XX (size #n_X x n_X#) for the fixed (nonbasic) variables. #B_XX_ptr.get() != NULL# must be true if #n_R < n# or an exception will be thrown. If #n_R == n# then #B_XX_ptr.get() == NULL# may be true.

Reimplemented in ConstrainedOptPack::MatrixHessianSuperBasicInitDiagonal.

Definition at line 49 of file ConstrainedOptPack_MatrixHessianSuperBasic.cpp.

const GenPermMatrixSlice & ConstrainedOptPack::MatrixHessianSuperBasic::Q_R  )  const [inline]
 

Definition at line 255 of file ConstrainedOptPack_MatrixHessianSuperBasic.hpp.

const GenPermMatrixSlice & ConstrainedOptPack::MatrixHessianSuperBasic::Q_X  )  const [inline]
 

Definition at line 262 of file ConstrainedOptPack_MatrixHessianSuperBasic.hpp.

const MatrixHessianSuperBasic::bnd_fixed_t & ConstrainedOptPack::MatrixHessianSuperBasic::bnd_fixed  )  const [inline]
 

Definition at line 270 of file ConstrainedOptPack_MatrixHessianSuperBasic.hpp.

const MatrixHessianSuperBasic::B_RR_ptr_t & ConstrainedOptPack::MatrixHessianSuperBasic::B_RR_ptr  )  const [inline]
 

Definition at line 277 of file ConstrainedOptPack_MatrixHessianSuperBasic.hpp.

const MatrixHessianSuperBasic::B_RX_ptr_t & ConstrainedOptPack::MatrixHessianSuperBasic::B_RX_ptr  )  const [inline]
 

Definition at line 285 of file ConstrainedOptPack_MatrixHessianSuperBasic.hpp.

BLAS_Cpp::Transp ConstrainedOptPack::MatrixHessianSuperBasic::B_RX_trans  )  const [inline]
 

Definition at line 291 of file ConstrainedOptPack_MatrixHessianSuperBasic.hpp.

const MatrixHessianSuperBasic::B_XX_ptr_t & ConstrainedOptPack::MatrixHessianSuperBasic::B_XX_ptr  )  const [inline]
 

Definition at line 299 of file ConstrainedOptPack_MatrixHessianSuperBasic.hpp.

size_type ConstrainedOptPack::MatrixHessianSuperBasic::rows  )  const
 

Definition at line 149 of file ConstrainedOptPack_MatrixHessianSuperBasic.cpp.

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

Definition at line 156 of file ConstrainedOptPack_MatrixHessianSuperBasic.cpp.

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

Definition at line 228 of file ConstrainedOptPack_MatrixHessianSuperBasic.cpp.

void ConstrainedOptPack::MatrixHessianSuperBasic::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 sv_rhs3,
value_type  beta
const
 

Definition at line 300 of file ConstrainedOptPack_MatrixHessianSuperBasic.cpp.

value_type ConstrainedOptPack::MatrixHessianSuperBasic::transVtMtV const SpVectorSlice sv_rhs1,
BLAS_Cpp::Transp  trans_rhs2,
const SpVectorSlice sv_rhs3
const
 

Definition at line 384 of file ConstrainedOptPack_MatrixHessianSuperBasic.cpp.

void ConstrainedOptPack::MatrixHessianSuperBasic::assert_initialized  )  const [protected]
 

Definition at line 474 of file ConstrainedOptPack_MatrixHessianSuperBasic.cpp.


Member Data Documentation

size_type ConstrainedOptPack::MatrixHessianSuperBasic::n_ [private]
 

Definition at line 235 of file ConstrainedOptPack_MatrixHessianSuperBasic.hpp.

size_type ConstrainedOptPack::MatrixHessianSuperBasic::n_R_ [private]
 

Definition at line 236 of file ConstrainedOptPack_MatrixHessianSuperBasic.hpp.

GenPermMatrixSlice ConstrainedOptPack::MatrixHessianSuperBasic::Q_R_ [private]
 

Definition at line 237 of file ConstrainedOptPack_MatrixHessianSuperBasic.hpp.

row_i_t ConstrainedOptPack::MatrixHessianSuperBasic::Q_R_row_i_ [private]
 

Definition at line 238 of file ConstrainedOptPack_MatrixHessianSuperBasic.hpp.

col_j_t ConstrainedOptPack::MatrixHessianSuperBasic::Q_R_col_j_ [private]
 

Definition at line 239 of file ConstrainedOptPack_MatrixHessianSuperBasic.hpp.

GenPermMatrixSlice ConstrainedOptPack::MatrixHessianSuperBasic::Q_X_ [private]
 

Definition at line 240 of file ConstrainedOptPack_MatrixHessianSuperBasic.hpp.

row_i_t ConstrainedOptPack::MatrixHessianSuperBasic::Q_X_row_i_ [private]
 

Definition at line 241 of file ConstrainedOptPack_MatrixHessianSuperBasic.hpp.

col_j_t ConstrainedOptPack::MatrixHessianSuperBasic::Q_X_col_j_ [private]
 

Definition at line 242 of file ConstrainedOptPack_MatrixHessianSuperBasic.hpp.

bnd_fixed_t ConstrainedOptPack::MatrixHessianSuperBasic::bnd_fixed_ [private]
 

Definition at line 243 of file ConstrainedOptPack_MatrixHessianSuperBasic.hpp.

B_RR_ptr_t ConstrainedOptPack::MatrixHessianSuperBasic::B_RR_ptr_ [private]
 

Definition at line 244 of file ConstrainedOptPack_MatrixHessianSuperBasic.hpp.

B_RX_ptr_t ConstrainedOptPack::MatrixHessianSuperBasic::B_RX_ptr_ [private]
 

Definition at line 245 of file ConstrainedOptPack_MatrixHessianSuperBasic.hpp.

BLAS_Cpp::Transp ConstrainedOptPack::MatrixHessianSuperBasic::B_RX_trans_ [private]
 

Definition at line 246 of file ConstrainedOptPack_MatrixHessianSuperBasic.hpp.

B_XX_ptr_t ConstrainedOptPack::MatrixHessianSuperBasic::B_XX_ptr_ [private]
 

Definition at line 247 of file ConstrainedOptPack_MatrixHessianSuperBasic.hpp.


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