input
stringlengths 10
828
| output
stringlengths 5
107
|
|---|---|
public void bind if helper a null helper a bind 0 object a objects a objects a length 1 if helper b null helper b bind 0 object b objects b objects b length 1 add listeners
|
binds the beans
|
public void unbind remove listeners if helper a null helper a unbind 0 if helper b null helper b unbind 0
|
unbinds the beans
|
private void rebind a final int i remove listeners if helper a null helper a unbind i helper a bind i object a objects a objects a length 1 add listeners copy ato b
|
rebinds beans in the chain of the properties of bean a starting from
|
public void augment final mappings mappings for final mapping mapping mappings get mapping list augument mapping for final binding binding mappings get binding list augument binding
|
this method is public for easy testing
|
private void add listeners if object a null object b null object a add property change listener property a get name this object b add property change listener property b get name this
|
add listeners to the last beans in the chain
|
private void remove listeners if object a null object b null object a remove property change listener property a get name this object b remove property change listener property b get name this
|
remove listeners from the last beans in the chain
|
public void bind int i if i 0 if the root bean then just add property change handler objects i add property change listener properties i get name this else else first copy the bean from the property of previous bean in the chain i while true if objects i 1 sources property change events properties i get value objects i null i properties length 1 return objects i add property change listener properties i get name this
|
binds intermediate beans to binder helper starting from bean at level
|
public void unbind int i for i properties length 1 i if objects i null return objects i remove property change listener properties i get name this objects i null
|
unbinds binder helper from intermediate beans starting from bean at
|
public void delete rot null
|
marks this quadedge as being deleted
|
public boolean is live return rot null
|
tests whether this edge has been deleted
|
public void set next quad edge next this next next
|
sets the connected edge
|
public int get edge index quad edge e for int i 0 i 3 i if edge i e return i return 1
|
gets the index for the given edge of this triangle
|
public double get length return orig get coordinate distance dest get coordinate
|
gets the length of the geometry of this quadedge
|
public int get edge index vertex v for int i 0 i 3 i if edge i orig v return i return 1
|
gets the index for the edge that starts at vertex v
|
public boolean equals non oriented quad edge qe if equals oriented qe return true if equals oriented qe sym return true return false
|
tests if this quadedge and another have the same line segment geometry
|
public boolean equals oriented quad edge qe if orig get coordinate equals2 d qe orig get coordinate dest get coordinate equals2 d qe dest get coordinate return true return false
|
tests if this quadedge and another have the same line segment geometry
|
public boolean is border for int i 0 i 3 i if get adjacent triangle across edge i null return true return false
|
tests whether this triangle is adjacent to the outside of the subdivision
|
public string to string coordinate p0 vertex get coordinate coordinate p1 dest get coordinate return wktwriter to line string p0 p1
|
converts this edge to a wkt two point tt linestring tt indicating
|
public void init collection tris tri queue add all tris
|
called to initialize the traversal queue with a given set of
|
public envelope get envelope return new envelope frame env
|
gets the envelope of the subdivision including the frame
|
public void visit all traversal visitor visitor while tri queue is empty quad edge triangle tri quad edge triangle tri queue remove first process tri visitor
|
subclasses call this method to perform the visiting process
|
public collection get edges return quad edges
|
gets the collection of base
|
public coordinate get coordinate return pt
|
gets the approximate location of this error
|
public void set on constraint boolean is on constraint this is on constraint is on constraint
|
sets whether this vertex lies on a constraint
|
public boolean is on constraint return is on constraint
|
tests whether this vertex lies on a constraint
|
public void set constraint object constraint is on constraint true this constraint constraint
|
sets the external constraint information
|
protected void merge constraint vertex other if other is on constraint is on constraint true constraint other constraint
|
merges the constraint data in the vertex tt other tt into this vertex
|
public quad edge make edge vertex o vertex d quad edge q quad edge make edge o d quad edges add q return q
|
creates a new quadedge recording it in the edges list
|
public void insert sites collection vertices for iterator i vertices iterator i has next vertex v vertex i next insert site v
|
inserts all sites in a collection
|
public void delete quad edge e quad edge splice e e o prev quad edge splice e sym e sym o prev quad edge e sym e sym quad edge e rot e rot quad edge e rot sym e rot sym this is inefficient on an array list but this method should be called infrequently quad edges remove e quad edges remove e sym quad edges remove e rot quad edges remove e rot sym e delete e sym delete e rot delete e rot sym delete
|
deletes a quadedge from the subdivision
|
public void set constraints list segments list seg vertices this segments segments this seg vertices seg vertices
|
sets the constraints to be conformed to by the computed triangulation
|
public double circum radius ratio vertex b vertex c vertex x this circle center b c double radius distance x b double edge length distance this b double el distance b c if el edge length edge length el el distance c this if el edge length edge length el return radius edge length
|
computes the value of the ratio of the circumradius to shortest edge
|
public vertex circle center vertex b vertex c vertex a new vertex this get x this get y compute the perpendicular bisector of cord ab hcoordinate cab bisector a b compute the perpendicular bisector of cord bc hcoordinate cbc bisector b c compute the intersection of the bisectors circle radii hcoordinate hcc new hcoordinate cab cbc vertex cc null try cc new vertex hcc get x hcc get y catch not representable exception nre system err println a a b b c c system err println nre return cc
|
computes the centre of the circumcircle of this vertex and two others
|
public void set vertex factory constraint vertex factory vertex factory this vertex factory vertex factory
|
sets a custom
|
public quad edge locate vertex v return locator locate v
|
finds a quadedge of a triangle containing a location
|
public coordinate find split point segment seg coordinate encroach pt coordinate p0 seg get start coordinate p1 seg get end return new coordinate p0 x p1 x 2 p0 y p1 y 2
|
gets the midpoint of the split segment
|
public quad edge locate coordinate p return locator locate new vertex p
|
finds a quadedge of a triangle containing a location
|
public list get initial vertices return initial vertices
|
gets the sites vertices used to initialize the triangulation
|
public geometry get convex hull return convex hull
|
gets the convex hull of all the sites in the triangulation
|
public quad edge locate coordinate p0 coordinate p1 find an edge containing one of the points quad edge e locator locate new vertex p0 if e null return null normalize so that p0 is origin of base edge quad edge base e if e dest get coordinate equals2 d p0 base e sym check all edges around origin of base edge quad edge loc edge base do if loc edge dest get coordinate equals2 d p1 return loc edge loc edge loc edge o next while loc edge base return null
|
locates the edge between the given vertices if it exists in the
|
public quad edge insert site vertex v quad edge e locate v if v equals e orig tolerance v equals e dest tolerance return e point already in subdivision connect the new point to the vertices of the containing triangle or quadrilateral if the new point fell on an existing edge quad edge base make edge e orig v quad edge splice base e quad edge start edge base do base connect e base sym e base o prev while e l next start edge return start edge
|
inserts a new site into the subdivision connecting it to the vertices of
|
public coordinate get start return ls get coordinate 0
|
gets the start coordinate of the segment
|
public coordinate get end return ls get coordinate 1
|
gets the end coordinate of the segment
|
public double get start x coordinate p ls get coordinate 0 return p x
|
gets the start x ordinate of the segment
|
public double get start y coordinate p ls get coordinate 0 return p y
|
gets the start y ordinate of the segment
|
public double get start z coordinate p ls get coordinate 0 return p z
|
gets the start z ordinate of the segment
|
private constraint vertex create vertex coordinate p segment seg constraint vertex v null if vertex factory null v vertex factory create vertex p seg else v new constraint vertex p v set on constraint true return v
|
creates a vertex on a constraint segment
|
public double get end x coordinate p ls get coordinate 1 return p x
|
gets the end x ordinate of the segment
|
public double get end y coordinate p ls get coordinate 1 return p y
|
gets the end y ordinate of the segment
|
public double get end z coordinate p ls get coordinate 1 return p z
|
gets the end z ordinate of the segment
|
private void insert sites collection vertices debug println adding sites vertices size for iterator i vertices iterator i has next constraint vertex v constraint vertex i next insert site v
|
inserts all sites in a collection
|
public line segment get line segment return ls
|
gets a tt line segment tt modelling this segment
|
public boolean equals topo segment s return ls equals topo s get line segment
|
determines whether two segments are topologically equal
|
public coordinate intersection segment s return ls intersection s get line segment
|
computes the intersection point between this segment and another one
|
public string to string return ls to string
|
computes a string representation of this segment
|
public void insert site coordinate p insert site create vertex p
|
inserts a site into the triangulation maintaining the conformal delaunay property
|
public boolean is frame vertex vertex v if v equals frame vertex 0 return true if v equals frame vertex 1 return true if v equals frame vertex 2 return true return false
|
tests whether a vertex is a vertex of the outer triangle
|
public void form initial delaunay compute bounding box subdiv new quad edge subdivision compute area env tolerance subdiv set locator new last found quad edge locator subdiv inc del new incremental delaunay triangulator subdiv insert sites initial vertices
|
computes the delaunay triangulation of the initial sites
|
public void enforce constraints add constraint vertices if true return int count 0 int splits 0 do splits enforce gabriel segments count debug println iter count splits splits current segments segments size while splits 0 count max split iter if count max split iter debug println aborted too many iterations while enforcing constraints if debug is debugging throw new constraint enforcement exception too many splitting iterations while enforcing constraints last split point was at split pt
|
enforces the supplied constraints into the triangulation
|
public boolean is on edge quad edge e coordinate p seg set coordinates e orig get coordinate e dest get coordinate double dist seg distance p heuristic hack return dist edge coincidence tolerance
|
tests whether a
|
public boolean is vertex of edge quad edge e vertex v if v equals e orig tolerance v equals e dest tolerance return true return false
|
tests whether a
|
public list get primary edges boolean include frame visited key list edges new array list stack edge stack new stack edge stack push starting edge set visited edges new hash set while edge stack empty quad edge edge quad edge edge stack pop if visited edges contains edge quad edge pri qe edge get primary if include frame is frame edge pri qe edges add pri qe edge stack push edge o next edge stack push edge sym o next visited edges add edge visited edges add edge sym return edges
|
gets all primary quadedges in the subdivision
|
public list get triangle edges boolean include frame triangle edges list visitor visitor new triangle edges list visitor visit triangles visitor include frame return visitor get triangle edges
|
gets a list of the triangles
|
public list get triangle vertices boolean include frame triangle vertex list visitor visitor new triangle vertex list visitor visit triangles visitor include frame return visitor get triangle vertices
|
gets a list of the triangles in the subdivision
|
public list get triangle coordinates boolean include frame triangle coordinates visitor visitor new triangle coordinates visitor visit triangles visitor include frame return visitor get triangles
|
gets the coordinates for each triangle in the subdivision as an array
|
public geometry get edges geometry factory geom fact list quad edges get primary edges false line string edges new line string quad edges size int i 0 for iterator it quad edges iterator it has next quad edge qe quad edge it next edges i geom fact create line string new coordinate qe orig get coordinate qe dest get coordinate return geom fact create multi line string edges
|
gets the geometry for the edges in the subdivision as a
|
public geometry get triangles geometry factory geom fact list tri pts list get triangle coordinates false polygon tris new polygon tri pts list size int i 0 for iterator it tri pts list iterator it has next coordinate tri pt coordinate it next tris i geom fact create polygon geom fact create linear ring tri pt null return geom fact create geometry collection tris
|
gets the geometry for the triangles in a triangulated subdivision as a
|
public directed edge get sym return sym
|
each edge gives rise to a pair of symmetric directed edges in opposite
|
public boolean is end of line if component index num lines return false line string current line line string linear get geometry n component index if vertex index current line get num points 1 return false return true
|
checks whether the iterator cursor is pointing to the
|
public int compare to object o linear location other linear location o compare component indices if component index other component index return 1 if component index other component index return 1 compare segments if segment index other segment index return 1 if segment index other segment index return 1 same segment so compare segment fraction if segment fraction other segment fraction return 1 if segment fraction other segment fraction return 1 same location return 0
|
compares this object with the specified object for order
|
public int compare location values int component index1 int segment index1 double segment fraction1 compare component indices if component index component index1 return 1 if component index component index1 return 1 compare segments if segment index segment index1 return 1 if segment index segment index1 return 1 same segment so compare segment fraction if segment fraction segment fraction1 return 1 if segment fraction segment fraction1 return 1 same location return 0
|
compares this object with the specified index values for order
|
public int compare to object o buffer subgraph graph buffer subgraph o if this right most coord x graph right most coord x return 1 if this right most coord x graph right most coord x return 1 return 0
|
buffer subgraphs are compared on the x value of their rightmost coordinate
|
public void add line merge directed edge directed edge directed edges add directed edge
|
adds a directed edge which is known to form part of this line
|
public line string to line string return factory create line string get coordinates
|
converts this edge string into a line string
|
public void add geometry geometry geometry apply new geometry component filter public void filter geometry component if component instanceof line string add line string component
|
adds a geometry to be processed
|
public collection get merged line strings merge return merged line strings
|
returns the line strings built by the merging process
|
public line string get line return line
|
returns the line string specifying the vertices of this edge
|
public void add hole linear ring hole if holes null holes new array list holes add hole
|
adds a hole to the polygon formed by this ring
|
public void set distance tolerance double distance tolerance if distance tolerance 0 0 throw new illegal argument exception tolerance must be positive this distance tolerance distance tolerance
|
sets the distance tolerance for the densification
|
public geometry get result geometry return new densify transformer transform input geom
|
gets the densified geometry
|
private geometry create valid area geometry rough area geom return rough area geom buffer 0 0
|
creates a valid area geometry from one that possibly has bad topology
|
public int get count return n
|
returns the result of the filtering
|
public void clear size 0 items clear
|
make the priority queue logically empty
|
public geometry read string well known text throws parse exception string reader reader new string reader well known text try return read reader finally reader close
|
reads a well known text representation of a
|
public geometry read reader reader throws parse exception tokenizer new stream tokenizer reader set tokenizer to not parse numbers tokenizer reset syntax tokenizer word chars a z tokenizer word chars a z tokenizer word chars 128 32 255 tokenizer word chars 0 9 tokenizer word chars tokenizer word chars tokenizer word chars tokenizer whitespace chars 0 tokenizer comment char try return read geometry tagged text catch ioexception e throw new parse exception e to string
|
reads a well known text representation of a
|
private string get next empty or opener throws ioexception parse exception string next word get next word if next word equals empty next word equals l paren return next word parse error empty or l paren return null
|
returns the next empty or l paren in the stream as uppercase text
|
private string get next closer or comma throws ioexception parse exception string next word get next word if next word equals comma next word equals r paren return next word parse error comma or r paren return null
|
returns the next r paren or comma in the stream
|
private string get next closer throws ioexception parse exception string next word get next word if next word equals r paren return next word parse error r paren return null
|
returns the next r paren in the stream
|
public void add text string str if text null text new string buffer text append str
|
caches text for the future
|
public void keep object obj if children null children new linked list children add obj
|
store param for the future
|
private string get next word throws ioexception parse exception int type tokenizer next token switch type case stream tokenizer tt word string word tokenizer sval if word equals ignore case empty return empty return word case return l paren case return r paren case return comma parse error word return null
|
returns the next word in the stream
|
public geometry get geometry if stack size 1 handler h handler stack peek if h children size 1 return geometry h children get 0 return gf create geometry collection geometry h children to array new geometry stack size throw new illegal state exception parse did not complete as expected there are stack size elements on the stack
|
gets the geometry parsed by this handler
|
private string lookahead word throws ioexception parse exception string next word get next word tokenizer push back return next word
|
returns the next word in the stream
|
private point read point text throws ioexception parse exception string next token get next empty or opener if next token equals empty return geometry factory create point coordinate null point point geometry factory create point get precise coordinate get next closer return point
|
creates a code point code using the next token in the stream
|
private line string read line string text throws ioexception parse exception return geometry factory create line string get coordinates
|
creates a code line string code using the next token in the stream
|
private polygon read polygon text throws ioexception parse exception string next token get next empty or opener if next token equals empty return geometry factory create polygon geometry factory create linear ring new coordinate new linear ring array list holes new array list linear ring shell read linear ring text next token get next closer or comma while next token equals comma linear ring hole read linear ring text holes add hole next token get next closer or comma linear ring array new linear ring holes size return geometry factory create polygon shell linear ring holes to array array
|
creates a code polygon code using the next token in the stream
|
public void set namespace boolean emit namespace this emit namespace emit namespace
|
determines whether a gml namespace declaration will be written in the
|
public void set custom elements string custom elements this custom elements custom elements
|
specifies a list of custom elements
|
public void set starting indent index int indent if indent 0 indent 0 starting indent index indent
|
sets the starting column index for pretty printing
|
private multi polygon read multi polygon text throws ioexception parse exception string next token get next empty or opener if next token equals empty return geometry factory create multi polygon new polygon array list polygons new array list polygon polygon read polygon text polygons add polygon next token get next closer or comma while next token equals comma polygon read polygon text polygons add polygon next token get next closer or comma polygon array new polygon polygons size return geometry factory create multi polygon polygon polygons to array array
|
creates a code multi polygon code using the next token in the stream
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.