+/*
+ * Graph topology
+ */
/*
* Vertices in strip are numbered as follows:
*
#define V6 6
-#define D3 3
-
#define FOR_VERTEX(v) \
for ((v)=0; (v)<N; (v)++)
extern int edge_end2(unsigned v1, int e);
#define EDGE_END2 edge_end2
-#define FOR_VEDGE_X(v1,e,init,otherwise) \
+#define FOR_VEDGE_X(v1,e,v2,init,otherwise) \
FOR_VPEDGE((v1),(e)) \
if (((v2)= EDGE_END2((v1),(e)), \
(init), \
#define NOTHING ((void)0)
-#define FOR_VEDGE(v1,e) \
- FOR_VEDGE_X(v1,e,NOTHING,NOTHING)
+#define FOR_VEDGE(v1,e,v2) \
+ FOR_VEDGE_X(v1,e,v2,NOTHING,NOTHING)
-#define FOR_EDGE(v1,e,v2) \
- FOR_VERTEX((v1)) \
+#define FOR_EDGE(v1,e,v2) \
+ FOR_VERTEX((v1)) \
FOR_VEDGE((v1),(e),(v2))
#define FOR_COORD(k) \
#define K FOR_COORD(k)
-typedef struct {
- double v[N][D3];
-} Layout;
+#define FOR_RIM_VERTEX(vy,vx,v) \
+ for ((vy)=0; (vy)<Y; (vy)+=Y-1) \
+ for ((vx)=0; (v)= (vy)<<YSHIFT | (vx), (vx)<X; (vx)++)
-double hypotD(const double p[D3], const double q[D3]);
-double hypotD2(const double p[D3], const double q[D3]);
+typedef double Vertices[N][D3];
#endif /*MGRAPH_H*/