Simbody  3.7
SimTK::MatrixStorage Class Reference

Matrix "storage" refers to the physical layout of data in the computer's memory. More...

Classes

struct  Mask
 Use this class to represent sets of acceptable values for each of the storage attributes (packing, position, order, diagonal). More...
 

Public Types

enum  Packing {
  NoPacking = 0x0000,
  Full = 0x0001,
  TriInFull = 0x0002,
  TriPacked = 0x0004,
  Banded = 0x0008,
  Vector = 0x0010,
  Scalar = 0x0020,
  Permutation = 0x0040
}
 
enum  Placement {
  NoPlacement = 0x0000,
  Lower = 0x0001,
  Upper = 0x0002
}
 
enum  Order {
  NoOrder = 0x0000,
  ColumnOrder = 0x0001,
  RowOrder = 0x0002
}
 
enum  Diagonal {
  NoDiag = 0x0000,
  StoredDiag = 0x0001,
  AssumedDiag = 0x0002
}
 
typedef unsigned short PackingMask
 
typedef unsigned short PlacementMask
 
typedef unsigned short OrderMask
 
typedef unsigned short DiagonalMask
 

Public Member Functions

std::string name () const
 
Mask mask () const
 Calculate the commitment mask associated with specifying "this" set of storage attributes as a commitment. More...
 
 MatrixStorage ()
 Default constructor leaves all fields unspecified. More...
 
 MatrixStorage (Packing pk, Placement pl=NoPlacement, Order o=NoOrder, Diagonal d=NoDiag)
 This constructor is also an implicit conversion from the Packing enum to a MatrixStorage object which does not contain any specification for placement, order, or storage of diagonal elements. More...
 
 MatrixStorage (Packing pk, Order o)
 This constructor is for the common case of just packing and order, with no particular placement and a stored diagonal. More...
 
MatrixStoragesetMissingAttributes ()
 Assuming this is an actual matrix description, set any unspecified attributes to appropriate defaults to match the specified packing. More...
 
MatrixStoragesetToNone ()
 Restore this object to its default-constructed state of "none". More...
 
MatrixStoragesetPacking (Packing p)
 
MatrixStoragesetPlacement (Placement p)
 
MatrixStoragesetOrder (Order o)
 
MatrixStoragesetDiagonal (Diagonal d)
 
Packing getPacking () const
 
Placement getPlacement () const
 
Order getOrder () const
 
Diagonal getDiagonal () const
 

Static Public Member Functions

static const char * name (Packing)
 
static const char * name (Placement)
 
static const char * name (Order)
 
static const char * name (Diagonal)
 
static MatrixStorage calcDefaultStorage (const MatrixStructure &, const MatrixOutline &)
 

Static Public Attributes

static const PackingMask AllPacking = 0x007fU
 
static const PackingMask UncommittedPacking = 0xffffU
 
static const PlacementMask AllPlacement = 0x0003U
 
static const PlacementMask UncommittedPlacement = 0xffffU
 
static const OrderMask AllOrder = 0x03U
 
static const OrderMask UncommittedOrder = 0xffU
 
static const DiagonalMask AllDiagonal = 0x0003U
 
static const DiagonalMask UncommittedDiagonal = 0xffffU
 

Detailed Description

Matrix "storage" refers to the physical layout of data in the computer's memory.

Whenever possible we attempt to store data in a format that enables use of special high performance methods, such as those available in the SimTK LAPACK/BLAS implementation.

Member Typedef Documentation

◆ PackingMask

typedef unsigned short SimTK::MatrixStorage::PackingMask

◆ PlacementMask

typedef unsigned short SimTK::MatrixStorage::PlacementMask

◆ OrderMask

typedef unsigned short SimTK::MatrixStorage::OrderMask

◆ DiagonalMask

typedef unsigned short SimTK::MatrixStorage::DiagonalMask

Member Enumeration Documentation

◆ Packing

Enumerator
NoPacking 
Full 
TriInFull 
TriPacked 
Banded 
Vector 
Scalar 
Permutation 

◆ Placement

Enumerator
NoPlacement 
Lower 
Upper 

◆ Order

