summaryrefslogtreecommitdiff
path: root/lib/dihedral.h
blob: c95b23ad127d79b3b50cae42eeb540e01c1f36bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

#include <stdbool.h>
#include <stdlib.h>

#include "types.h"

typedef struct {
  q_t i;
  bool r;
} dihedral_t;

dihedral_t *dihedral_compose(q_t q, q_t gti, const dihedral_t *g2);

q_t dihedral_act(q_t q, q_t gi, bool r, q_t s);

q_t dihedral_inverse_act(q_t q, const dihedral_t *g, q_t s);

q_t *dihedral_gen_transformations(q_t q);
R_t *dihedral_gen_involutions(q_t q);

R_t factorial(q_t);