Simbody
|
Matrix "storage" refers to the physical layout of data in the computer’s memory. More...
#include <MatrixCharacteristics.h>
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. | |
MatrixStorage () | |
Default constructor leaves all fields unspecified. | |
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. | |
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. | |
MatrixStorage & | setMissingAttributes () |
Assuming this is an actual matrix description, set any unspecified attributes to appropriate defaults to match the specified packing. | |
MatrixStorage & | setToNone () |
Restore this object to its default-constructed state of "none". | |
MatrixStorage & | setPacking (Packing p) |
MatrixStorage & | setPlacement (Placement p) |
MatrixStorage & | setOrder (Order o) |
MatrixStorage & | setDiagonal (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 |
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.
typedef unsigned short SimTK::MatrixStorage::PackingMask |
typedef unsigned short SimTK::MatrixStorage::PlacementMask |
typedef unsigned short SimTK::MatrixStorage::OrderMask |
typedef unsigned short SimTK::MatrixStorage::DiagonalMask |
SimTK::MatrixStorage::MatrixStorage | ( | ) | [inline] |
Default constructor leaves all fields unspecified.
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.
This constructor is for the common case of just packing and order, with no particular placement and a stored diagonal.
static const char* SimTK::MatrixStorage::name | ( | Packing | ) | [static] |
static const char* SimTK::MatrixStorage::name | ( | Placement | ) | [static] |
static const char* SimTK::MatrixStorage::name | ( | Order | ) | [static] |
static const char* SimTK::MatrixStorage::name | ( | Diagonal | ) | [static] |
static MatrixStorage SimTK::MatrixStorage::calcDefaultStorage | ( | const MatrixStructure & | , |
const MatrixOutline & | |||
) | [static] |
std::string SimTK::MatrixStorage::name | ( | ) | const [inline] |
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.
MatrixStorage& SimTK::MatrixStorage::setMissingAttributes | ( | ) | [inline] |
Assuming this is an actual matrix description, set any unspecified attributes to appropriate defaults to match the specified packing.
MatrixStorage& SimTK::MatrixStorage::setToNone | ( | ) | [inline] |
Restore this object to its default-constructed state of "none".
MatrixStorage& SimTK::MatrixStorage::setPacking | ( | Packing | p | ) | [inline] |
MatrixStorage& SimTK::MatrixStorage::setPlacement | ( | Placement | p | ) | [inline] |
MatrixStorage& SimTK::MatrixStorage::setOrder | ( | Order | o | ) | [inline] |
MatrixStorage& SimTK::MatrixStorage::setDiagonal | ( | Diagonal | d | ) | [inline] |
Packing SimTK::MatrixStorage::getPacking | ( | ) | const [inline] |
Placement SimTK::MatrixStorage::getPlacement | ( | ) | const [inline] |
Order SimTK::MatrixStorage::getOrder | ( | ) | const [inline] |
Diagonal SimTK::MatrixStorage::getDiagonal | ( | ) | const [inline] |
const PackingMask SimTK::MatrixStorage::AllPacking = 0x007fU [static] |
const PackingMask SimTK::MatrixStorage::UncommittedPacking = 0xffffU [static] |
const PlacementMask SimTK::MatrixStorage::AllPlacement = 0x0003U [static] |
const PlacementMask SimTK::MatrixStorage::UncommittedPlacement = 0xffffU [static] |
const OrderMask SimTK::MatrixStorage::AllOrder = 0x03U [static] |
const OrderMask SimTK::MatrixStorage::UncommittedOrder = 0xffU [static] |
const DiagonalMask SimTK::MatrixStorage::AllDiagonal = 0x0003U [static] |
const DiagonalMask SimTK::MatrixStorage::UncommittedDiagonal = 0xffffU [static] |