add sub dimension
This commit is contained in:
@@ -42,6 +42,13 @@ int sign(long int a){
|
||||
return p;\
|
||||
}\
|
||||
PERMUTATION_##type * INIT_PERMUTATION_##type(type *perm, size_t size){\
|
||||
if (size == 0) return NULL;\
|
||||
PERMUTATION_##type *p = CREATE_PERMUTATION_##type(size);\
|
||||
p->perm = perm ; /*malloc(size*sizeof(type));\
|
||||
for(size_t i=0;i<size;++i) p->perm[i] = perm[i];*/\
|
||||
return p;\
|
||||
}\
|
||||
PERMUTATION_##type * INIT_COPY_PERMUTATION_##type(type *perm, size_t size){\
|
||||
if (size == 0) return NULL;\
|
||||
PERMUTATION_##type *p = CREATE_PERMUTATION_##type(size);\
|
||||
p->perm = malloc(size*sizeof(type));\
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
typedef struct PERMUTATION_##type PERMUTATION_##type;\
|
||||
PERMUTATION_##type * CREATE_PERMUTATION_##type(size_t size);\
|
||||
PERMUTATION_##type * INIT_PERMUTATION_##type(type *perm, size_t size);\
|
||||
PERMUTATION_##type * INIT_COPY_PERMUTATION_##type(type *perm, size_t size);\
|
||||
PERMUTATION_TYPE_SIZE_T * TRANSLATE_TO_SET_THEORIC_SIZE_T_##type(const PERMUTATION_##type *p );\
|
||||
bool IS_PERMUTATION_##type(const PERMUTATION_##type *p );\
|
||||
size_t TabToPlaceAlgo_##type(const PERMUTATION_##type *p);\
|
||||
|
||||
Reference in New Issue
Block a user