Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it

563665 views
1
#include "typedef.h"
2
#include "gmp.h"
3
#include "getput.h"
4
#include "zass.h"
5
#include "matrix.h"
6
7
void convert_cocycle_to_column(matrix_TYP **Y,
8
int number,
9
int dim,
10
int gen_no)
11
{
12
matrix_TYP *A;
13
14
int i,
15
j,
16
k,
17
kgv;
18
19
20
for (i=0;i<number;i++){
21
22
if (dim != Y[i]->rows || gen_no != Y[i]->cols){
23
fprintf(stderr,"error in convert_cocycle_to_column\n");
24
exit(3);
25
}
26
Check_mat(Y[i]);
27
28
A = init_mat(dim*gen_no,1,"i");
29
30
for (j=0;j<Y[i]->rows;j++){
31
for (k=0;k<Y[i]->cols;k++){
32
A->array.SZ[j+k*dim][0] = Y[i]->array.SZ[j][k];
33
}
34
}
35
36
kgv = Y[i]->kgv;
37
free_mat(Y[i]);
38
Y[i] = A;
39
Y[i]->kgv = kgv;
40
Check_mat(Y[i]);
41
42
}
43
44
return;
45
46
}
47
48
49