Enumerator
NoOrder 
ColumnOrder 
RowOrder 

◆ Diagonal

Enumerator
NoDiag 
StoredDiag 
AssumedDiag 

Constructor & Destructor Documentation

◆ MatrixStorage() [1/3]

SimTK::MatrixStorage::MatrixStorage ( )
inline

Default constructor leaves all fields unspecified.

◆ MatrixStorage() [2/3]

SimTK::MatrixStorage::MatrixStorage ( Packing  pk,
Placement  pl = NoPlacement,
Order  o = NoOrder,
Diagonal  d = NoDiag 
)
inline

This constructor is also an implicit conversion from the Packing enum to a MatrixStorage object which does not contain any specification for placement, order, or storage of diagonal elements.

◆ MatrixStorage() [3/3]

SimTK::MatrixStorage::MatrixStorage ( Packing  pk,
Order  o 
)
inline

This constructor is for the common case of just packing and order, with no particular placement and a stored diagonal.

Member Function Documentation

◆ name() [1/5]

static const char* SimTK::MatrixStorage::name ( Packing  )
static

◆ name() [2/5]

static const char* SimTK::MatrixStorage::name ( Placement  )
static

◆ name() [3/5]

static const char* SimTK::MatrixStorage::name ( Order  )
static

◆ name() [4/5]

static const char* SimTK::MatrixStorage::name ( Diagonal  )
static

◆ calcDefaultStorage()

static MatrixStorage SimTK::MatrixStorage::calcDefaultStorage ( const MatrixStructure ,
const MatrixOutline  
)
static

◆ name() [5/5]

std::string SimTK::MatrixStorage::name ( ) const
inline

◆ mask()

Mask SimTK::MatrixStorage::mask ( ) const
inline

Calculate the commitment mask associated with specifying "this" set of storage attributes as a commitment.

Here the mask will either be fully uncommitted or set to a specific value for each attribute; they are all mutually exclusive.

◆ setMissingAttributes()

MatrixStorage& SimTK::MatrixStorage::setMissingAttributes ( )
inline

Assuming this is an actual matrix description, set any unspecified attributes to appropriate defaults to match the specified packing.

◆ setToNone()

MatrixStorage& SimTK::MatrixStorage::setToNone ( )
inline

Restore this object to its default-constructed state of "none".

◆ setPacking()

MatrixStorage& SimTK::MatrixStorage::setPacking ( Packing  p)
inline

◆ setPlacement()

MatrixStorage& SimTK::MatrixStorage::setPlacement ( Placement  p)
inline

◆ setOrder()

MatrixStorage& SimTK::MatrixStorage::setOrder ( Order  o)
inline

◆ setDiagonal()

MatrixStorage& SimTK::MatrixStorage::setDiagonal ( Diagonal  d)
inline

◆ getPacking()

Packing SimTK::MatrixStorage::getPacking ( ) const
inline

◆ getPlacement()

Placement SimTK::MatrixStorage::getPlacement ( ) const
inline

◆ getOrder()

Order SimTK::MatrixStorage::getOrder ( ) const
inline

◆ getDiagonal()

Diagonal SimTK::MatrixStorage::getDiagonal ( ) const
inline

Member Data Documentation

◆ AllPacking

const PackingMask SimTK::MatrixStorage::AllPacking = 0x007fU
static

◆ UncommittedPacking

const PackingMask SimTK::MatrixStorage::UncommittedPacking = 0xffffU
static

◆ AllPlacement

const PlacementMask SimTK::MatrixStorage::AllPlacement = 0x0003U
static

◆ UncommittedPlacement

const PlacementMask SimTK::MatrixStorage::UncommittedPlacement = 0xffffU
static

◆ AllOrder

const OrderMask SimTK::MatrixStorage::AllOrder = 0x03U
static

◆ UncommittedOrder

const OrderMask SimTK::MatrixStorage::UncommittedOrder = 0xffU
static

◆ AllDiagonal

const DiagonalMask SimTK::MatrixStorage::AllDiagonal = 0x0003U
static

◆ UncommittedDiagonal

const DiagonalMask SimTK::MatrixStorage::UncommittedDiagonal = 0xffffU
static

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