Classes
SymmetricMatrix

Classes

class  blaze::SymmetricMatrix< MT, SO, DF, NF >
 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...
 
class  blaze::SymmetricElement< MT >
 Representation of two synchronized elements within the sparse symmetric matrix.The SymmetricElement class represents two synchronized elements (i.e. two value/index pairs) within a sparse symmetric matrix. It guarantees that a modification of element $ a_{ij} $ via iterator is also applied to element $ a_{ji} $. The following example illustrates this by means of a $ 3 \times 3 $ dense Hermitian matrix: More...
 
class  blaze::SymmetricValue< MT >
 Representation of two synchronized values within a sparse symmetric matrix.The SymmetricValue class represents two synchronized values within a sparse symmetric matrix. It guarantees that a modification of value $ a_{ij} $ via iterator is also applied to the value $ a_{ji} $. The following example illustrates this by means of a $ 3 \times 3 $ sparse symmetric matrix: More...
 

NonNumericProxy global functions

template<typename MT >
void blaze::reset (const NonNumericProxy< MT > &proxy)
 Resetting the represented element to the default initial values. More...
 
template<typename MT >
void blaze::clear (const NonNumericProxy< MT > &proxy)
 Clearing the represented element. More...
 
template<bool RF, typename MT >
bool blaze::isDefault (const NonNumericProxy< MT > &proxy)
 Returns whether the represented element is in default state. More...
 
template<bool RF, typename MT >
bool blaze::isReal (const NonNumericProxy< MT > &proxy)
 Returns whether the matrix element represents a real number. More...
 
template<bool RF, typename MT >
bool blaze::isZero (const NonNumericProxy< MT > &proxy)
 Returns whether the represented element is 0. More...
 
template<bool RF, typename MT >
bool blaze::isOne (const NonNumericProxy< MT > &proxy)
 Returns whether the represented element is 1. More...
 
template<typename MT >
bool blaze::isnan (const NonNumericProxy< MT > &proxy)
 Returns whether the represented element is not a number. 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 >
void blaze::invert (const NumericProxy< MT > &proxy)
 In-place inversion of the represented element. More...
 
template<bool RF, typename MT >
bool blaze::isDefault (const NumericProxy< MT > &proxy)
 Returns whether the represented element is in default state. More...
 
template<bool RF, typename MT >
bool blaze::isReal (const NumericProxy< MT > &proxy)
 Returns whether the matrix element represents a real number. More...
 
template<bool RF, typename MT >
bool blaze::isZero (const NumericProxy< MT > &proxy)
 Returns whether the represented element is 0. More...
 
template<bool RF, typename MT >
bool blaze::isOne (const NumericProxy< MT > &proxy)
 Returns whether the represented element is 1. More...
 
template<typename MT >
bool blaze::isnan (const NumericProxy< MT > &proxy)
 Returns whether the represented element is not a number. 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<bool RF, typename Type >
bool blaze::isDefault (const SharedValue< Type > &value)
 Returns whether the shared value is in default state. More...
 
template<bool RF, typename T1 , typename T2 >
bool blaze::equal (const SharedValue< T1 > &a, const SharedValue< T2 > &b)
 Equality check for a two shared values. More...
 

SymmetricValue global functions

template<typename MT >
void blaze::reset (const SymmetricValue< MT > &value)
 Resetting the symmetric value to the default initial values. More...
 
template<typename MT >
void blaze::clear (const SymmetricValue< MT > &value)
 Clearing the symmetric value. More...
 
template<typename MT >
void blaze::invert (const SymmetricValue< MT > &value)
 In-place inversion of the symmetric value. More...
 
template<bool RF, typename MT >
bool blaze::isDefault (const SymmetricValue< MT > &value)
 Returns whether the symmetric value is in default state. More...
 
template<bool RF, typename MT >
bool blaze::isReal (const SymmetricValue< MT > &value)
 Returns whether the symmetric value represents a real number. More...
 
template<bool RF, typename MT >
bool blaze::isZero (const SymmetricValue< MT > &value)
 Returns whether the symmetric value is 0. More...
 
template<bool RF, typename MT >
bool blaze::isOne (const SymmetricValue< MT > &value)
 Returns whether the symmetric value is 1. More...
 
template<typename MT >
bool blaze::isnan (const SymmetricValue< MT > &value)
 Returns whether the symmetric value is not a number. 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<bool RF, 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>
