Simbody  3.7
SimTK::MatrixCommitment Class Reference

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

+ Inheritance diagram for SimTK::MatrixCommitment:

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. More...
 
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. More...
 
const MatrixStructuregetStructureCommitment () const
 These report the commitment as it was specified. More...
 
const MatrixStoragegetStorageCommitment () const
 
const MatrixOutlinegetOutlineCommitment () const
 
const MatrixConditiongetConditionCommitment () const
 
const MatrixStructure::MaskgetStructureMask () const
 These report the masks of acceptable values generated from the commitment. More...
 
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. More...
 

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. More...
 
MatrixStorage storage
 
MatrixOutline outline
 
MatrixCondition condition
 
MatrixCharacter::Mask masks
 These are the bitmasks of acceptable characteristics which would satisfy the above-specified commitments. More...
 

Related Functions

(Note that these are not member functions.)

std::ostream & operator<< (std::ostream &o, const MatrixCommitment &)
 Output a textual description of a MatrixCommitment; handy for debugging. More...
 

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() [1/3]

SimTK::MatrixCommitment::MatrixCommitment ( )
inline

◆ MatrixCommitment() [2/3]

SimTK::MatrixCommitment::MatrixCommitment ( const MatrixStructure str)
inline

This is an implicit conversion from a MatrixStructure specification to a MatrixCommitment with storage, outline, and condition uncommitted.

◆ MatrixCommitment() [3/3]

SimTK::MatrixCommitment::MatrixCommitment ( const MatrixStructure structure,
const MatrixStorage storage,
const MatrixOutline outline,
const MatrixCondition condition 
)
inlineprotected

Member Function Documentation

◆ commitSize()

MatrixCommitment& SimTK::MatrixCommitment::commitSize ( int  m,
int  n 
)
inline

◆ commitNumRows()

MatrixCommitment& SimTK::MatrixCommitment::commitNumRows ( int  m)
inline

◆ commitNumCols()

MatrixCommitment& SimTK::MatrixCommitment::commitNumCols ( int  n)
inline

◆ commitBandwidth()

MatrixCommitment& SimTK::MatrixCommitment::commitBandwidth ( int  lb,
int  ub 
)
inline

◆ commitLowerBandwidth()

MatrixCommitment& SimTK::MatrixCommitment::commitLowerBandwidth ( int  lb)
inline

◆ commitUpperBandwidth()

MatrixCommitment& SimTK::MatrixCommitment::commitUpperBandwidth ( int  ub)
inline

◆ commitStructure()

MatrixCommitment& SimTK::MatrixCommitment::commitStructure ( const MatrixStructure s)
inline

◆ commitStorage()

MatrixCommitment& SimTK::MatrixCommitment::commitStorage ( const MatrixStorage s)
inline

◆ commitOutline()

MatrixCommitment& SimTK::MatrixCommitment::commitOutline ( const MatrixOutline o)
inline

◆ commitCondition()

MatrixCommitment& SimTK::MatrixCommitment::commitCondition ( const MatrixCondition c)
inline

◆ calcDefaultCharacter()

MatrixCharacter SimTK::MatrixCommitment::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.

◆ getStructureCommitment()

const MatrixStructure& SimTK::MatrixCommitment::getStructureCommitment ( ) const
inline

These report the commitment as it was specified.

◆ getStorageCommitment()

const MatrixStorage& SimTK::MatrixCommitment::getStorageCommitment ( ) const
inline

◆ getOutlineCommitment()

const MatrixOutline& SimTK::MatrixCommitment::getOutlineCommitment ( ) const
inline

◆ getConditionCommitment()

const MatrixCondition& SimTK::MatrixCommitment::getConditionCommitment ( ) const
inline

◆ getStructureMask()

const MatrixStructure::Mask& SimTK::MatrixCommitment::getStructureMask ( ) const
inline

These report the masks of acceptable values generated from the commitment.

◆ getStorageMask()

const MatrixStorage::Mask& SimTK::MatrixCommitment::getStorageMask ( ) const
inline

