chiark / gitweb /
minor improvements
[moebius2.git] / mgraph.h
index 714ff7ffb72319e2d9a874e615ad7cf8b0814fa1..43494c7ebc9c38246b97222582f71dbe1476d3b7 100644 (file)
--- a/mgraph.h
+++ b/mgraph.h
@@ -9,7 +9,7 @@
  *                       | :
  *     ___ X-2 ___ X-1 ___| 0  ___  1  ___  2  ___  3  ___  4  __
  *         Y-1     Y-1    |0:      0       0       0       0
- *        /  \    /  \    / :\    /  \    /  \    /  \    / !! \
+ *        /  \    /  \    / :\    /  \    /  \    /  \    /  \
  *       /    \  /    \  /| : \  /    \  /    \  /    \  /    \
  *     X-3 ___ X-2 ___ X-1|___  0  ___  1  ___  2  ___  3  ___  4
  *     Y-2     Y-2     Y-2| :  1       1       1       1       1
@@ -42,7 +42,7 @@
  *
  * Node x,y for
  *   0 <= x < X = 2^XBITS     x = distance along
- *   0 <= y < Y = 2^YBITS-1     y = distance across
+ *   0 <= y < Y = 2^YBITS-1   y = distance across
  *
  * Vertices are in reading order from diagram above ie x varies fastest.
  *
 #define FOR_VPEDGE(v,e) \
   for ((e)=0; (e)<V6; (e)++)
 
-extern int edge_end2(unsigned v1, int e);
+int edge_end2(unsigned v1, int e);
 #define EDGE_END2 edge_end2
 
+/* given v1,e  s.t.  v2==EDGE_END2(v1,e) >= 0,
+ * returns  eprime s.t. v1==EDGE_END2(v2,eprime) */
+int edge_reverse(int v1, int e);
+
 #define RIM_VERTEX_P(v) (((v) & YMASK) == 0 || ((v) & YMASK) == (Y-1)*Y1)
 
 #define FOR_VEDGE_X(v1,e,v2,init,otherwise)    \