TVM  0.9.4
tvm::internal::MatrixProperties Class Reference

#include <tvm/internal/MatrixProperties.h>

Classes

struct  Constness
 
struct  Invertibility
 

Public Types

enum  Shape {
  GENERAL , LOWER_TRIANGULAR , UPPER_TRIANGULAR , DIAGONAL ,
  MULTIPLE_OF_IDENTITY , IDENTITY , MINUS_IDENTITY , ZERO
}
 
enum  Positiveness {
  NA , POSITIVE_SEMIDEFINITE , POSITIVE_DEFINITE , NEGATIVE_SEMIDEFINITE ,
  NEGATIVE_DEFINITE , INDEFINITE , NON_ZERO_INDEFINITE
}
 

Public Member Functions

 MatrixProperties ()
 
template<typename... Args>
 MatrixProperties (Args &&... args)
 
 MatrixProperties (const MatrixProperties &)
 
 MatrixProperties (MatrixProperties &)
 
 MatrixProperties (MatrixProperties &&)=default
 
MatrixPropertiesoperator= (const MatrixProperties &)=default
 
MatrixPropertiesoperator= (MatrixProperties &&)=default
 
Shape shape () const
 
Positiveness positiveness () const
 
Constness constness () const
 
Invertibility invertibility () const
 
bool isConstant () const
 
bool isInvertible () const
 
bool isTriangular () const
 
bool isLowerTriangular () const
 
bool isUpperTriangular () const
 
bool isDiagonal () const
 
bool isMultipleOfIdentity () const
 
bool isIdentity () const
 
bool isMinusIdentity () const
 
bool isZero () const
 
bool isSymmetric () const
 
bool isPositiveSemiDefinite () const
 
bool isPositiveDefinite () const
 
bool isNegativeSemidefinite () const
 
bool isNegativeDefinite () const
 
bool isIndefinite () const
 
bool isNonZeroIndefinite () const
 

Detailed Description

This class describes some mathematical properties of a matrix.

Member Enumeration Documentation

◆ Positiveness

Positiveness property of the matrix. Any options other than NA implies that the matrix is symmetric

Enumerator
NA 

not applicable (matrix is not symmetric) / unknown

POSITIVE_SEMIDEFINITE 

all eigenvalues are >=0

POSITIVE_DEFINITE 

all eigenvalues are >0

NEGATIVE_SEMIDEFINITE 

all eigenvalues are <=0

NEGATIVE_DEFINITE 

all eigenvalues are <0

INDEFINITE 

eigenvalues are a mix of positive, negative and 0

NON_ZERO_INDEFINITE 

eigenvalues are a mix of positive, negative but not 0

◆ Shape

Shape of a matrix

Enumerator
GENERAL 

general shape. This includes all other shapes.

LOWER_TRIANGULAR 

lower triangular matrix. This includes diagonal matrices.

UPPER_TRIANGULAR 

upper triangular matrix. This includes diagonal matrices.

DIAGONAL 

diagonal matrices. This includes multiple of the identity matrices (including zero matrix).

MULTIPLE_OF_IDENTITY 

a*I, where a is a real number. This includes the case a=-1, a=0, and a=1.

IDENTITY 

identity matrix I

MINUS_IDENTITY 

-I

ZERO 

Zero matrix.

Constructor & Destructor Documentation

◆ MatrixProperties() [1/5]

tvm::internal::MatrixProperties::MatrixProperties ( )

The data given to the constructors may be redundant. For example an identity matrix is constant, invertible and positive definite. The constructors are deducing automatically all what they can from the shape and the positiveness. The constructors use user-given data when they add information to what they can deduce. If the user-given data are less precise but compatible with what has been deduced, they are discarded. If they are contradicting the deductions, an assertion is fired.

Here are some examples:

  • a multiple-of-identity matrix can only be said to be symmetric and indefinite. If the user specifies it is positive-semidefinite, this will be recorded. If additionally it is specified to be invertible, it will be deduced that the matrix is positive definite.
  • if a minus-identity matrix is said to be non-zero indefinite, this characteristic will be discarded as it can be automatically deduced that the matrix is negative definite. If it is said to be positive definite, non constant or non invertible, an assertion will be fire as this contradicts what can be deduced.
  • if a matrix is triangular and symmetric, then it is diagonal.

◆ MatrixProperties() [2/5]

template<typename... Args>
tvm::internal::MatrixProperties::MatrixProperties ( Args &&...  args)
inline

◆ MatrixProperties() [3/5]

tvm::internal::MatrixProperties::MatrixProperties ( const MatrixProperties other)
inline

◆ MatrixProperties() [4/5]

tvm::internal::MatrixProperties::MatrixProperties ( MatrixProperties other)
inline

◆ MatrixProperties() [5/5]

tvm::internal::MatrixProperties::MatrixProperties ( MatrixProperties &&  )
default

Member Function Documentation

◆ constness()

MatrixProperties::Constness tvm::internal::MatrixProperties::constness ( ) const
inline

◆ invertibility()

MatrixProperties::Invertibility tvm::internal::MatrixProperties::invertibility ( ) const
inline

◆ isConstant()

bool tvm::internal::MatrixProperties::isConstant ( ) const
inline

◆ isDiagonal()

bool tvm::internal::MatrixProperties::isDiagonal ( ) const
inline

◆ isIdentity()

bool tvm::internal::MatrixProperties::isIdentity ( ) const
inline

◆ isIndefinite()

bool tvm::internal::MatrixProperties::isIndefinite ( ) const
inline

◆ isInvertible()

bool tvm::internal::MatrixProperties::isInvertible ( ) const
inline

◆ isLowerTriangular()

bool tvm::internal::MatrixProperties::isLowerTriangular ( ) const
inline

◆ isMinusIdentity()

bool tvm::internal::MatrixProperties::isMinusIdentity ( ) const
inline

◆ isMultipleOfIdentity()

bool tvm::internal::MatrixProperties::isMultipleOfIdentity ( ) const
inline

◆ isNegativeDefinite()

bool tvm::internal::MatrixProperties::isNegativeDefinite ( ) const
inline

◆ isNegativeSemidefinite()

bool tvm::internal::MatrixProperties::isNegativeSemidefinite ( ) const
inline

◆ isNonZeroIndefinite()

bool tvm::internal::MatrixProperties::isNonZeroIndefinite ( ) const
inline

◆ isPositiveDefinite()

bool tvm::internal::MatrixProperties::isPositiveDefinite ( ) const
inline

◆ isPositiveSemiDefinite()

bool tvm::internal::MatrixProperties::isPositiveSemiDefinite ( ) const
inline

◆ isSymmetric()

bool tvm::internal::MatrixProperties::isSymmetric ( ) const
inline

◆ isTriangular()

bool tvm::internal::MatrixProperties::isTriangular ( ) const
inline

◆ isUpperTriangular()

bool tvm::internal::MatrixProperties::isUpperTriangular ( ) const
inline

◆ isZero()

bool tvm::internal::MatrixProperties::isZero ( ) const
inline

◆ operator=() [1/2]

MatrixProperties& tvm::internal::MatrixProperties::operator= ( const MatrixProperties )
default

◆ operator=() [2/2]

MatrixProperties& tvm::internal::MatrixProperties::operator= ( MatrixProperties &&  )
default

◆ positiveness()

MatrixProperties::Positiveness tvm::internal::MatrixProperties::positiveness ( ) const
inline

◆ shape()

MatrixProperties::Shape tvm::internal::MatrixProperties::shape ( ) const
inline

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