update
This commit is contained in:
@ -11,7 +11,25 @@ namespace ams
|
||||
namespace perm
|
||||
{
|
||||
|
||||
//Buffer operations
|
||||
//Basic operations on preallocated buffers
|
||||
//for later C library export
|
||||
|
||||
int factorial(int n);
|
||||
|
||||
int index_to_mindex(int index, int *mindex, int ndim);
|
||||
|
||||
int mindex_to_index(int *mindex, int ndim);
|
||||
void mindex_to_perm(int *mindex, int *perm, int ndim);
|
||||
void perm_to_mindex(int *perm, int *mindex, int ndim);
|
||||
|
||||
bool perm_valid(int *perm, int ndim);
|
||||
|
||||
bool mindex_valid(int *mindex, int ndim);
|
||||
|
||||
void index_to_perm(int index, int *perm, int ndim);
|
||||
int perm_to_index(int *perm, int ndim);
|
||||
|
||||
|
||||
|
||||
|
||||
//Permutation class
|
||||
@ -22,6 +40,7 @@ public:
|
||||
int *data;
|
||||
|
||||
permutation();
|
||||
permutation(int _dim);
|
||||
~permutation();
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user