init.cpp 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. #include "init.hpp"
  2. //******************
  3. //* Global objects *
  4. //******************
  5. Gomu::Type* type_PermutationA;
  6. Gomu::Type* type_PermutationB;
  7. Gomu::Type* type_PermutationD;
  8. Gomu::Type* type_PermutationEnumeratorA;
  9. Gomu::Type* type_PermutationEnumeratorB;
  10. Gomu::Type* type_PermutationEnumeratorD;
  11. //*************************
  12. //* Extension inilisation *
  13. //*************************
  14. extern "C"{
  15. Gomu::Module::Type types[]={
  16. {"PermutationA",Permutations::dispPerm<CoxeterA>,Permutations::delPerm<CoxeterA>,Permutations::copyPerm<CoxeterA>,Permutations::cmpPerm<CoxeterA>,&type_PermutationA},
  17. {"PermutationB",Permutations::dispPerm<CoxeterB>,Permutations::delPerm<CoxeterB>,Permutations::copyPerm<CoxeterB>,Permutations::cmpPerm<CoxeterB>,&type_PermutationB},
  18. {"PermutationD",Permutations::dispPerm<CoxeterD>,Permutations::delPerm<CoxeterD>,Permutations::copyPerm<CoxeterD>,Permutations::cmpPerm<CoxeterD>,&type_PermutationD},
  19. {"PermutationEnumeratorA",Permutations::dispPermE<CoxeterA>,Permutations::delPermE<CoxeterA>,Permutations::copyPermE<CoxeterA>,Permutations::cmpPermE<CoxeterA>,&type_PermutationEnumeratorA},
  20. {"PermutationEnumeratorB",Permutations::dispPermE<CoxeterB>,Permutations::delPermE<CoxeterB>,Permutations::copyPermE<CoxeterB>,Permutations::cmpPermE<CoxeterB>,&type_PermutationEnumeratorB},
  21. {"PermutationEnumeratorD",Permutations::dispPermE<CoxeterD>,Permutations::delPermE<CoxeterD>,Permutations::copyPermE<CoxeterD>,Permutations::cmpPermE<CoxeterD>,&type_PermutationEnumeratorD},
  22. TYPE_SENTINEL
  23. };
  24. //--- Functions ---//
  25. Gomu::Module::Function functions[]={
  26. {"PermutationA","permutationA",{"Integer"},(void*)Permutations::intToPerm<CoxeterA>},
  27. {"PermutationB","permutationB",{"Integer"},(void*)Permutations::intToPerm<CoxeterB>},
  28. {"PermutationD","permutationD",{"Integer"},(void*)Permutations::intToPerm<CoxeterD>},
  29. {"PermutationEnumeratorA","permutationEnumeratorA",{"Integer"},(void*)Permutations::intToPermE<CoxeterA>},
  30. {"PermutationEnumeratorB","permutationEnumeratorB",{"Integer"},(void*)Permutations::intToPermE<CoxeterB>},
  31. {"PermutationEnumeratorD","permutationEnumeratorD",{"Integer"},(void*)Permutations::intToPermE<CoxeterD>},
  32. FUNC_SENTINEL
  33. };
  34. //--- Member functions ---//
  35. Gomu::Module::Function member_functions[]={
  36. //--- PermutationEnumertor ---//
  37. {"PermutationA","get",{"PermutationEnumeratorA"},(void*)Permutations::PE_get<CoxeterA>},
  38. {"PermutationB","get",{"PermutationEnumeratorB"},(void*)Permutations::PE_get<CoxeterB>},
  39. {"PermutationD","get",{"PermutationEnumeratorD"},(void*)Permutations::PE_get<CoxeterD>},
  40. {"Boolean","next",{"PermutationEnumeratorA"},(void*)Permutations::PE_next<CoxeterA>},
  41. {"Boolean","next",{"PermutationEnumeratorB"},(void*)Permutations::PE_next<CoxeterB>},
  42. {"Boolean","next",{"PermutationEnumeratorD"},(void*)Permutations::PE_next<CoxeterD>},
  43. {"Void","reset",{"PermutationEnumeratorA"},(void*)Permutations::PE_reset<CoxeterA>},
  44. {"Void","reset",{"PermutationEnumeratorB"},(void*)Permutations::PE_reset<CoxeterB>},
  45. {"Void","reset",{"PermutationEnumeratorD"},(void*)Permutations::PE_reset<CoxeterD>},
  46. {"Integer","size",{"PermutationEnumeratorA"},(void*)Permutations::PE_size<CoxeterA>},
  47. {"Integer","size",{"PermutationEnumeratorB"},(void*)Permutations::PE_size<CoxeterB>},
  48. {"Integer","size",{"PermutationEnumeratorD"},(void*)Permutations::PE_size<CoxeterD>},
  49. FUNC_SENTINEL
  50. };
  51. }