Position of the element of dimension d in the hyper-cube of dimension dim. More...
Position of the element of dimension d in the hyper-cube of dimension dim.
These objects are returned by the Hyper-cube static functions The number of non-zero d define the dimensionality of the object ( +1 or -1 its position in the hypercube)
(0,1) (-1,1) +---------+ (1,1) | | | | (-1,0)| (0,0) | (1,0) | | | | (-1,-1) +---------+ (1,-1) (0,-1)
dim | of the hyper-cube |
#include <comb.hpp>
Public Member Functions | |
bool | isValid () |
check if it is a valid combination More... | |
bool | isSub (comb< dim > cmb) |
Check if the combination is a sub-element. More... | |
void | zero () |
Set all the elements to zero. More... | |
void | mone () |
Set all the elements to -1. More... | |
comb< dim > | operator& (char c_) |
Bitwise operator &. More... | |
comb< dim > | operator- (const comb< dim > &t) |
Subtract the combinations and return the result. More... | |
comb< dim > | flip () |
flip the coefficent of the combination to be < 0 More... | |
comb< dim > | operator- () |
Subtract the combinations and return the result. More... | |
comb< dim > | operator+ (const comb< dim > &t) |
sum the combinations and return the result More... | |
bool | operator!= (const comb< dim > &t) const |
Compare two combination. More... | |
bool | operator== (const comb< dim > &t) const |
Compare two combination. More... | |
char | operator[] (int i) const |
Get the i combination coefficient. More... | |
char * | getComb () |
get the combination array pointer More... | |
const char * | getComb () const |
get the combination array pointer More... | |
char | value (int i) const |
get the index i of the combination More... | |
int | n_zero () const |
comb () | |
Default constructor. | |
comb (std::initializer_list< char > c) | |
Constructor from a list of numbers. More... | |
bool | isNegative () |
Check if any alement in the combination is <= 0. More... | |
std::string | to_string () const |
Convert a combination into string. More... | |
size_t | lin () const |
Linearization. More... | |
Data Fields | |
char | c [dim] |
Array that store the combination. | |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |