HPCombi
High Performance Combinatorics in C++ using vector instructions v1.0.3
|
Vanilla (ie NOT optimized) implementation of a permutation, used to check for test correctness and as baseline to measure speedup. More...
#include <perm_generic.hpp>
Public Types | |
using | vect = VectGeneric<Size, Expo> |
![]() | |
using | array |
using | value_type |
using | iterator |
using | const_iterator |
Public Member Functions | |
PermGeneric ()=default | |
PermGeneric (const vect v) | |
PermGeneric (std::initializer_list< Expo > il) | |
PermGeneric | operator* (const PermGeneric &p) const |
PermGeneric | inverse () const |
vect | lehmer () const |
uint64_t | length () const |
uint64_t | nb_descents () const |
uint64_t | nb_cycles () const |
bool | left_weak_leq (PermGeneric other) const |
![]() | |
VectGeneric ()=default | |
VectGeneric (const array &_v) | |
VectGeneric (std::initializer_list< uint8_t > il, uint8_t def=0) | |
uint8_t | operator[] (uint64_t i) const |
uint8_t & | 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 () |
const_iterator | begin () const |
iterator | end () |
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 () |
uint8_t | horiz_max () const |
void | partial_max_inplace () |
uint8_t | horiz_min () const |
void | partial_min_inplace () |
VectGeneric | eval () const |
Static Public Member Functions | |
static constexpr size_t | size () |
static PermGeneric | one () |
static PermGeneric | elementary_transposition (uint64_t i) |
static PermGeneric | random () |
![]() | |
static constexpr size_t | size () |
static VectGeneric | random () |
Additional Inherited Members | |
![]() | |
array | v |
Vanilla (ie NOT optimized) implementation of a permutation, used to check for test correctness and as baseline to measure speedup.
Implemented as an std array, so the permutation is not necessarily of size n=16. PermGeneric<16> should implement as much as possibles of Perm16 (currently not everything due to lack of time/need). No optimisation, so prefer to use Perm16.
About Expo, see comment on HPCombi::VectGeneric.
using HPCombi::PermGeneric< Size, Expo >::vect = VectGeneric<Size, Expo> |
|
default |
|
inline |
HPCombi::PermGeneric< Size, Expo >::PermGeneric | ( | std::initializer_list< Expo > | il | ) |
|
static |
PermGeneric< Size, Expo > HPCombi::PermGeneric< Size, Expo >::inverse | ( | ) | const |
bool HPCombi::PermGeneric< Size, Expo >::left_weak_leq | ( | PermGeneric< Size, Expo > | other | ) | const |
PermGeneric< Size, Expo >::vect HPCombi::PermGeneric< Size, Expo >::lehmer | ( | ) | const |
uint64_t HPCombi::PermGeneric< Size, Expo >::length | ( | ) | const |
uint64_t HPCombi::PermGeneric< Size, Expo >::nb_cycles | ( | ) | const |
uint64_t HPCombi::PermGeneric< Size, Expo >::nb_descents | ( | ) | const |
|
inlinestatic |
|
inline |
|
static |
|
inlinestaticconstexpr |