bool blaze::isIntact (const SymmetricMatrix< MT, SO, DF, NF > &m)
 Returns whether the invariants of the given symmetric matrix are intact. 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) noexcept
 Swapping the contents of two matrices. More...
 

Detailed Description

Function Documentation

◆ clear() [1/4]

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

◆ clear() [2/4]

template<typename MT >
void blaze::clear ( const NonNumericProxy< MT > &  proxy)
inline

Clearing the represented element.

Parameters
proxyThe given access proxy.
Returns
void

This function clears the element represented by the access proxy to its default initial state. In case the access proxy represents a vector- or matrix-like data structure that provides a clear() function, this function clears the vector/matrix to its default initial state.

◆ clear() [3/4]

template<typename MT >
void blaze::clear ( const SymmetricValue< MT > &  value)
inline

Clearing the symmetric value.

Parameters
valueThe given symmetric value.
Returns
void

This function clears the symmetric value to its default initial state.

◆ clear() [4/4]

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.

◆ equal()

template<bool RF, typename T1 , typename T2 >
bool blaze::equal ( const SharedValue< T1 > &  a,
const SharedValue< T2 > &  b 
)
inline

Equality check for a two shared values.

Parameters
aThe left-hand side shared value.
bThe right-hand side shared value.
Returns
true if the two shared values are equal, false if not.

This function checks whether the two given shared values are equal, taking the limited machine accuracy into account. In case the two values are equal, the function returns true, otherwise it returns false.

◆ invert() [1/2]

template<typename MT >
void blaze::invert ( const SymmetricValue< MT > &  value)
inline

In-place inversion of the symmetric value.

Parameters
valueThe given symmetric value.
Returns
void

◆ invert() [2/2]

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

In-place inversion of the represented element.

Parameters
proxyThe given proxy instance.
Returns
void

◆ isDefault() [1/5]

template<bool RF, 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 ) ) { ... }

Optionally, it is possible to switch between strict semantics (blaze::strict) and relaxed semantics (blaze::relaxed):

if( isDefault<relaxed>( A ) ) { ... }

◆ isDefault() [2/5]

template<bool RF, 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.

◆ isDefault() [3/5]

