A MatrixCommitment provides a set of acceptable matrix characteristics. More...
#include <MatrixCharacteristics.h>
Classes | |
class | Hermitian |
This is the default commitment for a Hermitian (*not* symmetric) matrix. More... | |
class | RowVector |
This is the default commitment for a row vector. More... | |
class | SkewHermitian |
This is the default commitment for a skew Hermitian (*not* skew symmetric) matrix. More... | |
class | SkewSymmetric |
This is the default commitment for skew symmetric (*not* skew Hermitian) matrix. More... | |
class | Symmetric |
This is the default commitment for a symmetric (*not* Hermitian) matrix. More... | |
class | Triangular |
This is the default commitment for a triangular matrix. More... | |
class | Vector |
This is the default commitment for a column vector. More... | |
Public Member Functions | |
MatrixCommitment () | |
MatrixCommitment (const MatrixStructure &str) | |
This is an implicit conversion from a MatrixStructure specification to a MatrixCommitment with storage, outline, and condition uncommitted. | |
MatrixCommitment & | commitSize (int m, int n) |
MatrixCommitment & | commitNumRows (int m) |
MatrixCommitment & | commitNumCols (int n) |
MatrixCommitment & | commitBandwidth (int lb, int ub) |
MatrixCommitment & | commitLowerBandwidth (int lb) |
MatrixCommitment & | commitUpperBandwidth (int ub) |
MatrixCommitment & | commitStructure (const MatrixStructure &s) |
MatrixCommitment & | commitStorage (const MatrixStorage &s) |
MatrixCommitment & | commitOutline (const MatrixOutline &o) |
MatrixCommitment & | commitCondition (const MatrixCondition &c) |
MatrixCharacter | calcDefaultCharacter (int minNumRows, int minNumCols) const |
For any handle commitment, we can calculate a "best character" for an allocation that satisfies the commitment, optionally with an initial allocation size. | |
const MatrixStructure & | getStructureCommitment () const |
These report the commitment as it was specified. | |
const MatrixStorage & | getStorageCommitment () const |
const MatrixOutline & | getOutlineCommitment () const |
const MatrixCondition & | getConditionCommitment () const |
const MatrixStructure::Mask & | getStructureMask () const |
These report the masks of acceptable values generated from the commitment. | |
const MatrixStorage::Mask & | getStorageMask () const |
const MatrixOutline::Mask & | getOutlineMask () const |
const MatrixCondition::Mask & | getConditionMask () const |
MatrixCharacter::Mask::SizeMask | getNumRowsMask () const |
MatrixCharacter::Mask::SizeMask | getNumColsMask () const |
MatrixCharacter::Mask::SizeMask | getLowerBandwidthMask () const |
MatrixCharacter::Mask::SizeMask | getUpperBandwidthMask () const |
int | getDefaultNumRows () const |
int | getDefaultNumCols () const |
bool | isSizeOK (int m, int n) const |
bool | isSizeOK (const std::pair< int, int > &mn) const |
bool | isBandwidthOK (int lower, int upper) const |
bool | isSatisfiedBy (const MatrixCharacter &actual) const |
bool | isStructureOK (const MatrixStructure &s) const |
bool | isStorageOK (const MatrixStorage &s) const |
bool | isOutlineOK (const MatrixOutline &o) const |
bool | isConditionOK (const MatrixCondition &c) const |
bool | isResizeable () const |
bool | isFullyResizeable () const |
bool | isNumRowsLocked () const |
bool | isNumColsLocked () const |
bool | isStructureCommitted () const |
bool | isStorageCommitted () const |
bool | isOutlineCommitted () const |
bool | isConditionCommitted () const |
void | clear () |
Set commitment s to "none" and masks to "uncommitted" for all characteristics. | |
Protected Member Functions | |
MatrixCommitment (const MatrixStructure &structure, const MatrixStorage &storage, const MatrixOutline &outline, const MatrixCondition &condition) | |
Protected Attributes | |
MatrixStructure | structure |
These are the commitments as specified. | |
MatrixStorage | storage |
MatrixOutline | outline |
MatrixCondition | condition |
MatrixCharacter::Mask | masks |
These are the bitmasks of acceptable characteristics which would satisfy the above-specified commitments. |
A MatrixCommitment provides a set of acceptable matrix characteristics.
Since we define the characteristics each with its own bit, a commitment is implemented as a set of masks with bits set corresponding to the acceptable characteristics.
MatrixCommitment | ( | ) | [inline] |
MatrixCommitment | ( | const MatrixStructure & | str | ) | [inline] |
This is an implicit conversion from a MatrixStructure specification to a MatrixCommitment with storage, outline, and condition uncommitted.
References MatrixCommitment::MatrixCommitment().
Referenced by MatrixCommitment::MatrixCommitment().
MatrixCommitment | ( | const MatrixStructure & | structure, | |
const MatrixStorage & | storage, | |||
const MatrixOutline & | outline, | |||
const MatrixCondition & | condition | |||
) | [inline, protected] |
MatrixCharacter calcDefaultCharacter | ( | int | minNumRows, | |
int | minNumCols | |||
) | const |
For any handle commitment, we can calculate a "best character" for an allocation that satisfies the commitment, optionally with an initial allocation size.
Typically it is the least-restrictive actual character that satisfies the commitment. For example, if the commitment is Triangular we'll allocate a full triangular matrix, not a banded one, or a symmetric one, or for that matter an identity matrix, all of which would satisfy the commitment. The supplied sizes are used as minima -- if the commitment requires a larger minimum size you'll get that. For example, if you specify 0x0 but you're committed to a Column outline, you'll get 0x1.
void clear | ( | ) | [inline] |
Set commitment s to "none" and masks to "uncommitted" for all characteristics.
MatrixCommitment& commitBandwidth | ( | int | lb, | |
int | ub | |||
) | [inline] |
MatrixCommitment& commitCondition | ( | const MatrixCondition & | c | ) | [inline] |
References MatrixCondition::mask().
MatrixCommitment& commitLowerBandwidth | ( | int | lb | ) | [inline] |
References SimTK_SIZECHECK_NONNEG.
MatrixCommitment& commitNumCols | ( | int | n | ) | [inline] |
References SimTK_SIZECHECK_NONNEG.
Referenced by RowVector::RowVector().
MatrixCommitment& commitNumRows | ( | int | m | ) | [inline] |
References SimTK_SIZECHECK_NONNEG.
Referenced by Vector::Vector().
MatrixCommitment& commitOutline | ( | const MatrixOutline & | o | ) | [inline] |
References MatrixOutline::mask().
MatrixCommitment& commitSize | ( | int | m, | |
int | n | |||
) | [inline] |
MatrixCommitment& commitStorage | ( | const MatrixStorage & | s | ) | [inline] |
References MatrixStorage::mask().
MatrixCommitment& commitStructure | ( | const MatrixStructure & | s | ) | [inline] |
References MatrixStructure::mask().
MatrixCommitment& commitUpperBandwidth | ( | int | ub | ) | [inline] |
References SimTK_SIZECHECK_NONNEG.
const MatrixCondition& getConditionCommitment | ( | ) | const [inline] |
const MatrixCondition::Mask& getConditionMask | ( | ) | const [inline] |
References Mask::condition.
int getDefaultNumCols | ( | ) | const [inline] |
int getDefaultNumRows | ( | ) | const [inline] |
MatrixCharacter::Mask::SizeMask getLowerBandwidthMask | ( | ) | const [inline] |
MatrixCharacter::Mask::SizeMask getNumColsMask | ( | ) | const [inline] |
MatrixCharacter::Mask::SizeMask getNumRowsMask | ( | ) | const [inline] |
const MatrixOutline& getOutlineCommitment | ( | ) | const [inline] |
const MatrixOutline::Mask& getOutlineMask | ( | ) | const [inline] |
References Mask::outline.
const MatrixStorage& getStorageCommitment | ( | ) | const [inline] |
const MatrixStorage::Mask& getStorageMask | ( | ) | const [inline] |
const MatrixStructure& getStructureCommitment | ( | ) | const [inline] |
These report the commitment as it was specified.
const MatrixStructure::Mask& getStructureMask | ( | ) | const [inline] |
These report the masks of acceptable values generated from the commitment.
References Mask::structure.
MatrixCharacter::Mask::SizeMask getUpperBandwidthMask | ( | ) | const [inline] |
bool isBandwidthOK | ( | int | lower, | |
int | upper | |||
) | const [inline] |
bool isConditionCommitted | ( | ) | const [inline] |
bool isConditionOK | ( | const MatrixCondition & | c | ) | const [inline] |
bool isFullyResizeable | ( | ) | const [inline] |
bool isNumColsLocked | ( | ) | const [inline] |
bool isNumRowsLocked | ( | ) | const [inline] |
bool isOutlineCommitted | ( | ) | const [inline] |
bool isOutlineOK | ( | const MatrixOutline & | o | ) | const [inline] |
bool isResizeable | ( | ) | const [inline] |
Referenced by MatrixBase< Real >::isResizeable().
bool isSatisfiedBy | ( | const MatrixCharacter & | actual | ) | const [inline] |
bool isSizeOK | ( | const std::pair< int, int > & | mn | ) | const [inline] |
References MatrixCommitment::isSizeOK().
Referenced by MatrixCommitment::isSizeOK().
bool isSizeOK | ( | int | m, | |
int | n | |||
) | const [inline] |
bool isStorageCommitted | ( | ) | const [inline] |
bool isStorageOK | ( | const MatrixStorage & | s | ) | const [inline] |
bool isStructureCommitted | ( | ) | const [inline] |
bool isStructureOK | ( | const MatrixStructure & | s | ) | const [inline] |
MatrixCondition condition [protected] |
MatrixCharacter::Mask masks [protected] |
These are the bitmasks of acceptable characteristics which would satisfy the above-specified commitments.
MatrixOutline outline [protected] |
MatrixStorage storage [protected] |
MatrixStructure structure [protected] |
These are the commitments as specified.
They are used to fill in the corresponding bitmasks of acceptable characteristics below.