Classes | Enumerations
SymmetricMatrix

Classes

class  blaze::SymmetricMatrix< typename, bool, bool, bool >
 Matrix adapter for symmetric $ N \times N $ matrices. More...
 
class  blaze::NonNumericProxy< MT >
 Access proxy for symmetric, square matrices with non-numeric element types.The NonNumericProxy provides controlled access to the elements of a non-const symmetric matrix with non-numeric element type (e.g. vectors or matrices). It guarantees that a modification of element $ a_{ij} $ of the accessed matrix is also applied to element $ a_{ji} $. The following example illustrates this by means of a $ 3 \times 3 $ sparse symmetric matrix with StaticVector elements: More...
 
class  blaze::NumericProxy< MT >
 Access proxy for symmetric, square matrices with numeric element types.The NumericProxy provides controlled access to the elements of a non-const symmetric matrix with numeric element type (e.g. integral values, floating point values, and complex values). It guarantees that a modification of element $ a_{ij} $ of the accessed matrix is also applied to element $ a_{ji} $. The following example illustrates this by means of a $ 3 \times 3 $ dense symmetric matrix: More...
 
class  blaze::SharedValue< Type >
 Value shared among several positions within a symmetric matrix.The SharedValue class template represents a single value of a symmetric matrix that is shared among several positions within the symmetric matrix. Changes to the value of one position are therefore applied to all positions sharing the same value. More...
 

Enumerations

enum  { rmm = IsRowMajorMatrix<MT>::value }
 Compile time flag indicating whether the given matrix type is a row-major matrix.
 

NumericProxy operators

template<typename MT1 , typename MT2 >
bool blaze::operator== (const NumericProxy< MT1 > &lhs, const NumericProxy< MT2 > &rhs)
 Equality comparison between two NumericProxy objects. More...
 
template<typename MT , typename T >
bool blaze::operator== (const NumericProxy< MT > &lhs, const T &rhs)
 Equality comparison between a NumericProxy object and an object of different type. More...
 
template<typename T , typename MT >
bool blaze::operator== (const T &lhs, const NumericProxy< MT > &rhs)
 Equality comparison between an object of different type and a NumericProxy object. More...
 
template<typename MT1 , typename MT2 >
bool blaze::operator!= (const NumericProxy< MT1 > &lhs, const NumericProxy< MT2 > &rhs)
 Inequality comparison between two NumericProxy objects. More...
 
template<typename MT , typename T >
bool blaze::operator!= (const NumericProxy< MT > &lhs, const T &rhs)
 Inequality comparison between a NumericProxy object and an object of different type. More...
 
template<typename T , typename MT >
bool blaze::operator!= (const T &lhs, const NumericProxy< MT > &rhs)
 Inquality comparison between an object of different type and a NumericProxy object. More...
 
template<typename MT1 , typename MT2 >
bool blaze::operator< (const NumericProxy< MT1 > &lhs, const NumericProxy< MT2 > &rhs)
 Less-than comparison between two NumericProxy objects. More...
 
template<typename MT , typename T >
bool blaze::operator< (const NumericProxy< MT > &lhs, const T &rhs)
 Less-than comparison between a NumericProxy object and an object of different type. More...
 
template<typename T , typename MT >
bool blaze::operator< (const T &lhs, const NumericProxy< MT > &rhs)
 Less-than comparison between an object of different type and a NumericProxy object. More...
 
template<typename MT1 , typename MT2 >
bool blaze::operator> (const NumericProxy< MT1 > &lhs, const NumericProxy< MT2 > &rhs)
 Greater-than comparison between two NumericProxy objects. More...
 
template<typename MT , typename T >
bool blaze::operator> (const NumericProxy< MT > &lhs, const T &rhs)
 Greater-than comparison between a NumericProxy object and an object of different type. More...
 
template<typename T , typename MT >
bool blaze::operator> (const T &lhs, const NumericProxy< MT > &rhs)
 Greater-than comparison between an object of different type and a NumericProxy object. More...
 
template<typename MT1 , typename MT2 >
bool blaze::operator<= (const NumericProxy< MT1 > &lhs, const NumericProxy< MT2 > &rhs)
 Less-or-equal-than comparison between two NumericProxy objects. More...
 
template<typename MT , typename T >
bool blaze::operator<= (const NumericProxy< MT > &lhs, const T &rhs)
 Less-or-equal-than comparison between a NumericProxy object and an object of different type. More...
 
template<typename T , typename MT >
bool blaze::operator<= (const T &lhs, const NumericProxy< MT > &rhs)
 Less-or-equal-than comparison between an object of different type and a NumericProxy object. More...
 
