X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=blobdiff_plain;f=mgraph.h;h=0991a7ff98ff0e92da1dbc6061a3b873c69ae8d9;hb=732b811081946ad56d05769de8846b27375b7eb7;hp=ae341fae532786f45a2b53c779802eeb47ab0f25;hpb=1050281a7d39f56431d9f36a6af4b19774419b75;p=moebius2.git diff --git a/mgraph.h b/mgraph.h index ae341fa..0991a7f 100644 --- a/mgraph.h +++ b/mgraph.h @@ -1,3 +1,6 @@ +/* + * Graph topology + */ /* * Vertices in strip are numbered as follows: * @@ -80,7 +83,7 @@ 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), \ @@ -88,11 +91,11 @@ extern int edge_end2(unsigned v1, int e); #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) \ @@ -100,11 +103,6 @@ extern int edge_end2(unsigned v1, int e); #define K FOR_COORD(k) -typedef struct { - double v[N][D3]; -} Layout; - -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*/