AFLOW
 
Loading...
Searching...
No Matches
aurostd::xcombos Class Reference

#include <aurostd_xcombos.h>

Public Member Functions

 xcombos ()
 
 xcombos (const std::vector< int > &vec, bool sort=true, char mode='P', algorithm_xcombos algorithm=shen_alg_xcombos)
 
 xcombos (int choice_count, int choose_count, char mode='C', bool rpt=false)
 
 xcombos (const std::vector< int > &vec, char mode)
 
 xcombos (const xcombos &b)
 
 ~xcombos ()
 
const xcombosoperator= (const xcombos &other)
 
xcombosoperator++ ()
 
void reset ()
 
void reset (std::vector< int > vec, bool sort=true, char mode='P', algorithm_xcombos algorithm=shen_alg_xcombos)
 
void reset (int choice_count, int choose_count, char mode='C', bool rpt=false)
 
void reset (std::vector< int > vec, char mode)
 
const std::vector< int > & getCombo () const
 
int getN () const
 
int getM () const
 
std::vector< int > getIndices () const
 
template<class utype>
std::vector< utype > applyCombo (const std::vector< utype > &v_items) const
 
template<class utype>
std::vector< utype > applyCombo (const std::vector< std::vector< utype > > &v_items) const
 
bool increment ()
 

Public Attributes

std::vector< int > m_indices
 

Private Member Functions

void free ()
 
void copy (const xcombos &b)
 
void incrementPermutation ()
 
void incrementCombinations ()
 
void incrementEnumerations ()
 
void initializeCombinationsP ()
 
void setCombinationsIncrementParameters ()
 
void getNextEnumeration ()
 
void getNextEnumerationEqual ()
 
void initialize ()
 

Private Attributes

bool m_initialized
 
std::vector< int > m_input
 
int n_choices
 
int m_choose
 
bool m_sort
 
bool m_started
 
bool m_exhausted
 
char m_mode
 
algorithm_xcombos m_algorithm
 
std::vector< int > m_current
 
std::vector< int > m_p
 
int m_x
 
int m_y
 
bool m_repeat
 
std::vector< int > m_sets
 

Detailed Description

Definition at line 18 of file aurostd_xcombos.h.

Constructor & Destructor Documentation

◆ xcombos() [1/5]

aurostd::xcombos::xcombos ( )

Definition at line 76 of file aurostd_xcombos.cpp.

◆ xcombos() [2/5]

aurostd::xcombos::xcombos ( const std::vector< int > & vec,
bool sort = true,
char mode = 'P',
algorithm_xcombos algorithm = shen_alg_xcombos )

Definition at line 79 of file aurostd_xcombos.cpp.

◆ xcombos() [3/5]

aurostd::xcombos::xcombos ( int choice_count,
int choose_count,
char mode = 'C',
bool rpt = false )

Definition at line 82 of file aurostd_xcombos.cpp.

◆ xcombos() [4/5]

aurostd::xcombos::xcombos ( const std::vector< int > & vec,
char mode )

Definition at line 85 of file aurostd_xcombos.cpp.

◆ xcombos() [5/5]

aurostd::xcombos::xcombos ( const xcombos & b)

Definition at line 88 of file aurostd_xcombos.cpp.

◆ ~xcombos()

aurostd::xcombos::~xcombos ( )

Definition at line 91 of file aurostd_xcombos.cpp.

Member Function Documentation

◆ free()

void aurostd::xcombos::free ( )
private

Definition at line 95 of file aurostd_xcombos.cpp.

◆ copy()

void aurostd::xcombos::copy ( const xcombos & b)
private

Definition at line 114 of file aurostd_xcombos.cpp.

◆ incrementPermutation()

void aurostd::xcombos::incrementPermutation ( )
private

Definition at line 382 of file aurostd_xcombos.cpp.

◆ incrementCombinations()

void aurostd::xcombos::incrementCombinations ( )
private

Definition at line 452 of file aurostd_xcombos.cpp.

◆ incrementEnumerations()

void aurostd::xcombos::incrementEnumerations ( )
private

Definition at line 461 of file aurostd_xcombos.cpp.

◆ initializeCombinationsP()

void aurostd::xcombos::initializeCombinationsP ( )
private

Definition at line 468 of file aurostd_xcombos.cpp.

◆ setCombinationsIncrementParameters()

void aurostd::xcombos::setCombinationsIncrementParameters ( )
private

Definition at line 493 of file aurostd_xcombos.cpp.

◆ getNextEnumeration()

void aurostd::xcombos::getNextEnumeration ( )
private

Definition at line 610 of file aurostd_xcombos.cpp.

◆ getNextEnumerationEqual()