template<typename MT1 , typename MT2 >
bool blaze::operator>= (const NumericProxy< MT1 > &lhs, const NumericProxy< MT2 > &rhs)
 Greater-or-equal-than comparison between two NumericProxy objects. More...
 
template<typename MT , typename T >
bool blaze::operator>= (const NumericProxy< MT > &lhs, const T &rhs)
 Greater-or-equal-than comparison between a NumericProxy object and an object of different type. More...
 
template<typename T , typename MT >
bool blaze::operator>= (const T &lhs, const NumericProxy< MT > &rhs)
 Greater-or-equal-than comparison between an object of different type and a NumericProxy object. More...
 
template<typename MT >
std::ostream & blaze::operator<< (std::ostream &os, const NumericProxy< MT > &proxy)
 Global output operator for numeric proxies. More...
 

NumericProxy global functions

template<typename MT >
void blaze::reset (const NumericProxy< MT > &proxy)
 Resetting the represented element to the default initial values. More...
 
template<typename MT >
void blaze::clear (const NumericProxy< MT > &proxy)
 Clearing the represented element. More...
 
template<typename MT >
bool blaze::isDefault (const NumericProxy< MT > &proxy)
 Returns whether the represented element is in default state. More...
 

SharedValue operators

template<typename T1 , typename T2 >
bool blaze::operator== (const SharedValue< T1 > &lhs, const SharedValue< T2 > &rhs)
 Equality comparison between two SharedValue objects. More...
 
template<typename T1 , typename T2 >
bool blaze::operator!= (const SharedValue< T1 > &lhs, const SharedValue< T2 > &rhs)
 Inequality comparison between two SharedValue objects. More...
 

SharedValue global functions

template<typename Type >
bool blaze::isDefault (const SharedValue< Type > &value)
 Returns whether the shared value is in default state. More...
 

SymmetricMatrix operators

template<typename MT , bool SO, bool DF, bool NF>
void blaze::reset (SymmetricMatrix< MT, SO, DF, NF > &m)
 Resetting the given symmetric matrix. More...
 
template<typename MT , bool SO, bool DF, bool NF>
void blaze::reset (SymmetricMatrix< MT, SO, DF, NF > &m, size_t i)
 Resetting the specified row/column of the given symmetric matrix. More...
 
template<typename MT , bool SO, bool DF, bool NF>
void blaze::clear (SymmetricMatrix< MT, SO, DF, NF > &m)
 Clearing the given symmetric matrix. More...
 
template<typename MT , bool SO, bool DF, bool NF>
bool blaze::isDefault (const SymmetricMatrix< MT, SO, DF, NF > &m)
 Returns whether the given symmetric matrix is in default state. More...
 
template<typename MT , bool SO, bool DF, bool NF>
void blaze::swap (SymmetricMatrix< MT, SO, DF, NF > &a, SymmetricMatrix< MT, SO, DF, NF > &b)
 Swapping the contents of two matrices. More...
 

Detailed Description

Function Documentation

template<typename MT , bool SO, bool DF, bool NF>
void blaze::clear ( SymmetricMatrix< MT, SO, DF, NF > &  m)
inline

Clearing the given symmetric matrix.

Parameters
mThe symmetric matrix to be cleared.
Returns
void
template<typename MT >
void blaze::clear ( const NumericProxy< MT > &  proxy)
inline

Clearing the represented element.

Parameters
proxyThe given access proxy.
Returns
void

This function clears the element represented by the numeric proxy to its default initial state.

template<typename MT , bool SO, bool DF, bool NF>
bool blaze::isDefault ( const SymmetricMatrix< MT, SO, DF, NF > &  m)
inline

Returns whether the given symmetric matrix is in default state.

Parameters
mThe symmetric matrix to be tested for its default state.
Returns
true in case the given matrix is component-wise zero, false otherwise.

This function checks whether the matrix is in default state. For instance, in case the matrix is instantiated for a built-in integral or floating point data type, the function returns true in case all matrix elements are 0 and false in case any matrix element is not 0. The following example demonstrates the use of the isDefault function:

// ... Resizing and initialization
if( isDefault( A ) ) { ... }
template<typename Type >
bool blaze::isDefault ( const SharedValue< Type > &  value)
inline

Returns whether the shared value is in default state.

Parameters
valueThe given shared value.
Returns
true in case the shared value is in default state, false otherwise.

This function checks whether the given shared value is in default state. In case it is in default state, the function returns true, otherwise it returns false.

template<typename MT >
bool blaze::isDefault ( const NumericProxy< MT > &  proxy)
inline

Returns whether the represented element is in default state.

Parameters
proxyThe given access proxy
Returns
true in case the represented element is in default state, false otherwise.

This function checks whether the element represented by the access proxy is in default state. In case it is in default state, the function returns true, otherwise it returns false.

