Add group inverse array to qpms_finite_group_t.

Former-commit-id: 4a61223d430f0c8ee73b2ceee83bbbfe4edc3521
This commit is contained in:
Marek Nečada 2019-02-26 08:15:03 +02:00
parent 371e8c7ccc
commit f5073f8c14
2 changed files with 7 additions and 2 deletions

View File

@ -43,9 +43,10 @@ struct qpms_irot3_t;
*/
typedef struct qpms_finite_group_t {
char *name;
size_t order; ///< Group order (number of elements)
qpms_gmi_t order; ///< Group order (number of elements)
qpms_gmi_t idi; ///< Identity element index
qpms_gmi_t *mt; ///< Group multiplication table. If c = a*b, then ic = mt[order * ia + ib].
qpms_gmi_t *invi; ///< Group elem inverse indices.
qpms_gmi_t *gens; ///< A canonical set of group generators.
int ngens; ///< Number of the generators in gens;
qpms_permutation_t permrep[]; ///< Permutation representations of the elements.

View File

@ -103,6 +103,10 @@ class SVWFPointGroupInfo: # only for point groups, coz in svwf_rep() I use I_tyt
ss = ', '.join([str(permindices[permlist[i]*permlist[j]]) for j in range(order)])
s += ' ' + ss + ',\n'
s += ' },\n'
# qpms_gmi_t *invi
s += ' { // invi\n'
s += ' ' + ', '.join([str(permindices[permlist[j]**-1]) for j in range(order)])
s += '\n },\n'
# qpms_gmi_t *gens
s += ' {' + ', '.join([str(permindices[g]) for g in self.permgroupgens]) + '}, // gens\n'
# int ngens
@ -111,7 +115,7 @@ class SVWFPointGroupInfo: # only for point groups, coz in svwf_rep() I use I_tyt
s += ' { // permrep\n'
for i in range(order):
s += ' "%s",\n' % str(permlist[i])
s += ' }\n'
s += ' },\n'
# char **elemlabels
s += ' NULL, // elemlabels\n'
# int permrep_nelem