template<bool RF, typename MT >
bool blaze::isDefault ( const NonNumericProxy< 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.

◆ isDefault() [4/5]

template<bool RF, typename MT >
bool blaze::isDefault ( const SymmetricValue< MT > &  value)
inline

Returns whether the symmetric value is in default state.

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

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

◆ isDefault() [5/5]

template<bool RF, 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.

◆ isIntact()

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

Returns whether the invariants of the given symmetric matrix are intact.

Parameters
mThe symmetric matrix to be tested.
Returns
true in case the given matrix's invariants are intact, false otherwise.

This function checks whether the invariants of the symmetric matrix are intact, i.e. if its state is valid. In case the invariants are intact, the function returns true, else it will return false. The following example demonstrates the use of the isIntact() function:

SymmetricMatrix< DynamicMatrix<int> > A;
// ... Resizing and initialization
if( isIntact( A ) ) { ... }

◆ isnan() [1/3]

template<typename MT >
bool blaze::isnan ( const NonNumericProxy< MT > &  proxy)
inline

Returns whether the represented element is not a number.

Parameters
proxyThe given access proxy.
Returns
true in case the represented element is in not a number, false otherwise.

This function checks whether the element represented by the access proxy is not a number (NaN). In case it is not a number, the function returns true, otherwise it returns false.

◆ isnan() [2/3]

template<typename MT >
bool blaze::isnan ( const SymmetricValue< MT > &  value)
inline

Returns whether the symmetric value is not a number.

Parameters
valueThe given symmetric value.
Returns
true in case the symmetric value is in not a number, false otherwise.

This function checks whether the symmetric value is not a number (NaN). In case it is not a number, the function returns true, otherwise it returns false.

◆ isnan() [3/3]

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

Returns whether the represented element is not a number.

Parameters
proxyThe given access proxy.
Returns
true in case the represented element is in not a number, false otherwise.

This function checks whether the element represented by the access proxy is not a number (NaN). In case it is not a number, the function returns true, otherwise it returns false.

◆ isOne() [1/3]

template<bool RF, typename MT >
bool blaze::isOne ( const NonNumericProxy< MT > &  proxy)
inline

Returns whether the represented element is 1.

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

This function checks whether the element represented by the access proxy represents the numeric value 1. In case it is 1, the function returns true, otherwise it returns false.

◆ isOne() [2/3]

template<bool RF, typename MT >
bool blaze::isOne ( const SymmetricValue< MT > &  value)
inline

Returns whether the symmetric value is 1.

Parameters
valueThe given symmetric value.
Returns
true in case the symmetric value is 1, false otherwise.

This function checks whether the symmetric value represents the numeric value 1. In case it is 1, the function returns true, otherwise it returns false.

◆ isOne() [3/3]

template<bool RF, typename MT >
bool blaze::isOne ( const NumericProxy< MT > &  proxy)
inline

Returns whether the represented element is 1.

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

This function checks whether the element represented by the access proxy represents the numeric value 1. In case it is 1, the function returns true, otherwise it returns false.

◆ isReal() [1/3]

template<bool RF, typename MT >
bool blaze::isReal ( const NonNumericProxy< MT > &  proxy)
inline

Returns whether the matrix element represents a real number.

Parameters
proxyThe given access proxy.
Returns
true in case the matrix element represents a real number, false otherwise.

This function checks whether the element represented by the access proxy represents the a real number. In case the element is of built-in type, the function returns true. In case the element is of complex type, the function returns true if the imaginary part is equal to 0. Otherwise it returns false.

◆ isReal() [2/3]

template<bool RF, typename MT >
bool blaze::isReal ( const SymmetricValue< MT > &  value)
inline

Returns whether the symmetric value represents a real number.

Parameters
valueThe given symmetric value.
Returns
true in case the symmetric value represents a real number, false otherwise.

This function checks whether the symmetric value represents the a real number. In case the value is of built-in type, the function returns true. In case the element is of complex type, the function returns true if the imaginary part is equal to 0. Otherwise it returns false.

◆ isReal() [3/3]

template<bool RF, typename MT >
bool blaze::isReal ( const NumericProxy< MT > &  proxy)
inline

Returns whether the matrix element represents a real number.

Parameters
proxyThe given access proxy.
Returns
true in case the matrix element represents a real number, false otherwise.

This function checks whether the element represented by the access proxy represents the a real number. In case the element is of built-in type, the function returns true. In case the element is of complex type, the function returns true if the imaginary part is equal to 0. Otherwise it returns false.

◆ isZero() [1/3]

template<bool RF, typename MT >
bool blaze::isZero ( const NonNumericProxy< MT > &  proxy)
inline

Returns whether the represented element is 0.

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

This function checks whether the element represented by the access proxy represents the numeric value 0. In case it is 0, the function returns true, otherwise it returns false.

◆ isZero() [2/3]

template<bool RF, typename MT >
bool blaze::isZero ( const SymmetricValue< MT > &  value)
inline

Returns whether the symmetric value is 0.

Parameters
valueThe given symmetric value.
Returns
true in case the symmetric value is 0, false otherwise.

This function checks whether the symmetric value represents the numeric value 0. In case it is 0, the function returns true, otherwise it returns false.

◆ isZero() [3/3]

template<bool RF, typename MT >
bool blaze::isZero ( const NumericProxy< MT > &  proxy)
inline

Returns whether the represented element is 0.

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

This function checks whether the element represented by the access proxy represents the numeric value 0. In case it is 0, the function returns true, otherwise it returns false.

◆ operator!=()

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.

◆ operator==()

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.

◆ reset() [1/5]

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

◆ reset() [2/5]

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.

◆ reset() [3/5]

template<typename MT >
void blaze::reset ( const NonNumericProxy< 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 access proxy to its default initial value. In case the access proxy represents a vector- or matrix-like data structure that provides a reset() function, this function resets all elements of the vector/matrix to the default initial values.

◆ reset() [4/5]

template<typename MT >
void blaze::reset ( const SymmetricValue< MT > &  value)
inline

Resetting the symmetric value to the default initial values.

Parameters
valueThe given symmetric value.
Returns
void

This function resets the symmetric value to its default initial value.

◆ reset() [5/5]

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.

◆ swap()

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

Swapping the contents of two matrices.

Parameters
aThe first matrix to be swapped.
bThe second matrix to be swapped.
Returns
void