void aurostd::xcombos::getNextEnumerationEqual ( )
private

◆ initialize()

void aurostd::xcombos::initialize ( )
private

Definition at line 255 of file aurostd_xcombos.cpp.

◆ operator=()

const xcombos & aurostd::xcombos::operator= ( const xcombos & other)

Definition at line 133 of file aurostd_xcombos.cpp.

◆ operator++()

xcombos & aurostd::xcombos::operator++ ( )

Definition at line 141 of file aurostd_xcombos.cpp.

◆ reset() [1/4]

void aurostd::xcombos::reset ( )

Definition at line 157 of file aurostd_xcombos.cpp.

◆ reset() [2/4]

void aurostd::xcombos::reset ( std::vector< int > vec,
bool sort = true,
char mode = 'P',
algorithm_xcombos algorithm = shen_alg_xcombos )

Definition at line 169 of file aurostd_xcombos.cpp.

◆ reset() [3/4]

void aurostd::xcombos::reset ( int choice_count,
int choose_count,
char mode = 'C',
bool rpt = false )

Definition at line 192 of file aurostd_xcombos.cpp.

◆ reset() [4/4]

void aurostd::xcombos::reset ( std::vector< int > vec,
char mode )

Definition at line 223 of file aurostd_xcombos.cpp.

◆ getCombo()

const std::vector< int > & aurostd::xcombos::getCombo ( ) const
nodiscard

Definition at line 297 of file aurostd_xcombos.cpp.

◆ getN()

int aurostd::xcombos::getN ( ) const
nodiscard

Definition at line 300 of file aurostd_xcombos.cpp.

◆ getM()

int aurostd::xcombos::getM ( ) const
nodiscard

Definition at line 303 of file aurostd_xcombos.cpp.

◆ getIndices()

std::vector< int > aurostd::xcombos::getIndices ( ) const
nodiscard

Definition at line 307 of file aurostd_xcombos.cpp.

◆ applyCombo() [1/2]

template<class utype>
std::vector< utype > aurostd::xcombos::applyCombo ( const std::vector< utype > & v_items) const
nodiscard

Definition at line 319 of file aurostd_xcombos.cpp.

◆ applyCombo() [2/2]

template<class utype>
std::vector< utype > aurostd::xcombos::applyCombo ( const std::vector< std::vector< utype > > & v_items) const
nodiscard

Definition at line 345 of file aurostd_xcombos.cpp.

◆ increment()

bool aurostd::xcombos::increment ( )

Definition at line 364 of file aurostd_xcombos.cpp.

Member Data Documentation

◆ m_initialized

bool aurostd::xcombos::m_initialized
private

Definition at line 26 of file aurostd_xcombos.h.

◆ m_input

std::vector<int> aurostd::xcombos::m_input
private

Definition at line 27 of file aurostd_xcombos.h.

◆ n_choices

int aurostd::xcombos::n_choices
private

Definition at line 28 of file aurostd_xcombos.h.

◆ m_choose

int aurostd::xcombos::m_choose
private

Definition at line 28 of file aurostd_xcombos.h.

◆ m_sort

bool aurostd::xcombos::m_sort
private

Definition at line 29 of file aurostd_xcombos.h.

◆ m_started

bool aurostd::xcombos::m_started
private

Definition at line 31 of file aurostd_xcombos.h.

◆ m_exhausted

bool aurostd::xcombos::m_exhausted
private

Definition at line 32 of file aurostd_xcombos.h.

◆ m_mode

char aurostd::xcombos::m_mode
private

Definition at line 33 of file aurostd_xcombos.h.

◆ m_algorithm

algorithm_xcombos aurostd::xcombos::m_algorithm
private

Definition at line 34 of file aurostd_xcombos.h.

◆ m_current

std::vector<int> aurostd::xcombos::m_current
private

Definition at line 37 of file aurostd_xcombos.h.

◆ m_p

std::vector<int> aurostd::xcombos::m_p
private

Definition at line 40 of file aurostd_xcombos.h.

◆ m_x

int aurostd::xcombos::m_x
private

Definition at line 41 of file aurostd_xcombos.h.

◆ m_y

int aurostd::xcombos::m_y
private

Definition at line 41 of file aurostd_xcombos.h.

◆ m_repeat

bool aurostd::xcombos::m_repeat
private

Definition at line 42 of file aurostd_xcombos.h.

◆ m_sets

std::vector<int> aurostd::xcombos::m_sets
private

Definition at line 45 of file aurostd_xcombos.h.

◆ m_indices

std::vector<int> aurostd::xcombos::m_indices

Definition at line 66 of file aurostd_xcombos.h.


The documentation for this class was generated from the following files: