template<unsigned int dim>
struct comb< dim >
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)
Example
(0,1)
(-1,1) +---------+ (1,1)
| |
| |
(-1,0)| (0,0) | (1,0)
| |
| |
(-1,-1) +---------+ (1,-1)
(0,-1)
- Template Parameters
-
Definition at line 34 of file comb.hpp.
|
| bool | isValid () |
| | check if it is a valid combination
|
| |
| bool | isSub (comb< dim > cmb) |
| | Check if the combination is a sub-element.
|
| |
| void | zero () |
| | Set all the elements to zero.
|
| |
| void | mone () |
| | Set all the elements to -1.
|
| |
| comb< dim > | operator& (signed char c_) |
| | Bitwise operator &.
|
| |
| void | sign_flip () |
| | Flip the sign of the combination.
|
| |
| comb< dim > | operator- (const comb< dim > &t) |
| | Subtract the combinations and return the result.
|
| |
| comb< dim > | flip () |
| | flip the coefficent of the combination to be < 0
|
| |
| comb< dim > | operator- () |
| | Subtract the combinations and return the result.
|
| |
| comb< dim > | operator+ (const comb< dim > &t) |
| | sum the combinations and return the result
|
| |
| bool | operator!= (const comb< dim > &t) const |
| | Compare two combination.
|
| |
| bool | operator== (const comb< dim > &t) const |
| | Compare two combination.
|
| |
| signed char | operator[] (int i) const |
| | Get the i combination coefficient.
|
| |
| signed char * | getComb () |
| | get the combination array pointer
|
| |
| const signed char * | getComb () const |
| | get the combination array pointer
|
| |
| signed char | value (int i) const |
| | get the index i of the combination
|
| |
| int | n_zero () const |
| |
| | comb () |
| | Default constructor.
|
| |
| | comb (std::initializer_list< signed char > c) |
| | Constructor from a list of numbers.
|
| |
| bool | isNegative () |
| | Check if any alement in the combination is <= 0.
|
| |
| std::string | to_string () const |
| | Convert a combination into string.
|
| |
| size_t | lin () const |
| | Linearization.
|
| |