You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ABACUS_Combi.h 1.0KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /**********************************************************
  2. This software is part of J.-S. Caux's ABACUS library.
  3. Copyright (c) J.-S. Caux.
  4. -----------------------------------------------------------
  5. File: ABACUS_Combi.h
  6. Purpose: Declares combinatorics-related classes and functions.
  7. ***********************************************************/
  8. #ifndef ABACUS_COMBI_H
  9. #define ABACUS_COMBI_H
  10. #include "ABACUS.h"
  11. namespace ABACUS {
  12. //***********************************************************************
  13. class Choose_Table {
  14. private:
  15. int Npower;
  16. int Npowerp1;
  17. int dim;
  18. unsigned long long int* table;
  19. void Fill_table ();
  20. public:
  21. Choose_Table ();
  22. Choose_Table (int Npower_ref);
  23. Choose_Table (const Choose_Table& Ref_Choose_Table); // constructs a new object from an existing one
  24. int power(); // returns Npower
  25. unsigned long long int choose (int N, int M);
  26. ~Choose_Table ();
  27. };
  28. std::ostream& operator<< (std::ostream& s, Choose_Table& Ref_table);
  29. } // namespace ABACUS
  30. #endif