|
|
@ -74,8 +74,8 @@ static const int perm_failure = -1;
|
|
|
|
int factorial(int n);
|
|
|
|
int factorial(int n);
|
|
|
|
|
|
|
|
|
|
|
|
//Iteratable Permutation Class
|
|
|
|
//Iteratable Permutation Class
|
|
|
|
//Provides an object for iterating over permutations of low dimension
|
|
|
|
//Provides an object for iterating over permutations of low order (<=12)
|
|
|
|
//These can be stepped along
|
|
|
|
//These can be stepped along in a loop
|
|
|
|
class ipermutation
|
|
|
|
class ipermutation
|
|
|
|
{
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
public:
|
|
|
@ -172,8 +172,6 @@ class permutation
|
|
|
|
int& at(const int ind);
|
|
|
|
int& at(const int ind);
|
|
|
|
const int& at(const int ind) const;
|
|
|
|
const int& at(const int ind) const;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static permutation first(int length);
|
|
|
|
static permutation first(int length);
|
|
|
|
static permutation last(int length);
|
|
|
|
static permutation last(int length);
|
|
|
|
|
|
|
|
|
|
|
@ -182,8 +180,11 @@ class permutation
|
|
|
|
|
|
|
|
|
|
|
|
int _intl_calculate_mindex(int *mindex, int *wrk);
|
|
|
|
int _intl_calculate_mindex(int *mindex, int *wrk);
|
|
|
|
int levi_civita();
|
|
|
|
int levi_civita();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void print(int style);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void test_permutation1();
|
|
|
|
|
|
|
|
|
|
|
|
}; //end namespace perm
|
|
|
|
}; //end namespace perm
|
|
|
|
}; //end namespace ams
|
|
|
|
}; //end namespace ams
|
|
|
|