35#ifndef __YTLIB_COMBO_H
36#define __YTLIB_COMBO_H
40uint64_t ytCombo_choose(
int n,
int k);
41int ytCombo_generate(
int n,
int k,
int * ar);
42void ytCombo_indexTable(
int n, uint64_t * table);
43uint64_t ytCombo_chooseTable(
int n,
int k,
const uint64_t * table,
int tn);
44uint64_t ytCombo_index(
int n,
int c,
const int * ar,
const uint64_t * table,
int tn);
45uint64_t ytCombo_index2(
int n,
int c,
const int * ar,
const int * a,
const uint64_t * table,
int tn);
46uint64_t ytCombo_index3(
int n,
int c,
const int * ar,
const int * a,
const int * b,
const uint64_t * table,
int tn);
47void ytCombo_combination(
int n,
int c, uint64_t index,
int * ar,
48 const uint64_t * table,
int tn);
49void ytCombo_combination2(
int n,
int k, uint64_t index,
int * ar,
const int * a,
50 const uint64_t *table,
int tn);
51void ytCombo_combination3(
int n,
int k, uint64_t index,
int * ar,
52 const int * a,
const int * b,
53 const uint64_t * table,
int tn);
55void ytCombo_print(FILE * fp,
size_t n,
const int * A);
56void ytCombo_print2(FILE * fp,
size_t n,
const int * A,
const int * B);
58void ytCombo_bitNext(uint64_t * bit);
59void ytCombo_bit(
int n,
int k, uint64_t index, uint64_t * bit,
60 const uint64_t * table,
int tn);
62void ytCombo_bitCombo2(
int n,
int k, uint64_t index,
63 uint64_t * bit,
int * A,
const int * a,
64 const uint64_t * table,
int tn);
66void ytCombo_printBitCombo(FILE * fp, uint64_t bit,
int n);
69void ytCombo_test(FILE * fp);