HPCombi
High Performance Combinatorics in C++ using vector instructions v1.0.0
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
HPCombi::power_helper::Monoid< T > Struct Template Reference

Algebraic monoid structure used by default for type T by the pow function and prod function. More...

#include <power.hpp>

Static Public Member Functions

static const T one ()
 The one of type T.
 
static const T prod (T a, T b)
 the product of two elements of type T
 

Detailed Description

template<typename T>
struct HPCombi::power_helper::Monoid< T >

Algebraic monoid structure used by default for type T by the pow function and prod function.

A Monoid structure is required to define two static members

By default for any type T, one is constructed from the literal 1 and prod calls the operator *. One can change these default by specializing the template for some specific type T.

Member Function Documentation

◆ one()

template<typename T >
static const T HPCombi::power_helper::Monoid< T >::one ( )
inlinestatic

The one of type T.

Examples
stringmonoid.cpp.

◆ prod()

template<typename T >
static const T HPCombi::power_helper::Monoid< T >::prod ( a,
b 
)
inlinestatic

the product of two elements of type T

Parameters
athe first element to be multiplied
bthe second element to be multiplied
Returns
the product a * b
Examples
stringmonoid.cpp.

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