Cadabra
Computer algebra system for field theory problems
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
combin::combinations_base< T > Class Template Referenceabstract

#include <Combinatorics.hh>

Inheritance diagram for combin::combinations_base< T >:
combin::combinations< T > combin::symm_helper< T > combin::symm_val_helper< T >

Public Types

enum  weight_cond { weight_equals, weight_less, weight_greater }
 

Public Member Functions

 combinations_base ()
 
 combinations_base (const std::vector< T > &)
 
virtual ~combinations_base ()
 
void permute (long start=-1, long end=-1)
 
virtual void clear ()
 
virtual void clear_results ()
 
unsigned int sum_of_sublengths () const
 
void set_unit_sublengths ()
 
unsigned int multiplier (const std::vector< T > &) const
 
unsigned int total_permutations () const
 

Public Attributes

unsigned int block_length
 
std::vector< unsigned int > sublengths
 
range_vector_t input_asym
 
std::vector< T > original
 
bool multiple_pick
 
std::vector< weights_tweights
 
std::vector< int > max_weights
 
std::vector< weight_condweight_conditions
 
unsigned int sub_problem_blocksize
 

Protected Member Functions

virtual void vector_generated (const std::vector< unsigned int > &)=0
 
virtual bool entry_accepted (unsigned int current) const
 

Protected Attributes

std::vector< unsigned int > temparr
 
long start_
 
long end_
 
long vector_generated_called_
 
std::vector< int > current_weight
 

Private Member Functions

bool is_allowed_by_weight_constraints (unsigned int i)
 
bool final_weight_constraints_check () const
 
void update_weights (unsigned int i)
 
void restore_weights (unsigned int i)
 
void nextstep (unsigned int current, unsigned int fromalgehad, unsigned int groupindex, std::vector< bool > algehad)
 

Member Enumeration Documentation

◆ weight_cond

template<class T >
enum combin::combinations_base::weight_cond
Enumerator
weight_equals 
weight_less 
weight_greater 

Constructor & Destructor Documentation

◆ combinations_base() [1/2]

template<class T >
combin::combinations_base< T >::combinations_base

◆ combinations_base() [2/2]

template<class T >
combin::combinations_base< T >::combinations_base ( const std::vector< T > &  oa)

◆ ~combinations_base()

template<class T >
combin::combinations_base< T >::~combinations_base
virtual

Member Function Documentation

◆ clear()

template<class T >
void combin::combinations_base< T >::clear
virtual

◆ clear_results()

template<class T >
void combin::combinations_base< T >::clear_results
virtual

◆ entry_accepted()

template<class T >
bool combin::combinations_base< T >::entry_accepted ( unsigned int  current) const
protectedvirtual

◆ final_weight_constraints_check()

template<class T >
bool combin::combinations_base< T >::final_weight_constraints_check
private

◆ is_allowed_by_weight_constraints()

template<class T >
bool combin::combinations_base< T >::is_allowed_by_weight_constraints ( unsigned int  i)
private

◆ multiplier()

template<class T >
unsigned int combin::combinations_base< T >::multiplier ( const std::vector< T > &  stor) const

◆ nextstep()

template<class T >
void combin::combinations_base< T >::nextstep ( unsigned int  current,
unsigned int  fromalgehad,
unsigned int  groupindex,
std::vector< bool >  algehad 
)
private

◆ permute()

template<class T >
void combin::combinations_base< T >::permute ( long  start = -1,
long  end = -1 
)

◆ restore_weights()

template<class T >
void combin::combinations_base< T >::restore_weights ( unsigned int  i)
private

◆ set_unit_sublengths()

template<class T >
void combin::combinations_base< T >::set_unit_sublengths

◆ sum_of_sublengths()

template<class T >
unsigned int combin::combinations_base< T >::sum_of_sublengths

◆ total_permutations()

template<class T >
unsigned int combin::combinations_base< T >::total_permutations

◆ update_weights()

template<class T >
void combin::combinations_base< T >::update_weights ( unsigned int  i)
private

◆ vector_generated()

template<class T >
virtual void combin::combinations_base< T >::vector_generated ( const std::vector< unsigned int > &  )
protectedpure virtual

Member Data Documentation

◆ block_length

template<class T >
unsigned int combin::combinations_base< T >::block_length

◆ current_weight

template<class T >
std::vector<int> combin::combinations_base< T >::current_weight
protected

◆ end_

template<class T >
long combin::combinations_base< T >::end_
protected

◆ input_asym

template<class T >
range_vector_t combin::combinations_base< T >::input_asym

◆ max_weights

template<class T >
std::vector<int> combin::combinations_base< T >::max_weights

◆ multiple_pick

template<class T >
bool combin::combinations_base< T >::multiple_pick

◆ original

template<class T >
std::vector<T> combin::combinations_base< T >::original

◆ start_

template<class T >
long combin::combinations_base< T >::start_
protected

◆ sub_problem_blocksize

template<class T >
unsigned int combin::combinations_base< T >::sub_problem_blocksize

◆ sublengths

template<class T >
std::vector<unsigned int> combin::combinations_base< T >::sublengths

◆ temparr

template<class T >
std::vector<unsigned int> combin::combinations_base< T >::temparr
protected

◆ vector_generated_called_

template<class T >
long combin::combinations_base< T >::vector_generated_called_
protected

◆ weight_conditions

template<class T >
std::vector<weight_cond> combin::combinations_base< T >::weight_conditions

◆ weights

template<class T >
std::vector<weights_t> combin::combinations_base< T >::weights

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