HPCombi
High Performance Combinatorics in C++ using vector instructions v1.0.0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
HPCombi::VectGeneric< Size, Expo > Struct Template Reference

A generic class for combinatorial integer vectors. More...

#include <vect_generic.hpp>

Inheritance diagram for HPCombi::VectGeneric< Size, Expo >:
HPCombi::PermGeneric< Size, Expo >

Public Types

using array = std::array< Expo, Size >
 
using value_type = Expo
 
using iterator = typename array::iterator
 
using const_iterator = typename array::const_iterator
 

Public Member Functions

 VectGeneric ()=default
 
 VectGeneric (const array &_v)
 
 VectGeneric (std::initializer_list< Expo > il, Expo def=0)
 
Expo operator[] (uint64_t i) const
 
Expo & operator[] (uint64_t i)
 
size_t first_diff (const VectGeneric &u, size_t bound=Size) const
 
size_t last_diff (const VectGeneric &u, size_t bound=Size) const
 
iterator begin ()
 
iterator end ()
 
const_iterator begin () const
 
const_iterator end () const
 
bool operator== (const VectGeneric &u) const
 
bool operator!= (const VectGeneric &u) const
 
bool operator< (const VectGeneric &u) const
 
int8_t less_partial (const VectGeneric &u, int k) const
 
VectGeneric permuted (const VectGeneric &u) const
 
void sort ()
 
bool is_sorted () const
 
uint64_t first_non_zero (size_t bound=Size) const
 
uint64_t first_zero (size_t bound=Size) const
 
uint64_t last_non_zero (size_t bound=Size) const
 
uint64_t last_zero (size_t bound=Size) const
 
bool is_permutation (const size_t k=Size) const
 
uint64_t horiz_sum () const noexcept
 
VectGeneric partial_sums () const noexcept
 
void partial_sums_inplace ()
 
Expo horiz_max () const
 
void partial_max_inplace ()
 
Expo horiz_min () const
 
void partial_min_inplace ()
 
VectGeneric eval () const
 

Static Public Member Functions

static constexpr size_t size ()
 
static VectGeneric random ()
 

Public Attributes

array v
 

Detailed Description

template<size_t Size, typename Expo = uint8_t>
struct HPCombi::VectGeneric< Size, Expo >

A generic class for combinatorial integer vectors.

Member Typedef Documentation

◆ array

template<size_t Size, typename Expo = uint8_t>
using HPCombi::VectGeneric< Size, Expo >::array = std::array<Expo, Size>

◆ const_iterator

template<size_t Size, typename Expo = uint8_t>
using HPCombi::VectGeneric< Size, Expo >::const_iterator = typename array::const_iterator

◆ iterator

template<size_t Size, typename Expo = uint8_t>
using HPCombi::VectGeneric< Size, Expo >::iterator = typename array::iterator

◆ value_type

template<size_t Size, typename Expo = uint8_t>
using HPCombi::VectGeneric< Size, Expo >::value_type = Expo

Constructor & Destructor Documentation

◆ VectGeneric() [1/3]

template<size_t Size, typename Expo = uint8_t>
HPCombi::VectGeneric< Size, Expo >::VectGeneric ( )
default

◆ VectGeneric() [2/3]

template<size_t Size, typename Expo = uint8_t>
HPCombi::VectGeneric< Size, Expo >::VectGeneric ( const array _v)
inline

◆ VectGeneric() [3/3]

template<size_t Size, typename Expo = uint8_t>
HPCombi::VectGeneric< Size, Expo >::VectGeneric ( std::initializer_list< Expo >  il,
Expo  def = 0 
)
inline

Member Function Documentation

◆ begin() [1/2]

template<size_t Size, typename Expo = uint8_t>
iterator HPCombi::VectGeneric< Size, Expo >::begin ( )
inline

◆ begin() [2/2]

template<size_t Size, typename Expo = uint8_t>
const_iterator HPCombi::VectGeneric< Size, Expo >::begin ( ) const
inline

◆ end() [1/2]

template<size_t Size, typename Expo = uint8_t>
iterator HPCombi::VectGeneric< Size, Expo >::end ( )
inline

◆ end() [2/2]

template<size_t Size, typename Expo = uint8_t>
const_iterator HPCombi::VectGeneric< Size, Expo >::end ( ) const
inline

◆ eval()

template<size_t Size, typename Expo = uint8_t>
VectGeneric HPCombi::VectGeneric< Size, Expo >::eval ( ) const
inline

◆ first_diff()

template<size_t Size, typename Expo = uint8_t>
size_t HPCombi::VectGeneric< Size, Expo >::first_diff ( const VectGeneric< Size, Expo > &  u,
size_t  bound = Size 
) const
inline

◆ first_non_zero()

template<size_t Size, typename Expo = uint8_t>
uint64_t HPCombi::VectGeneric< Size, Expo >::first_non_zero ( size_t  bound = Size) const
inline

◆ first_zero()

template<size_t Size, typename Expo = uint8_t>
uint64_t HPCombi::VectGeneric< Size, Expo >::first_zero ( size_t  bound = Size) const
inline

◆ horiz_max()

template<size_t Size, typename Expo = uint8_t>
Expo HPCombi::VectGeneric< Size, Expo >::horiz_max ( ) const
inline

◆ horiz_min()

template<size_t Size, typename Expo = uint8_t>
Expo HPCombi::VectGeneric< Size, Expo >::horiz_min ( ) const
inline

◆ horiz_sum()

template<size_t Size, typename Expo = uint8_t>
uint64_t HPCombi::VectGeneric< Size, Expo >::horiz_sum ( ) const
inlinenoexcept

◆ is_permutation()

template<size_t Size, typename Expo = uint8_t>
bool HPCombi::VectGeneric< Size, Expo >::is_permutation ( const size_t  k = Size) const
inline

◆ is_sorted()

template<size_t Size, typename Expo = uint8_t>
bool HPCombi::VectGeneric< Size, Expo >::is_sorted ( ) const
inline

◆ last_diff()

template<size_t Size, typename Expo = uint8_t>
size_t HPCombi::VectGeneric< Size, Expo >::last_diff ( const VectGeneric< Size, Expo > &  u,
size_t  bound = Size 
) const
inline

◆ last_non_zero()

template<size_t Size, typename Expo = uint8_t>
uint64_t HPCombi::VectGeneric< Size, Expo >::last_non_zero ( size_t  bound = Size) const
inline

◆ last_zero()

template<size_t Size, typename Expo = uint8_t>
uint64_t HPCombi::VectGeneric< Size, Expo >::last_zero ( size_t  bound = Size) const
inline

◆ less_partial()

template<size_t Size, typename Expo = uint8_t>
int8_t HPCombi::VectGeneric< Size, Expo >::less_partial ( const VectGeneric< Size, Expo > &  u,
int  k 
) const
inline

◆ operator!=()

template<size_t Size, typename Expo = uint8_t>
bool HPCombi::VectGeneric< Size, Expo >::operator!= ( const VectGeneric< Size, Expo > &  u) const
inline

◆ operator<()

template<size_t Size, typename Expo = uint8_t>
bool HPCombi::VectGeneric< Size, Expo >::operator< ( const VectGeneric< Size, Expo > &  u) const
inline

◆ operator==()

template<size_t Size, typename Expo = uint8_t>
bool HPCombi::VectGeneric< Size, Expo >::operator== ( const VectGeneric< Size, Expo > &  u) const
inline

◆ operator[]() [1/2]

template<size_t Size, typename Expo = uint8_t>
Expo & HPCombi::VectGeneric< Size, Expo >::operator[] ( uint64_t  i)
inline

◆ operator[]() [2/2]

template<size_t Size, typename Expo = uint8_t>
Expo HPCombi::VectGeneric< Size, Expo >::operator[] ( uint64_t  i) const
inline

◆ partial_max_inplace()

template<size_t Size, typename Expo = uint8_t>
void HPCombi::VectGeneric< Size, Expo >::partial_max_inplace ( )
inline

◆ partial_min_inplace()

template<size_t Size, typename Expo = uint8_t>
void HPCombi::VectGeneric< Size, Expo >::partial_min_inplace ( )
inline

◆ partial_sums()

template<size_t Size, typename Expo = uint8_t>
VectGeneric HPCombi::VectGeneric< Size, Expo >::partial_sums ( ) const
inlinenoexcept

◆ partial_sums_inplace()

template<size_t Size, typename Expo = uint8_t>
void HPCombi::VectGeneric< Size, Expo >::partial_sums_inplace ( )
inline

◆ permuted()

template<size_t Size, typename Expo = uint8_t>
VectGeneric HPCombi::VectGeneric< Size, Expo >::permuted ( const VectGeneric< Size, Expo > &  u) const
inline

◆ random()

template<size_t Size, typename Expo = uint8_t>
static VectGeneric HPCombi::VectGeneric< Size, Expo >::random ( )
inlinestatic

◆ size()

template<size_t Size, typename Expo = uint8_t>
static constexpr size_t HPCombi::VectGeneric< Size, Expo >::size ( )
inlinestaticconstexpr

◆ sort()

template<size_t Size, typename Expo = uint8_t>
void HPCombi::VectGeneric< Size, Expo >::sort ( )
inline

Member Data Documentation

◆ v

template<size_t Size, typename Expo = uint8_t>
array HPCombi::VectGeneric< Size, Expo >::v

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