Public Types | List of all members
blaze::SharedValue< Type > Class Template Reference

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...

#include <SharedValue.h>

Public Types

using ValueType = Type
 Type of the shared value.
 
using Reference = Type &
 Reference to the shared value.
 
using ConstReference = const Type &
 Reference-to-const to the shared value.
 
using Pointer = Type *
 Pointer to the shared value.
 
using ConstPointer = const Type *
 Pointer-to-const to the shared value.
 

Public Member Functions

Constructors
 SharedValue ()
 Default constructor for a SharedValue.
 
 SharedValue (const Type &value)
 Constructor for a SharedValue. More...
 
 SharedValue (const SharedValue &)=default
 
 SharedValue (SharedValue &&)=default
 
Destructor
 ~SharedValue ()=default
 
Assignment operators
SharedValueoperator= (const SharedValue &)=default
 
SharedValueoperator= (SharedValue &&)=default
 
Access operators
Reference operator* ()
 Direct access to the shared value. More...
 
ConstReference operator* () const
 Direct access to the shared value. More...
 
Utility functions
Pointer base () const noexcept
 Low-level access to the underlying, shared value. More...
 

Private Member Functions

Forbidden operations
void * operator & () const
 Address operator (private & undefined)
 

Private Attributes

Member variables
std::shared_ptr< Type > value_
 The shared value.
 

Detailed Description

template<typename Type>
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.

Constructor & Destructor Documentation

◆ SharedValue()

template<typename Type >
blaze::SharedValue< Type >::SharedValue ( const Type &  value)
inlineexplicit

Constructor for a SharedValue.

Parameters
valueThe value to be shared.

This constructor creates a shared value as a copy of the given value.

Member Function Documentation

◆ base()

template<typename Type >
SharedValue< Type >::Pointer blaze::SharedValue< Type >::base ( ) const
inlinenoexcept

Low-level access to the underlying, shared value.

Returns
Pointer to the shared value.

◆ operator*() [1/2]

template<typename Type >
SharedValue< Type >::Reference blaze::SharedValue< Type >::operator* ( )
inline

Direct access to the shared value.

Returns
Reference to the shared value.

◆ operator*() [2/2]

template<typename Type >
SharedValue< Type >::ConstReference blaze::SharedValue< Type >::operator* ( ) const
inline

Direct access to the shared value.

Returns
Reference to the shared value.

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