MCPcopy
hub / github.com/golang/geo / Chain

Method Chain

s2/shape.go:217–217  ·  view source on GitHub ↗

Chain returns the range of edge IDs corresponding to the given edge chain. Edge chains must form contiguous, non-overlapping ranges that cover the entire range of edge IDs. This is spelled out more formally below: 0 <= i < NumChains() Chain(i).length > 0, for all i Chain(0).start == 0 Chain(i).star

(chainID int)

Source from the content-addressed store, hash-verified

215 // Chain(i).start + Chain(i).length == Chain(i+1).start, for i < NumChains()-1
216 // Chain(i).start + Chain(i).length == NumEdges(), for i == NumChains()-1
217 Chain(chainID int) Chain
218
219 // ChainEdge returns the edge at offset "offset" within edge chain "chainID".
220 // Equivalent to "shape.Edge(shape.Chain(chainID).start + offset)"

Callers 14

TestPolylineShapeFunction · 0.95
TestLaxLoopNonEmptyLoopFunction · 0.65
TestPointVectorBasicsFunction · 0.65
visitContainingShapesMethod · 0.65
referencePointForShapeFunction · 0.65
TestLoopBasicFunction · 0.65
TestPolygonFullFunction · 0.65
TestPolygonShapeFunction · 0.65
shapeIndexDebugStringFunction · 0.65
visitContainingShapesMethod · 0.65

Implementers 6

Loops2/loop.go
LaxLoops2/lax_loop.go
Polygons2/polygon.go
LaxPolylines2/lax_polyline.go
edgeVectorShapes2/edge_vector_shape_test.go
LaxPolygons2/lax_polygon.go

Calls

no outgoing calls

Tested by 11

TestPolylineShapeFunction · 0.76
TestLaxLoopNonEmptyLoopFunction · 0.52
TestPointVectorBasicsFunction · 0.52
TestLoopBasicFunction · 0.52
TestPolygonFullFunction · 0.52
TestPolygonShapeFunction · 0.52
shapeIndexDebugStringFunction · 0.52