class KNOT |
---|
attr k:ARRAY{VERT}; .. Included as k |
---|
attr updateCross:BOOL; |
---|
**** | true if crossing data is changed and needed CrossSet. |
attr k:ARRAY{VERT}; .. Included as k |
---|
attr updateCross:BOOL; |
---|
**** | true if crossing data is changed and needed CrossSet. |
const vertex, edge, other; |
---|
const far:INT:=10000; |
---|
const near:INT:=16; |
---|
const vertex, edge, other; |
---|
const vertex, edge, other; |
---|
BandDel(i:INT) |
---|
**** | not check crossing. |
ClCross |
---|
**** | delete all crossings |
ClCrossEdge(inout edge:INT, dir:INT) |
---|
ClCrossErr(inout vp:INT) |
---|
CodeDel(i:CARD) .. Included as CodeDel |
---|
**** | del the code not search for companionloop j::=i.upto!(k.size-2); k[j]:=k[j+1]; end;k:=k.resize(k.size-1); |
CodeDel(i:INT) .. Included as CodeDel |
---|
CodeIn(i:CARD) .. Included as CodeIn |
---|
CodeIn(x,y:INT, i:CARD) |
---|
CodeIn(x,y:INT, i:INT) |
---|
CodeIn(x,y:INT, c:VERTEXC, i:CARD) |
---|
CodeIn(x,y:INT, c:VERTEXC, i:INT) |
---|
CodeIn(c:VERTEXC, i:CARD) .. Included as CodeIn |
---|
CodeIn(c:VERTEXC, i:INT) .. Included as CodeIn |
---|
CodeIn(v:VERT, i:CARD) .. Included as CodeIn |
---|
**** | move up and insert. 'normal vertex,(x=0,y=0),work=0.k:=k.resize(k.size+1);loop j::=(k.size-2).downto!(i); k[j+1]:=k[j]; end;k[i]:=v; |
CodeRev(p1,p2:INT) .. Included as CodeRev |
---|
**** | Reverse Knot[] codes between p1,p2, needed 0<=p1,p2<=maxK |
CodeSplice(stp1,enp1,stp2,enp2:INT) .. Included as CodeSplice |
---|
**** | splice the code stp1..enp1 and stp2..enp2, stp1<enp1, stp2<enp2 |
CrossSet(stp,enp:INT) |
---|
CrossSet:BOOL |
---|
DelV(i:INT) |
---|
**** | Del 1 code1. if band then del 1code at ts/te, too. Knot[i] is not ks,ke,ts,te |
LookMouseV(stp, enp:INT, inout i0:INT, inout x:INT, inout y:INT,inout left:BOOL, inout right:BOOL) |
---|
LookMouseVE(MDistance:INT,stp, enp:INT, inout i0 :INT, inout veSw:INT,inout x, y:INT, inout left, right:BOOL) |
---|
**** | mark if near than MDistance veSw 0:vertex, 1:edge state of mouse |
Match(i1,i2:INT):BOOL |
---|
**** | TRUE if coord (x1,y1)=(x2,y2) |
Match2(i1,i2:INT):BOOL |
---|
**** | Match with band adjustment |
MatchPt(i,from:INT):INT |
---|
**** | return j where Knot[i].x=Knot[j].x, Knot[i].y=Knot[j].y, i#j. Return -1 if not exist. |
MatchPtS(i,from:INT):INT |
---|
**** | return MatchPt if exist . return (i) if not exist |
NoCompo0 |
---|
**** | set Knot be empty |
NoCompo0:SAME |
---|
**** | set Knot be empty |
PointInEdge(i:INT) |
---|
SLength |
---|
SetTCode(out tcode:TCODE):BOOL |
---|
Shift(ofsX,ofsY:INT) |
---|
StringSplice(i,j:INT) |
---|
aget(i:CARD):VERT .. Included as aget |
---|
aget(i:INT):VERT .. Included as aget |
---|
append(x,y:CARD) |
---|
append(x,y:INT) |
---|
append(a:SAME) .. Included as append |
---|
**** | s::=k.size-1; k:=k.resize(s+a.k.size);loop i::=0.upto!(a.k.size-1); k[i+s]:=a.k[i]; end; |
append(a:SAME):SAME .. Included as append |
---|
**** | res:SAME:=clone; res.append(a); return res; |
append(v:VERT) .. Included as append |
---|
aset(i:CARD, v:VERT) .. Included as aset |
---|
aset(i:INT, v:VERT) .. Included as aset |
---|
attach(i,j:INT) |
---|
**** | Knot[i] <-- Knot[j] |
bandStart:INT .. Included as bandStart |
---|
**** | k.size-1 if band is not exist |
band_attach_sgn(i:INT):INT |
---|
band_attach_sgn(bi, ti:INT):INT |
---|
**** | bi points 'band', ti points 'ts' or 'te' |
band_attach_sgn(bi, ti0,ti1:INT):INT |
---|
**** | bi points 'band', ti points 'ts' or 'te' |
checkCode(message:BOOL):BOOL |
---|
checkCode:BOOL |
---|
**** | no check on crossings |
clone:SAME |
---|
cmpOf(i:INT):INT |
---|
**** | return -1 if no companion |
compoStart(c:INT):INT .. Included as compoStart |
---|
**** | start point of c-th component. return -1, if #compo<c. |
concat |
---|
**** | concatinate strings if (look like) connected in diagram. |
concat_at_tail(i:INT) |
---|
**** | concatinate strings if (look like) connected in diagram. |
countVertex(i:INT):INT |
---|
**** | count vertices on the string |
cp(inout dist:INT, s_beg,s_end:INT, s_knot:SAME) .. Included as cp |
---|
create:SAME |
---|
delStr(inout i:INT) |
---|
**** | del code of string ks..ke/ts..te cantaining i with codeDel. |
distV(i,j:INT):INT |
---|
**** | return distance ( Knot[i], Knot[j]) |
distanceL2(ki:INT, x, y:INT, rot:INT):INT |
---|
**** | distance( edge(ki--(ki+1), point(x,y) )^2 rot; 1:only left side. -1: right side. 0:each side. |
edge_clean |
---|
**** | If edges v1-v2-v3 is straight then remove v2 as v1-v3. |
endOfBridge(i:INT, dir:INT):INT |
---|
endOfString(i:INT, dir:INT):INT .. Included as endOfString |
---|
flip .. Included as flip |
---|
has_band(p1,p2:INT):BOOL .. Included as has_band |
---|
**** | true if segment p1--p2 has band_attach pts. |
has_band:BOOL .. Included as has_band |
---|
has_ind(i:CARD):BOOL .. Included as has_ind |
---|
has_ind(i:INT):BOOL .. Included as has_ind |
---|
is_Closed(i:INT):BOOL |
---|
**** | true if the string containing "i" is closed. check if (1)string of ks..ke is closed and (2)string of ts..te is attached to knot. |
is_Closed:BOOL |
---|
is_coherent(b:INT):BOOL |
---|
**** | check if band connectiong b is coherent. if the band is not proper then return __true__ . |
is_nocompo:BOOL |
---|
is_proper:BOOL |
---|
**** | knot code is proper for braid, ndata, invariants etc. |
is_theta:BOOL |
---|
**** | true if theta curve(1-component and 1-band). |
clone:SAME .. Included as kcode_clone |
---|
create:SAME .. Included as kcode_create |
---|
length:CARD .. Included as length |
---|
**** | code length __except terminator__. |
make_coherent |
---|
**** | if knot has bands, try orientation reversing on knots to make coherent along band connections. |
miniCrossing(gx, gy:INT, stp, enp:INT, out d:INT):INT |
---|
**** |
miniPt(gx,gy:INT, out pt:INT, out d:INT, out sw:INT) |
---|
**** | find near point of (mouseX,mouseY) |
miniVE(gx,gy:INT, stp,enp:INT, sw:INT, out d:INT):INT |
---|
**** | search nearest vertex/edge on Knot[].sw=0: vertex, sw=1:edgesw=2: other( dummy )returns (number of the vertex) and set distance (d). |
mirrorX |
---|
**** | mirror x --> -x |
mirrorY |
---|
**** | mirror y --> -y |
mirrorZ |
---|
**** | change all crossings |
nearStumpVertex(gx,gy: INT, out pt:INT, out d:INT) |
---|
**** | find near stump Vertex of knot |
nearVertexV(i1,i2:INT, out pt, out d:INT) |
---|
**** | find the nearest point from i1, except i1,i2 |
nextBridge(i:INT):INT |
---|
nextPt(i:INT, dir:INT):INT |
---|
**** | return next point. Normally i+dir but ks,ke,ts,te. dir:=1,-1. if next pt is not exist return -1. |
number_compo:INT .. Included as number_compo |
---|
number_crossing:INT .. Included as number_crossing |
---|
**** |
___#of_crossings |
number_negative_crossing:INT .. Included as number_negative_crossing |
---|
number_positive_crossing:INT .. Included as number_positive_crossing |
---|
number_writhe:INT .. Included as number_writhe |
---|
numbers_count(inout cr,inout cr_p,inout cr_n, inout compo,inout band:INT) .. Included as numbers_count |
---|
**** | # of crossings, knot , band in [stp..enp]. |
printD |
---|
**** | print for debug |
revK(i:INT) .. Included as revK |
---|
**** | ori. reverse the string |
rotBack1(stp, enp:INT) .. Included as rotBack1 |
---|
**** | rotate back component of stp--enp by 1 |
rotComponent(stp, enp:INT, stp1:INT) .. Included as rotComponent |
---|
**** | rotate back component of stp--enp move stp1 to head |
shiftToInside |
---|
size:CARD .. Included as size |
---|
tooShort(i:INT):BOOL |
---|
**** | true if the string is too short to shrink |
transform(mag:FLT) |
---|
**** | linear transformation of Knot |
transform(p,q,r,s:INT) |
---|
**** | linear transformation of Knot |
trivial0 |
---|
trivial0:SAME |
---|
width(out minX,out maxX,out minY,out maxY:INT) |
---|
bad(message:BOOL,num:CARD, i:INT) .. Included as bad |
---|