Ipopt
3.12.12
|
This is the matrix space for CompoundMatrix. More...
#include <IpCompoundMatrix.hpp>
Public Member Functions | |
SmartPtr< const MatrixSpace > | GetCompSpace (Index irow, Index jcol) const |
Obtain the component MatrixSpace in block row irow and block column jcol. More... | |
CompoundMatrix * | MakeNewCompoundMatrix () const |
Method for creating a new matrix of this specific type. More... | |
virtual Matrix * | MakeNew () const |
Overloaded MakeNew method for the MatrixSpace base class. More... | |
Constructors / Destructors | |
CompoundMatrixSpace (Index ncomps_rows, Index ncomps_cols, Index total_nRows, Index total_nCols) | |
Constructor, given the number of row and columns blocks, as well as the totel number of rows and columns. More... | |
~CompoundMatrixSpace () | |
Destructor. More... | |
Methods for setting information about the components. | |
void | SetBlockRows (Index irow, Index nrows) |
Set the number nrows of rows in row-block number irow. More... | |
void | SetBlockCols (Index jcol, Index ncols) |
Set the number ncols of columns in column-block number jcol. More... | |
Index | GetBlockRows (Index irow) const |
Get the number nrows of rows in row-block number irow. More... | |
Index | GetBlockCols (Index jcol) const |
Set the number ncols of columns in column-block number jcol. More... | |
void | SetCompSpace (Index irow, Index jcol, const MatrixSpace &mat_space, bool auto_allocate=false) |
Set the component MatrixSpace. More... | |
Accessor methods | |
Index | NComps_Rows () const |
Number of block rows. More... | |
Index | NComps_Cols () const |
Number of block columns. More... | |
bool | Diagonal () const |
True if the blocks lie on the diagonal - can make some operations faster. More... | |
![]() | |
Index | NRows () const |
Accessor function for the number of rows. More... | |
Index | NCols () const |
Accessor function for the number of columns. More... | |
bool | IsMatrixFromSpace (const Matrix &matrix) const |
Method to test if a given matrix belongs to a particular matrix space. More... | |
MatrixSpace (Index nRows, Index nCols) | |
Constructor, given the number rows and columns of all matrices generated by this MatrixSpace. More... | |
virtual | ~MatrixSpace () |
Destructor. More... | |
![]() | |
ReferencedObject () | |
virtual | ~ReferencedObject () |
Index | ReferenceCount () const |
void | AddRef (const Referencer *referencer) const |
void | ReleaseRef (const Referencer *referencer) const |
Private Member Functions | |
bool | DimensionsSet () const |
Auxilliary function for debugging to set if all block dimensions have been set. More... | |
Default Compiler Generated Methods | |
(Hidden to avoid implicit creation/calling). These methods are not implemented and we do not want the compiler to implement them for us, so we declare them private and do not define them. This ensures that they will not be implicitly created/called. | |
CompoundMatrixSpace () | |
Default constructor. More... | |
CompoundMatrixSpace (const CompoundMatrixSpace &) | |
Copy Constructor. More... | |
CompoundMatrixSpace & | operator= (const CompoundMatrixSpace &) |
Overloaded Equals Operator. More... | |
Private Attributes | |
Index | ncomps_rows_ |
Number of block rows. More... | |
Index | ncomps_cols_ |
Number of block columns. More... | |
bool | dimensions_set_ |
Store whether or not the dimensions are valid. More... | |
std::vector< std::vector < SmartPtr< const MatrixSpace > > > | comp_spaces_ |
2-dim std::vector of matrix spaces for the components More... | |
std::vector< std::vector< bool > > | allocate_block_ |
2-dim std::vector of booleans deciding whether to allocate a new matrix for the blocks automagically More... | |
std::vector< Index > | block_rows_ |
Vector of the number of rows in each comp column. More... | |
std::vector< Index > | block_cols_ |
Vector of the number of cols in each comp row. More... | |
bool | diagonal_ |
true if the CompoundMatrixSpace only has Matrix spaces along the diagonal. More... | |
This is the matrix space for CompoundMatrix.
Before a CompoundMatrix can be created, at least one MatrixSpace has to be set per block row and column. Individual component MatrixSpace's can be set with the SetComp method.
Definition at line 168 of file IpCompoundMatrix.hpp.
Ipopt::CompoundMatrixSpace::CompoundMatrixSpace | ( | Index | ncomps_rows, |
Index | ncomps_cols, | ||
Index | total_nRows, | ||
Index | total_nCols | ||
) |
Constructor, given the number of row and columns blocks, as well as the totel number of rows and columns.
|
inline |
Destructor.
Definition at line 182 of file IpCompoundMatrix.hpp.
|
private |
Default constructor.
|
private |
Copy Constructor.
Set the number nrows of rows in row-block number irow.
Set the number ncols of columns in column-block number jcol.
Get the number nrows of rows in row-block number irow.
Set the number ncols of columns in column-block number jcol.
void Ipopt::CompoundMatrixSpace::SetCompSpace | ( | Index | irow, |
Index | jcol, | ||
const MatrixSpace & | mat_space, | ||
bool | auto_allocate = false |
||
) |
Set the component MatrixSpace.
If auto_allocate is true, then a new CompoundMatrix created later with MakeNew will have this component automatically created with the Matrix's MakeNew. Otherwise, the corresponding component will be NULL and has to be set with the SetComp methods of the CompoundMatrix.
|
inline |
Obtain the component MatrixSpace in block row irow and block column jcol.
Definition at line 214 of file IpCompoundMatrix.hpp.
|
inline |
Number of block rows.
Definition at line 224 of file IpCompoundMatrix.hpp.
|
inline |
Number of block columns.
Definition at line 229 of file IpCompoundMatrix.hpp.
|
inline |
True if the blocks lie on the diagonal - can make some operations faster.
Definition at line 235 of file IpCompoundMatrix.hpp.
CompoundMatrix* Ipopt::CompoundMatrixSpace::MakeNewCompoundMatrix | ( | ) | const |
Method for creating a new matrix of this specific type.
|
inlinevirtual |
Overloaded MakeNew method for the MatrixSpace base class.
Implements Ipopt::MatrixSpace.
Definition at line 246 of file IpCompoundMatrix.hpp.
|
private |
Overloaded Equals Operator.
|
private |
Auxilliary function for debugging to set if all block dimensions have been set.
|
private |
Number of block rows.
Definition at line 271 of file IpCompoundMatrix.hpp.
|
private |
Number of block columns.
Definition at line 274 of file IpCompoundMatrix.hpp.
|
mutableprivate |
Store whether or not the dimensions are valid.
Definition at line 277 of file IpCompoundMatrix.hpp.
|
private |
2-dim std::vector of matrix spaces for the components
Definition at line 280 of file IpCompoundMatrix.hpp.
|
private |
2-dim std::vector of booleans deciding whether to allocate a new matrix for the blocks automagically
Definition at line 284 of file IpCompoundMatrix.hpp.
|
private |
Vector of the number of rows in each comp column.
Definition at line 287 of file IpCompoundMatrix.hpp.
|
private |
Vector of the number of cols in each comp row.
Definition at line 290 of file IpCompoundMatrix.hpp.
|
private |
true if the CompoundMatrixSpace only has Matrix spaces along the diagonal.
this means that the CompoundMatrix will only have matrices along the diagonal and it could make some operations more efficient
Definition at line 296 of file IpCompoundMatrix.hpp.