Expression Templates Library (ETL)
Public Types | Public Member Functions | Public Attributes | List of all members
etl::sym_detail::symmetric_reference< M > Struct Template Reference

A proxy representing a reference to a mutable element of a symmetric matrix. More...

#include <symmetric_reference.hpp>

Public Types

using matrix_type = M
 The matrix type.
 
using value_type = typename matrix_type::value_type
 The value type.
 
using raw_pointer_type = value_type *
 A raw pointer type.
 
using raw_reference_type = value_type &
 A raw reference type.
 
using const_raw_reference_type = std::add_const_t< value_type > &
 A raw reference type.
 
using expr_t = M
 The symmetric matrix.
 

Public Member Functions

 symmetric_reference (matrix_type &matrix, size_t i, size_t j)
 Constructs a new symmetric_reference. More...
 
symmetric_referenceoperator= (const value_type &rhs)
 Sets a new value to the proxy reference. More...
 
symmetric_referenceoperator+= (value_type rhs)
 Adds a new value to the proxy reference. More...
 
symmetric_referenceoperator-= (value_type rhs)
 Subtract a new value from the proxy reference. More...
 
symmetric_referenceoperator*= (value_type rhs)
 Multiply by a new value the proxy reference. More...
 
symmetric_referenceoperator/= (value_type rhs)
 Divide by a new value the proxy reference. More...
 
symmetric_referenceoperator%= (value_type rhs)
 Modulo by a new value the proxy reference. More...
 
 operator const_raw_reference_type & () const
 Casts the proxy reference to the raw reference type. More...
 

Public Attributes

matrix_typematrix
 Reference to the matrix.
 
size_t i
 The first index.
 
size_t j
 The second index.
 
value_typevalue
 Reference to the value.
 
value_typesym_value
 Reference to the symmetric value.
 

Detailed Description

template<typename M>
struct etl::sym_detail::symmetric_reference< M >

A proxy representing a reference to a mutable element of a symmetric matrix.

Template Parameters
MThe matrix type

Constructor & Destructor Documentation

◆ symmetric_reference()

template<typename M >
etl::sym_detail::symmetric_reference< M >::symmetric_reference ( matrix_type matrix,
size_t  i,
size_t  j 
)
inline

Constructs a new symmetric_reference.

Parameters
matrixThe source matrix
iThe index i of the first dimension
jThe index j of the second dimension

Member Function Documentation

◆ operator const_raw_reference_type &()

template<typename M >
etl::sym_detail::symmetric_reference< M >::operator const_raw_reference_type & ( ) const
inline

Casts the proxy reference to the raw reference type.

Returns
a raw reference to the element

◆ operator%=()

template<typename M >
symmetric_reference& etl::sym_detail::symmetric_reference< M >::operator%= ( value_type  rhs)
inline

Modulo by a new value the proxy reference.

Parameters
rhsThe new value
Returns
a reference to the proxy reference

◆ operator*=()

template<typename M >
symmetric_reference& etl::sym_detail::symmetric_reference< M >::operator*= ( value_type  rhs)
inline

Multiply by a new value the proxy reference.

Parameters
rhsThe new value
Returns
a reference to the proxy reference

◆ operator+=()

template<typename M >
symmetric_reference& etl::sym_detail::symmetric_reference< M >::operator+= ( value_type  rhs)
inline

Adds a new value to the proxy reference.

Parameters
rhsThe new value
Returns
a reference to the proxy reference

◆ operator-=()

template<typename M >
symmetric_reference& etl::sym_detail::symmetric_reference< M >::operator-= ( value_type  rhs)
inline

Subtract a new value from the proxy reference.

Parameters
rhsThe new value
Returns
a reference to the proxy reference

◆ operator/=()

template<typename M >
symmetric_reference& etl::sym_detail::symmetric_reference< M >::operator/= ( value_type  rhs)
inline

Divide by a new value the proxy reference.

Parameters
rhsThe new value
Returns
a reference to the proxy reference

◆ operator=()

template<typename M >
symmetric_reference& etl::sym_detail::symmetric_reference< M >::operator= ( const value_type rhs)
inline

Sets a new value to the proxy reference.

Parameters
rhsThe new value
Returns
a reference to the proxy reference

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