◆ getOutlineMask()

const MatrixOutline::Mask& SimTK::MatrixCommitment::getOutlineMask ( ) const
inline

◆ getConditionMask()

const MatrixCondition::Mask& SimTK::MatrixCommitment::getConditionMask ( ) const
inline

◆ getNumRowsMask()

MatrixCharacter::Mask::SizeMask SimTK::MatrixCommitment::getNumRowsMask ( ) const
inline

◆ getNumColsMask()

MatrixCharacter::Mask::SizeMask SimTK::MatrixCommitment::getNumColsMask ( ) const
inline

◆ getLowerBandwidthMask()

MatrixCharacter::Mask::SizeMask SimTK::MatrixCommitment::getLowerBandwidthMask ( ) const
inline

◆ getUpperBandwidthMask()

MatrixCharacter::Mask::SizeMask SimTK::MatrixCommitment::getUpperBandwidthMask ( ) const
inline

◆ getDefaultNumRows()

int SimTK::MatrixCommitment::getDefaultNumRows ( ) const
inline

◆ getDefaultNumCols()

int SimTK::MatrixCommitment::getDefaultNumCols ( ) const
inline

◆ isSizeOK() [1/2]

bool SimTK::MatrixCommitment::isSizeOK ( int  m,
int  n 
) const
inline

◆ isSizeOK() [2/2]

bool SimTK::MatrixCommitment::isSizeOK ( const std::pair< int, int > &  mn) const
inline

◆ isBandwidthOK()

bool SimTK::MatrixCommitment::isBandwidthOK ( int  lower,
int  upper 
) const
inline

◆ isSatisfiedBy()

bool SimTK::MatrixCommitment::isSatisfiedBy ( const MatrixCharacter actual) const
inline

◆ isStructureOK()

bool SimTK::MatrixCommitment::isStructureOK ( const MatrixStructure s) const
inline

◆ isStorageOK()

bool SimTK::MatrixCommitment::isStorageOK ( const MatrixStorage s) const
inline

◆ isOutlineOK()

bool SimTK::MatrixCommitment::isOutlineOK ( const MatrixOutline o) const
inline

◆ isConditionOK()

bool SimTK::MatrixCommitment::isConditionOK ( const MatrixCondition c) const
inline

◆ isResizeable()

bool SimTK::MatrixCommitment::isResizeable ( ) const
inline

◆ isFullyResizeable()

bool SimTK::MatrixCommitment::isFullyResizeable ( ) const
inline

◆ isNumRowsLocked()

bool SimTK::MatrixCommitment::isNumRowsLocked ( ) const
inline

◆ isNumColsLocked()

bool SimTK::MatrixCommitment::isNumColsLocked ( ) const
inline

◆ isStructureCommitted()

bool SimTK::MatrixCommitment::isStructureCommitted ( ) const
inline

◆ isStorageCommitted()

bool SimTK::MatrixCommitment::isStorageCommitted ( ) const
inline

◆ isOutlineCommitted()

bool SimTK::MatrixCommitment::isOutlineCommitted ( ) const
inline

◆ isConditionCommitted()

bool SimTK::MatrixCommitment::isConditionCommitted ( ) const
inline

◆ clear()

void SimTK::MatrixCommitment::clear ( )
inline

Set commitment s to "none" and masks to "uncommitted" for all characteristics.

Friends And Related Function Documentation

◆ operator<<()

std::ostream & operator<< ( std::ostream &  o,
const MatrixCommitment  
)
related

Output a textual description of a MatrixCommitment; handy for debugging.

Member Data Documentation

◆ structure

MatrixStructure SimTK::MatrixCommitment::structure
protected

These are the commitments as specified.

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

◆ storage

MatrixStorage SimTK::MatrixCommitment::storage
protected

◆ outline

MatrixOutline SimTK::MatrixCommitment::outline
protected

◆ condition

MatrixCondition SimTK::MatrixCommitment::condition
protected

◆ masks

MatrixCharacter::Mask SimTK::MatrixCommitment::masks
protected

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


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