MatrixCondition Class Reference
[Matrix Characteristics]

Matrix "condition" is a statement about the numerical characteristics of a Matrix. More...

#include <MatrixCharacteristics.h>

List of all members.

Classes

struct  Mask
 Use this class to represent a set of acceptable Condition values. More...

Public Types

enum  Condition {
  UnknownCondition = 0x0000, Orthogonal = 0x0001, PositiveDefinite = 0x0002, WellConditioned = 0x0004,
  FullRank = 0x0008, Singular = 0x0010
}
enum  Diagonal {
  UnknownDiagonal = 0x0000, ZeroDiagonal = 0x0001, OneDiagonal = 0x0002, RealDiagonal = 0x0004,
  ImaginaryDiagonal = 0x0008
}
typedef unsigned short ConditionMask
typedef unsigned short DiagonalMask

Public Member Functions

std::string name () const
 MatrixCondition ()
 The default constructor sets the condition to Unknown, which is typically where it remains.
 MatrixCondition (Condition cond, Diagonal diag=UnknownDiagonal)
 This is an implicit conversion from the Condition enum to a MatrixCondition object.
MatrixConditionsetToNone ()
 Restore to default-constructed state of "none".
Mask mask () const
 Return the commitment mask corresponding to use of "this" condition as a commitment.
Condition getCondition () const
Diagonal getDiagonal () const
MatrixConditionsetCondition (Condition c)
MatrixConditionsetDiagonal (Diagonal d)

Static Public Member Functions

static const char * name (Condition)
static const char * name (Diagonal)
static ConditionMask calcMask (Condition)
 Given a particular Condition provided as a commitment, calculate the mask of all Condition values that would satisfy that commitment.
static DiagonalMask calcMask (Diagonal)
 Given a particular Diagonal condition provided as a commitment, calculate the mask of all Diagonal conditions taht would satisfy that commitment.

Static Public Attributes

static const ConditionMask AnyCondition = 0x001fU
static const ConditionMask UncommittedCondition = 0xffffU
static const DiagonalMask AnyDiagonal = 0x000fU
static const DiagonalMask UncommittedDiagonal = 0xffffU

Detailed Description

Matrix "condition" is a statement about the numerical characteristics of a Matrix.

It can be set as a result of an operation, or by a knowledgeable user. Simmatrix is entitled to rely on the correctness of these assertions, although it will try to check them if requested or when it is possible to do so without sacrificing performance. In most cases the condition will not be set at all, which we interpret to mean "unknown condition" in an actual character, and "uncommitted" in a character commitment.


Member Typedef Documentation

typedef unsigned short ConditionMask
typedef unsigned short DiagonalMask

Member Enumeration Documentation

enum Condition
Enumerator:
UnknownCondition 
Orthogonal 
PositiveDefinite 
WellConditioned 
FullRank 
Singular 
enum Diagonal
Enumerator:
UnknownDiagonal 

we don't know the condition of the diagonal elements

ZeroDiagonal 

all diagonal elements are zero (also pure real and pure imaginary)

OneDiagonal 

all diagonal elements are one (and real)

RealDiagonal 

all diagonal elements are pure real

ImaginaryDiagonal 

all diagonal elements are pure imaginary


Constructor & Destructor Documentation

MatrixCondition (  )  [inline]

The default constructor sets the condition to Unknown, which is typically where it remains.

MatrixCondition ( Condition  cond,
Diagonal  diag = UnknownDiagonal 
) [inline]

This is an implicit conversion from the Condition enum to a MatrixCondition object.


Member Function Documentation

static DiagonalMask calcMask ( Diagonal   )  [static]

Given a particular Diagonal condition provided as a commitment, calculate the mask of all Diagonal conditions taht would satisfy that commitment.

For example, if the commitment is "RealDiagonal" then "ZeroDiagonal" and "OneDiagonal" would also be acceptable. If the Diagonal condition is specified as "UnknownDiagonal" then we'll return an Uncommitted mask.

static ConditionMask calcMask ( Condition   )  [static]

Given a particular Condition provided as a commitment, calculate the mask of all Condition values that would satisfy that commitment.

For example, if the commitment is "WellConditioned" then "Orthogonal" and "PositiveDefinite" also qualify since they are automatically well conditioned. If the Condition is "Unknown" we'll return an Uncommitted mask.

Condition getCondition (  )  const [inline]
Diagonal getDiagonal (  )  const [inline]
Mask mask (  )  const [inline]

Return the commitment mask corresponding to use of "this" condition as a commitment.

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

std::string name (  )  const [inline]
static const char* name ( Diagonal   )  [static]
static const char* name ( Condition   )  [static]
MatrixCondition& setCondition ( Condition  c  )  [inline]
MatrixCondition& setDiagonal ( Diagonal  d  )  [inline]
MatrixCondition& setToNone (  )  [inline]

Restore to default-constructed state of "none".


Member Data Documentation

const ConditionMask AnyCondition = 0x001fU [static]
const DiagonalMask AnyDiagonal = 0x000fU [static]
const ConditionMask UncommittedCondition = 0xffffU [static]
const DiagonalMask UncommittedDiagonal = 0xffffU [static]

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

Generated on Wed Dec 30 11:05:26 2009 for SimTKcore by  doxygen 1.6.1