2 * During the actual optimisation we constrain it to be symmetrical.
3 * That means we have half as many vertices. We process the vertices
6 * We conventionally suffix all of our variables, macros, constants,
7 * etc., with `h', to represent the double-prime ".
9 * Vertices with x==0 are special as they lie on the symmetry axis:
10 * all but one of the coordinates are fixed. We do not offer those
11 * coordinates to our optimisation algorithm.
13 * We provide to the rest of the program just:
14 * NH number of vertices"
15 * VH2V(v) maps a v" to the representative vertex number v
16 * FOR_VERTEX_H(vh,v) iterates over v", computing each v
17 * DIM dimensionality of coordinate space
18 * [un]map_dimensions maps double[DIM] to Vertices and back
27 #define VH2V(v) ((v<<1) & YMASK | v & (XMASK>>1))
28 #define FOR_VERTEX_H(vh,v) \
29 for ((vh)=0; (v)= VH2V((vh)), (vh) < NH; (vh)++)
31 #define HALF_DEGRADED_NVERTICES ((Y+1)/2)
32 #define DIM (NH*D3 + HALF_DEGRADED_NVERTICES*(1-D3) + ((Y+1)/2)*D3)
34 void unmap_dimensions(double metavertex[DIM], const struct Vertices *in);
35 void map_dimensions(const double metavertex[DIM], Vertices out);
36 void pmap_dimensions(const struct Vertices *vs);