template<typename T1 , typename T2 >
bool blaze::operator!= ( const SharedValue< T1 > &  lhs,
const SharedValue< T2 > &  rhs 
)
inline

Inequality comparison between two SharedValue objects.

Parameters
lhsThe left-hand side SharedValue object.
rhsThe right-hand side SharedValue object.
Returns
true if both shared values refer to different values, false if they don't.
template<typename MT1 , typename MT2 >
bool blaze::operator!= ( const NumericProxy< MT1 > &  lhs,
const NumericProxy< MT2 > &  rhs 
)
inline

Inequality comparison between two NumericProxy objects.

Parameters
lhsThe left-hand side NumericProxy object.
rhsThe right-hand side NumericProxy object.
Returns
true if both referenced values are not equal, false if they are.
template<typename MT , typename T >
bool blaze::operator!= ( const NumericProxy< MT > &  lhs,
const T &  rhs 
)
inline

Inequality comparison between a NumericProxy object and an object of different type.

Parameters
lhsThe left-hand side NumericProxy object.
rhsThe right-hand side object of other type.
Returns
true if the referenced value and the other object are not equal, false if they are.
template<typename T , typename MT >
bool blaze::operator!= ( const T &  lhs,
const NumericProxy< MT > &  rhs 
)
inline

Inquality comparison between an object of different type and a NumericProxy object.

Parameters
lhsThe left-hand side object of other type.
rhsThe right-hand side NumericProxy object.
Returns
true if the other object and the referenced value are not equal, false if they are.
template<typename MT1 , typename MT2 >
bool blaze::operator< ( const NumericProxy< MT1 > &  lhs,
const NumericProxy< MT2 > &  rhs 
)
inline

Less-than comparison between two NumericProxy objects.

Parameters
lhsThe left-hand side NumericProxy object.
rhsThe right-hand side NumericProxy object.
Returns
true if the left-hand side referenced value is smaller, false if not.
template<typename MT , typename T >
bool blaze::operator< ( const NumericProxy< MT > &  lhs,
const T &  rhs 
)
inline

Less-than comparison between a NumericProxy object and an object of different type.

Parameters
lhsThe left-hand side NumericProxy object.
rhsThe right-hand side object of other type.
Returns
true if the left-hand side referenced value is smaller, false if not.
template<typename T , typename MT >
bool blaze::operator< ( const T &  lhs,
const NumericProxy< MT > &  rhs 
)
inline

Less-than comparison between an object of different type and a NumericProxy object.

Parameters
lhsThe left-hand side object of other type.
rhsThe right-hand side NumericProxy object.
Returns
true if the left-hand side other object is smaller, false if not.
template<typename MT >
std::ostream & blaze::operator<< ( std::ostream &  os,
const NumericProxy< MT > &  proxy 
)
inline

Global output operator for numeric proxies.

Parameters
osReference to the output stream.
proxyReference to a constant numeric proxy object.
Returns
Reference to the output stream.
template<typename MT1 , typename MT2 >
bool blaze::operator<= ( const NumericProxy< MT1 > &  lhs,
const NumericProxy< MT2 > &  rhs 
)
inline

Less-or-equal-than comparison between two NumericProxy objects.

Parameters
lhsThe left-hand side NumericProxy object.
rhsThe right-hand side NumericProxy object.
Returns
true if the left-hand side referenced value is smaller or equal, false if not.
template<typename MT , typename T >
bool blaze::operator<= ( const NumericProxy< MT > &  lhs,
const T &  rhs 
)
inline

Less-or-equal-than comparison between a NumericProxy object and an object of different type.

Parameters
lhsThe left-hand side NumericProxy object.
rhsThe right-hand side object of other type.
Returns
true if the left-hand side referenced value is smaller or equal, false if not.
template<typename T , typename MT >
bool blaze::operator<= ( const T &  lhs,
const NumericProxy< MT > &  rhs 
)
inline

Less-or-equal-than comparison between an object of different type and a NumericProxy object.

Parameters
lhsThe left-hand side object of other type.
rhsThe right-hand side NumericProxy object.
Returns
true if the left-hand side other object is smaller or equal, false if not.
template<typename T1 , typename T2 >
bool blaze::operator== ( const SharedValue< T1 > &  lhs,
const SharedValue< T2 > &  rhs 
)
inline

Equality comparison between two SharedValue objects.

Parameters
lhsThe left-hand side SharedValue object.
rhsThe right-hand side SharedValue object.
Returns
true if both shared values refer to the same value, false if they don't.
template<typename MT1 , typename MT2 >
bool blaze::operator== ( const NumericProxy< MT1 > &  lhs,
const NumericProxy< MT2 > &  rhs 
)
inline

Equality comparison between two NumericProxy objects.

