MatrixCommitment Class Reference
[Matrix Characteristics]

A MatrixCommitment provides a set of acceptable matrix characteristics. More...

#include <MatrixCharacteristics.h>

Inheritance diagram for MatrixCommitment:
Hermitian RowVector SkewHermitian SkewSymmetric Symmetric Triangular Vector

List of all members.

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.
MatrixCommitmentcommitSize (int m, int n)
MatrixCommitmentcommitNumRows (int m)
MatrixCommitmentcommitNumCols (int n)
MatrixCommitmentcommitBandwidth (int lb, int ub)
MatrixCommitmentcommitLowerBandwidth (int lb)
MatrixCommitmentcommitUpperBandwidth (int ub)
MatrixCommitmentcommitStructure (const MatrixStructure &s)
MatrixCommitmentcommitStorage (const MatrixStorage &s)
MatrixCommitmentcommitOutline (const MatrixOutline &o)
MatrixCommitmentcommitCondition (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 MatrixStructuregetStructureCommitment () const
 These report the commitment as it was specified.
const MatrixStoragegetStorageCommitment () const
const MatrixOutlinegetOutlineCommitment () const
const MatrixConditiongetConditionCommitment () const
const MatrixStructure::MaskgetStructureMask () const
 These report the masks of acceptable values generated from the commitment.
const MatrixStorage::MaskgetStorageMask () const
const MatrixOutline::MaskgetOutlineMask () const
const MatrixCondition::MaskgetConditionMask () 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.

Detailed Description

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.


Constructor & Destructor Documentation

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]

Member Function Documentation

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]
MatrixCommitment& commitLowerBandwidth ( int  lb  )  [inline]
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]
MatrixCommitment& commitUpperBandwidth ( int  ub  )  [inline]
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]
bool isSatisfiedBy ( const MatrixCharacter actual  )  const [inline]
bool isSizeOK ( const std::pair< int, int > &  mn  )  const [inline]
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]

Member Data Documentation

These are the bitmasks of acceptable characteristics which would satisfy the above-specified commitments.

MatrixOutline outline [protected]
MatrixStorage storage [protected]

These are the commitments as specified.

They are used to fill in the corresponding bitmasks of acceptable characteristics below.


The documentation for this class was generated from the following file:

Generated on Thu Aug 12 16:38:25 2010 for SimTKcore by  doxygen 1.6.1