50 regels
1.0 KiB
C++
50 regels
1.0 KiB
C++
/**********************************************************
|
|
|
|
This software is part of J.-S. Caux's ABACUS library.
|
|
|
|
Copyright (c) J.-S. Caux.
|
|
|
|
-----------------------------------------------------------
|
|
|
|
File: ABACUS_Combi.h
|
|
|
|
Purpose: Declares combinatorics-related classes and functions.
|
|
|
|
***********************************************************/
|
|
|
|
#ifndef ABACUS_COMBI_H
|
|
#define ABACUS_COMBI_H
|
|
|
|
#include "ABACUS.h"
|
|
|
|
namespace ABACUS {
|
|
|
|
//***********************************************************************
|
|
|
|
class Choose_Table {
|
|
|
|
private:
|
|
int Npower;
|
|
int Npowerp1;
|
|
int dim;
|
|
unsigned long long int* table;
|
|
void Fill_table ();
|
|
|
|
public:
|
|
Choose_Table ();
|
|
Choose_Table (int Npower_ref);
|
|
Choose_Table (const Choose_Table& Ref_Choose_Table); // constructs a new object from an existing one
|
|
int power(); // returns Npower
|
|
unsigned long long int choose (int N, int M);
|
|
~Choose_Table ();
|
|
|
|
};
|
|
|
|
|
|
std::ostream& operator<< (std::ostream& s, Choose_Table& Ref_table);
|
|
|
|
|
|
} // namespace ABACUS
|
|
|
|
#endif
|