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

the sum of the values, an abelian group when V has the opposites More...

#include <ADS/tree/JoinTree.h>

Public types

using Value = V
 the sums, of the type of the values

Static public member functions

static Value identity (void)
 0, the value made by V()
template<class K>
static Value from (const K &, const V &v)
 the value \( v \) of the pair
static Value combine (const Value &a, const Value &b)
 \( a + b \)
static Value inverse (const Value &a)
 \( -a \)

Static public attributes

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

Detailed description

template<class V>
struct ADS::SumAugmentation< V >

the sum of the values, an abelian group when V has the opposites

Member typedef documentation

◆ Value

template<class V>
using ADS::SumAugmentation< V >::Value = V

the sums, of the type of the values

Member function documentation

◆ combine()

template<class V>
Value ADS::SumAugmentation< V >::combine ( const Value & a,
const Value & b )
inlinestatic

\( a + b \)

◆ from()

template<class V>
template<class K>
Value ADS::SumAugmentation< V >::from ( const K & ,
const V & v )
inlinestatic

the value \( v \) of the pair

◆ identity()

template<class V>
Value ADS::SumAugmentation< V >::identity ( void )
inlinestatic

0, the value made by V()

◆ inverse()

template<class V>
Value ADS::SumAugmentation< V >::inverse ( const Value & a)
inlinestatic

\( -a \)

Member data documentation

◆ commutative

template<class V>
bool ADS::SumAugmentation< V >::commutative = true
staticconstexpr

\( a + b = b + a \)


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