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

563595 views
1
#include "typedef.h"
2
#include "getput.h"
3
#include "datei.h"
4
#include "idem.h"
5
6
/***************************************************************************
7
@
8
@---------------------------------------------------------------------------
9
@
10
@ FILE: brav_from_datei.c
11
@
12
@---------------------------------------------------------------------------
13
@
14
****************************************************************************/
15
16
17
/***************************************************************************
18
@
19
@---------------------------------------------------------------------------
20
@
21
@ bravais_TYP *brav_from_datei(char *symb,int almost,int zclass)
22
@
23
@ Reads a single bravais group from the catalog.
24
@ The symbol, the number almost and zclass are exactly as in the
25
@ standalone Datei resp. Bravais_catalog
26
@
27
@---------------------------------------------------------------------------
28
@
29
****************************************************************************/
30
bravais_TYP *brav_from_datei(char *symb,int almost,int zclass)
31
{
32
33
bravais_TYP *RES;
34
35
symbol_out *S;
36
37
matrix_TYP *X;
38
39
char *file;
40
41
int i=1;
42
43
/* initialize */
44
S = read_symbol_from_string(symb);
45
get_zentr(S);
46
47
while (i<almost){
48
/* get the next almost decomposable group */
49
i++;
50
file = S->fn;
51
free_bravais(S->grp);
52
free(S);
53
S = get_symbol(file);
54
if (file != NULL) free(file);
55
}
56
57
58
if (zclass == 1){
59
RES = S->grp;
60
}
61
else{
62
RES = Z_class(S->grp,S->grp->zentr[zclass-2]);
63
free_bravais(S->grp);
64
}
65
66
if (S->fn != NULL) free(S->fn);
67
free(S);
68
69
return RES;
70
71
}
72
73
74