📄 gb_plane.ch
字号:
@x l.20extern Graph *plane();extern Graph *plane_miles();extern void delaunay();@yextern Graph *plane(unsigned long,unsigned long,unsigned long,@| unsigned long,unsigned long,long);extern Graph *plane_miles(unsigned long,long,long,long,@| unsigned long,unsigned long,long);extern void delaunay(Graph *,void (*)(Vertex *,Vertex *));@z@x l.92Graph *plane(n,x_range,y_range,extend,prob,seed) unsigned long n; /* number of vertices desired */ unsigned long x_range,y_range; /* upper bounds on rectangular coordinates */ unsigned long extend; /* should a point at infinity be included? */ unsigned long prob; /* probability of rejecting a Delaunay edge */ long seed; /* random number seed */@yGraph *plane(@t\1\1@> unsigned long n, /* number of vertices desired */ unsigned long x_range,unsigned long y_range, /* upper bounds on rectangular coordinates */ unsigned long extend, /* should a point at infinity be included? */ unsigned long prob, /* probability of rejecting a Delaunay edge */ long seed@t\2\2@>) /* random number seed */@z@x l.226void delaunay(g,f) Graph *g; /* vertices in the plane */ void @[@] (*f)(); /* procedure that absorbs the triangulated edges */@yvoid delaunay(@t\1\1@> Graph *g, /* vertices in the plane */ void (*f)(Vertex *,Vertex *)@t\2\2@>) /* procedure that absorbs the triangulated edges */@z@x l.252static void new_euclid_edge(u,v) Vertex *u,*v;@ystatic void new_euclid_edge(Vertex *u,Vertex *v)@z@x l.283static long int_sqrt(x) long x;@ystatic long int_sqrt(long x)@z@x l.322static long sign_test(x1,x2,x3,y1,y2,y3) long x1,x2,x3,y1,y2,y3;@ystatic long sign_test(long x1,long x2,long x3,long y1,long y2,long y3)@z@x l.431static long ccw(u,v,w) Vertex *u,*v,*w;@ystatic long ccw(Vertex *u,Vertex *v,Vertex *w)@z@x l.474static long incircle(t,u,v,w) Vertex *t,*u,*v,*w;@ystatic long incircle(Vertex *t,Vertex *u,Vertex *v,Vertex *w)@z@x l.542static long ff(t,u,v,w) Vertex *t,*u,*v,*w;@ystatic long ff(Vertex *t,Vertex *u,Vertex *v,Vertex *w)@z@x l.550static long gg(t,u,v,w) Vertex *t,*u,*v,*w;@ystatic long gg(Vertex *t,Vertex *u,Vertex *v,Vertex *w)@z@x l.558static long hh(t,u,v,w) Vertex *t,*u,*v,*w;@ystatic long hh(Vertex *t,Vertex *u,Vertex *v,Vertex *w)@z@x l.563static long jj(t,u,v,w) Vertex *t,*u,*v,*w;@ystatic long jj(Vertex *t,Vertex *u,Vertex *v,Vertex *w)@z@x l.882static void flip(c,d,e,t,tp,tpp,p,xp,xpp) arc *c,*d,*e; Vertex *t,*tp,*tpp,*p; node *xp,*xpp;@ystatic void flip(arc *c,arc *d,arc *e,@| Vertex *t,Vertex *tp,Vertex *tpp,Vertex *p,@| node *xp,node *xpp)@z@x l.931Graph *plane_miles(n,north_weight,west_weight,pop_weight,extend,prob,seed) unsigned long n; /* number of vertices desired */ long north_weight; /* coefficient of latitude in the weight function */ long west_weight; /* coefficient of longitude in the weight function */ long pop_weight; /* coefficient of population in the weight function */ unsigned long extend; /* should a point at infinity be included? */ unsigned long prob; /* probability of rejecting a Delaunay edge */ long seed; /* random number seed */@yGraph *plane_miles(@t\1\1@> unsigned long n, /* number of vertices desired */ long north_weight, /* coefficient of latitude in the weight function */ long west_weight, /* coefficient of longitude in the weight function */ long pop_weight, /* coefficient of population in the weight function */ unsigned long extend, /* should a point at infinity be included? */ unsigned long prob, /* probability of rejecting a Delaunay edge */ long seed@t\2\2@>) /* random number seed */@z@x l.982static void new_mile_edge(u,v) Vertex *u,*v;@ystatic void new_mile_edge(Vertex *u,Vertex *v)@z
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -