MatrixStructure Class Reference
[Matrix Characteristics]

Matrix "structure" refers to an inherent mathematical (or at least algorithmic) characteristic of the matrix rather than a storage strategy. More...

#include <MatrixCharacteristics.h>

List of all members.

Classes

struct  Mask

Public Types

enum  Structure {
  NoStructure = 0x00000000, Matrix1d = 0x00000001, Zero = 0x00000002, Identity = 0x00000004,
  Permutation = 0x00000008, RepeatedDiagonal = 0x00000010, Diagonal = 0x00000020, BiDiagonal = 0x00000040,
  TriDiagonal = 0x00000080, BandedSymmetric = 0x00000100, BandedHermitian = 0x00000200, Banded = 0x00000400,
  Triangular = 0x00000800, QuasiTriangular = 0x00001000, Hessenberg = 0x00002000, Symmetric = 0x00004000,
  Hermitian = 0x00008000, SkewSymmetric = 0x00010000, SkewHermitian = 0x00020000, Full = 0x00040000
}
enum  Position { NoPosition = 0x0000, Lower = 0x0001, Upper = 0x0002 }
 

For triangular matrices, we have to know which triangle we're talking about.

More...
enum  DiagValue { NoDiagValue = 0x0000, StoredDiag = 0x0001, ZeroDiag = 0x0002, UnitDiag = 0x0004 }
 

For triangular, symmetric, and hermitian matrices the diagonal elements may have a single, assumed value rather than being stored in memory.

More...
typedef unsigned int StructureMask
typedef unsigned short PositionMask
typedef unsigned short DiagValueMask

Public Member Functions

MatrixStructuresetMissingAttributes ()
std::string name () const
 MatrixStructure ()
 MatrixStructure (Structure s, Position p=NoPosition, DiagValue d=NoDiagValue)
 This constructor is also an implicit conversion from the Structure enum to a MatrixStructure object which does not specify Position or DiagValue.
Mask mask () const
 Given a Structure commitment, which more-restrictive Structures will still satisfy this commitment? Returned value is a mask with a bit set for every Structure that is satisfactory.
Structure getStructure () const
Position getPosition () const
DiagValue getDiagValue () const
MatrixStructuresetStructure (Structure s)
MatrixStructuresetPosition (Position p)
MatrixStructuresetDiagValue (DiagValue d)
MatrixStructureset (Structure s, Position p, DiagValue d)
MatrixStructuresetToNone ()

Static Public Member Functions

static const char * name (Structure)
static StructureMask calcStructureMask (Structure)
static const char * name (Position)
static PositionMask calcPositionMask (Structure)
static const char * name (DiagValue)
static DiagValueMask calcDiagValueMask (Structure)

Static Public Attributes

static const StructureMask AnyStructure = 0x0007ffffU
static const StructureMask UncommittedStructure = 0xffffffffU
static const PositionMask AnyPosition = 0x0003U
static const PositionMask UncommittedPosition = 0xffffU
static const DiagValueMask AnyDiagValue = 0x0003U
static const DiagValueMask UncommittedDiagValue = 0xffffU

Detailed Description

Matrix "structure" refers to an inherent mathematical (or at least algorithmic) characteristic of the matrix rather than a storage strategy.

Symmetry is the clearest example of this; it is far more significant mathematically than just a way to save storage and reduce operation count.


Member Typedef Documentation

typedef unsigned short DiagValueMask
typedef unsigned short PositionMask
typedef unsigned int StructureMask

Member Enumeration Documentation

enum DiagValue

For triangular, symmetric, and hermitian matrices the diagonal elements may have a single, assumed value rather than being stored in memory.

This specifies the value. Don't confuse this with the similar MatrixStorage type which simply says whether there is a known value rather than stored values, *not* what that value is.

Enumerator:
NoDiagValue 
StoredDiag 
ZeroDiag 
UnitDiag 
enum Position

For triangular matrices, we have to know which triangle we're talking about.

Don't confuse this with MatrixStorage::Placement which has to do with where we put it in memory, *not* what matrix is being represented.

Enumerator:
NoPosition 
Lower 
Upper 
enum Structure
Enumerator:
NoStructure 

unspecified structure

Matrix1d 

a 1-d matrix (could be row or column)

Zero 

a matrix of all zeroes

Identity 

diagonal matrix with repeated 1's

Permutation 

permutation of an identity matrix

RepeatedDiagonal 

diagonal matrix with repeated element

Diagonal 

diagonal matrix with arbitrary elements

BiDiagonal 

diagonal plus one upper or lower band

TriDiagonal 

diagonal plus one upper and one lower band

BandedSymmetric 

diagonal plus adjacent symmetric bands

BandedHermitian 

diagonal plus adjacent conjugate bands

Banded 

diagonal plus upper and lower bands

Triangular 

diagonal plus all upper or all lower bands

QuasiTriangular 

triangular but with 2x2 blocks on the diagonal

Hessenberg 

triangular plus one band above/below diagonal

Symmetric 

symmetric: elt(i,j)==elt(j,i)

Hermitian 

hermitian: elt(i,j)==conjugate(elt(j,i))

SkewSymmetric 

skew symmetric: elt(i,j) == -elt(j,i)

SkewHermitian 

skew hermitian: elt(i,j) == -conjugate(elt(j,i))

Full 

full mxn matrix, all elements distinct


Constructor & Destructor Documentation

MatrixStructure (  )  [inline]
MatrixStructure ( Structure  s,
Position  p = NoPosition,
DiagValue  d = NoDiagValue 
) [inline]

This constructor is also an implicit conversion from the Structure enum to a MatrixStructure object which does not specify Position or DiagValue.


Member Function Documentation

static DiagValueMask calcDiagValueMask ( Structure   )  [static]
static PositionMask calcPositionMask ( Structure   )  [static]
static StructureMask calcStructureMask ( Structure   )  [static]
DiagValue getDiagValue (  )  const [inline]

Referenced by Mask::isSatisfiedBy().

Position getPosition (  )  const [inline]

Referenced by Mask::isSatisfiedBy().

Structure getStructure (  )  const [inline]

Referenced by Mask::isSatisfiedBy().

Mask mask (  )  const

Given a Structure commitment, which more-restrictive Structures will still satisfy this commitment? Returned value is a mask with a bit set for every Structure that is satisfactory.

For example, if the commitment is "Banded", "Diagonal" is also acceptable.

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

std::string name (  )  const [inline]
static const char* name ( DiagValue   )  [static]
static const char* name ( Position   )  [static]
static const char* name ( Structure   )  [static]
MatrixStructure& set ( Structure  s,
Position  p,
DiagValue  d 
) [inline]
MatrixStructure& setDiagValue ( DiagValue  d  )  [inline]
MatrixStructure& setMissingAttributes (  )  [inline]
MatrixStructure& setPosition ( Position  p  )  [inline]
MatrixStructure& setStructure ( Structure  s  )  [inline]
MatrixStructure& setToNone (  )  [inline]

Member Data Documentation

const DiagValueMask AnyDiagValue = 0x0003U [static]
const PositionMask AnyPosition = 0x0003U [static]
const StructureMask AnyStructure = 0x0007ffffU [static]
const DiagValueMask UncommittedDiagValue = 0xffffU [static]
const PositionMask UncommittedPosition = 0xffffU [static]
const StructureMask UncommittedStructure = 0xffffffffU [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