ADS
Algorithms and Data Structures
Loading...
Searching...
No Matches
ADS::SumOf< T > Struct Template Reference

the abelian group of the sums of T, of identity T() More...

#include <ADS/Algebra.h>

Public types

using Value = T
 the sums

Static public member functions

static constexpr Value identity (void)
 0, the value made by T()
static constexpr Value combine (const Value &a, const Value &b)
 \( a + b \)
static constexpr Value inverse (const Value &a)
 \( -a \)

Static public attributes

static constexpr bool commutative = true
 \( a + b = b + a \)

Detailed description

template<class T>
struct ADS::SumOf< T >

the abelian group of the sums of T, of identity T()

Member typedef documentation

◆ Value

template<class T>
using ADS::SumOf< T >::Value = T

the sums

Member function documentation

◆ combine()

template<class T>
constexpr Value ADS::SumOf< T >::combine ( const Value & a,
const Value & b )
inlinestaticconstexpr

\( a + b \)

◆ identity()

template<class T>
constexpr Value ADS::SumOf< T >::identity ( void )
inlinestaticconstexpr

0, the value made by T()

◆ inverse()

template<class T>
constexpr Value ADS::SumOf< T >::inverse ( const Value & a)
inlinestaticconstexpr

\( -a \)

Member data documentation

◆ commutative

template<class T>
bool ADS::SumOf< T >::commutative = true
staticconstexpr

\( a + b = b + a \)


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