Parameters
lhsThe left-hand side NumericProxy object.
rhsThe right-hand side NumericProxy object.
Returns
true if both referenced values are equal, false if they are not.
template<typename MT , typename T >
bool blaze::operator== ( const NumericProxy< MT > &  lhs,
const T &  rhs 
)
inline

Equality comparison between a NumericProxy object and an object of different type.

Parameters
lhsThe left-hand side NumericProxy object.
rhsThe right-hand side object of other type.
Returns
true if the referenced value and the other object are equal, false if they are not.
template<typename T , typename MT >
bool blaze::operator== ( const T &  lhs,
const NumericProxy< MT > &  rhs 
)
inline

Equality comparison between an object of different type and a NumericProxy object.

Parameters
lhsThe left-hand side object of other type.
rhsThe right-hand side NumericProxy object.
Returns
true if the other object and the referenced value are equal, false if they are not.
template<typename MT1 , typename MT2 >
bool blaze::operator> ( const NumericProxy< MT1 > &  lhs,
const NumericProxy< MT2 > &  rhs 
)
inline

Greater-than comparison between two NumericProxy objects.

Parameters
lhsThe left-hand side NumericProxy object.
rhsThe right-hand side NumericProxy object.
Returns
true if the left-hand side referenced value is greater, false if not.
template<typename MT , typename T >
bool blaze::operator> ( const NumericProxy< MT > &  lhs,
const T &  rhs 
)
inline

Greater-than comparison between a NumericProxy object and an object of different type.

Parameters
lhsThe left-hand side NumericProxy object.
rhsThe right-hand side object of other type.
Returns
true if the left-hand side referenced value is greater, false if not.
template<typename T , typename MT >
bool blaze::operator> ( const T &  lhs,
const NumericProxy< MT > &  rhs 
)
inline

Greater-than comparison between an object of different type and a NumericProxy object.

Parameters
lhsThe left-hand side object of other type.
rhsThe right-hand side NumericProxy object.
Returns
true if the left-hand side other object is greater, false if not.
template<typename MT1 , typename MT2 >
bool blaze::operator>= ( const NumericProxy< MT1 > &  lhs,
const NumericProxy< MT2 > &  rhs 
)
inline

Greater-or-equal-than comparison between two NumericProxy objects.

Parameters
lhsThe left-hand side NumericProxy object.
rhsThe right-hand side NumericProxy object.
Returns
true if the left-hand side referenced value is greater or equal, false if not.
template<typename MT , typename T >
bool blaze::operator>= ( const NumericProxy< MT > &  lhs,
const T &  rhs 
)
inline

Greater-or-equal-than comparison between a NumericProxy object and an object of different type.

Parameters
lhsThe left-hand side NumericProxy object.
rhsThe right-hand side object of other type.
Returns
true if the left-hand side referenced value is greater or equal, false if not.
template<typename T , typename MT >
bool blaze::operator>= ( const T &  lhs,
const NumericProxy< MT > &  rhs 
)
inline

Greater-or-equal-than comparison between an object of different type and a NumericProxy object.

Parameters
lhsThe left-hand side object of other type.
rhsThe right-hand side NumericProxy object.
Returns
true if the left-hand side other object is greater or equal, false if not.
template<typename MT , bool SO, bool DF, bool NF>
void blaze::reset ( SymmetricMatrix< MT, SO, DF, NF > &  m)
inline

Resetting the given symmetric matrix.

Parameters
mThe symmetric matrix to be resetted.
Returns
void
template<typename MT , bool SO, bool DF, bool NF>
void blaze::reset ( SymmetricMatrix< MT, SO, DF, NF > &  m,
size_t  i 
)
inline

Resetting the specified row/column of the given symmetric matrix.

Parameters
mThe symmetric matrix to be resetted.
iThe index of the row/column to be resetted.
Returns
void

This function resets the values in the specified row/column of the given symmetric matrix to their default value. In case the given matrix is a rowMajor matrix the function resets the values in row i, if it is a columnMajor matrix the function resets the values in column i. Note that the capacity of the row/column remains unchanged.

template<typename MT >
void blaze::reset ( const NumericProxy< MT > &  proxy)
inline

Resetting the represented element to the default initial values.

Parameters
proxyThe given access proxy.
Returns
void

This function resets the element represented by the numeric proxy to its default initial value.

template<typename MT , bool SO, bool DF, bool NF>
void blaze::swap ( SymmetricMatrix< MT, SO, DF, NF > &  a,
SymmetricMatrix< MT, SO, DF, NF > &  b 
)
inline

Swapping the contents of two matrices.

Parameters
aThe first matrix to be swapped.
bThe second matrix to be swapped.
Returns
void
Exceptions
no-throwguarantee.