MatrixStorage Class Reference
[Matrix Characteristics]

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

#include <MatrixCharacteristics.h>

List of all members.

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.
MatrixStoragesetMissingAttributes ()
 Assuming this is an actual matrix description, set any unspecified attributes to appropriate defaults to match the specified packing.
MatrixStoragesetToNone ()
 Restore this object to its default-constructed state of "none".
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

typedef unsigned short DiagonalMask
typedef unsigned short OrderMask
typedef unsigned short PackingMask
typedef unsigned short PlacementMask

Member Enumeration Documentation

enum Diagonal
Enumerator:
NoDiag 
StoredDiag 
AssumedDiag 
enum Order
Enumerator:
NoOrder 
ColumnOrder 
RowOrder 
enum Packing
Enumerator:
NoPacking 
Full 
TriInFull 
TriPacked 
Banded 
Vector 
Scalar 
Permutation 
enum Placement
Enumerator:
NoPlacement 
Lower 
Upper 

Constructor & Destructor Documentation

MatrixStorage (  )  [inline]

Default constructor leaves all fields unspecified.

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 ( 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

static MatrixStorage calcDefaultStorage ( const MatrixStructure ,
const MatrixOutline  
) [static]
Diagonal getDiagonal (  )  const [inline]

Referenced by Mask::isSatisfiedBy().

Order getOrder (  )  const [inline]

Referenced by Mask::isSatisfiedBy().

Packing getPacking (  )  const [inline]

Referenced by Mask::isSatisfiedBy().

Placement getPlacement (  )  const [inline]

Referenced by Mask::isSatisfiedBy().

Mask 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.

References Mask::diagonal, Mask::order, Mask::packing, and Mask::placement.

Referenced by MatrixCommitment::commitStorage(), and MatrixCommitment::MatrixCommitment().

std::string name (  )  const [inline]
static const char* name ( Diagonal   )  [static]
static const char* name ( Order   )  [static]
static const char* name ( Placement   )  [static]
static const char* name ( Packing   )  [static]
MatrixStorage& setDiagonal ( Diagonal  d  )  [inline]
MatrixStorage& setMissingAttributes (  )  [inline]

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

MatrixStorage& setOrder ( Order  o  )  [inline]
MatrixStorage& setPacking ( Packing  p  )  [inline]
MatrixStorage& setPlacement ( Placement  p  )  [inline]
MatrixStorage& setToNone (  )  [inline]

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


Member Data Documentation

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

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