|
ConstrainedOptPack: C++ Tools for Constrained (and Unconstrained) Optimization
Version of the Day
|
Matrix class that adds the ability to initialize to a diagonal to a MatrixHessainSuperBasic object. More...
#include <ConstrainedOptPack_MatrixHessianSuperBasicInitDiagonal.hpp>

Public Member Functions | |
| MatrixHessianSuperBasicInitDiagonal () | |
| Constructs to uninitialized. | |
Overridden from MatrixHessianSuperBasic. | |
| 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 and require B_RR to support #MatrixSymInitDiag#. | |
Overridden from MatrixSymInitDiag. | |
These function call the corresponding functions on B_RR_ptr()# and then call the equivalent of: {verbatim} MatrixHessianSuperBasic::initialize( this->B_RR_ptr()->rows(),this->B_RR_ptr()->cols() ,NULL,NULL,NULL ,this->B_RR_ptr() ,this->B_RX_ptr(),this->B_RX_trans() ,this->B_XX_ptr() ); {verbatim} | |
| void | init_identity (size_type n, value_type alpha) |
| | |
| void | init_diagonal (const DVectorSlice &diag) |
| | |
Matrix class that adds the ability to initialize to a diagonal to a MatrixHessainSuperBasic object.
Essentially, the matrix #B_RR# must support the #MatrixSymInitDiag# interface.
Definition at line 59 of file ConstrainedOptPack_MatrixHessianSuperBasicInitDiagonal.hpp.
Constructs to uninitialized.
| void ConstrainedOptPack::MatrixHessianSuperBasicInitDiagonal::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 and require B_RR to support #MatrixSymInitDiag#.
Preconditions:{itemize} #dynamic_cast<MatrixSymInitDiag*>(const_cast<MatrixSymWithOpFactorized*>(B_RR_ptr.get())) != NULL# {itemize}
This overridden function is a little bit of a hack but it is better than the alternatives that I could think of. What is important is that the #MatrixSymInitDiag# interface for this class will be supported as long as this function executes succesfully on initialization. This is far better than waiting until later when dynamic casting would be done and failed. We need to catch any mistakes right away.
In this manner we will have given up some compile-time checking but the run-time check will be very good.
Reimplemented from ConstrainedOptPack::MatrixHessianSuperBasic.
| void ConstrainedOptPack::MatrixHessianSuperBasicInitDiagonal::init_identity | ( | size_type | n, |
| value_type | alpha | ||
| ) |
| void ConstrainedOptPack::MatrixHessianSuperBasicInitDiagonal::init_diagonal | ( | const DVectorSlice & | diag | ) |
1.7.6.1