File tree 7 files changed +17
-2
lines changed
7 files changed +17
-2
lines changed Original file line number Diff line number Diff line change 35
35
// this flag allows that to happen.
36
36
//
37
37
// To set in testing add "--benchmark_edge_query_range=5" to your test command.
38
+ // When using blaze/bazel add "--test_arg=--benchmark_edge_query_range=5"
38
39
benchmarkEdgeQueryRange = flag .Int ("benchmark_edge_query_range" , 7 ,
39
40
"Set the upper limit on times to scale up the edge query " +
40
41
"edge counts in benchmark runs." )
Original file line number Diff line number Diff line change @@ -122,6 +122,13 @@ func ExampleEdgeQuery_FindEdges_findClosestEdges() {
122
122
polylines := []s2.Polyline {
123
123
// This is an iteration = 3 Koch snowflake centered at the
124
124
// center of the continental US.
125
+ //
126
+ // This was generated as:
127
+ //
128
+ // fractal := newFractal()
129
+ // fractal.setLevelForApproxMaxEdges(48)
130
+ // fractal.makeLoop(randomFrameAtPoint(
131
+ // PointFromLatLng(LatLngFromDegrees(39.833, -98.55))), s1.Angle(0.15))
125
132
s2.Polyline {
126
133
s2 .PointFromLatLng (s2 .LatLngFromDegrees (47.5467 , - 103.6035 )),
127
134
s2 .PointFromLatLng (s2 .LatLngFromDegrees (45.9214 , - 103.7320 )),
Original file line number Diff line number Diff line change @@ -148,7 +148,7 @@ var (
148
148
lineTriangle ,
149
149
skinnyChevron ,
150
150
loopA ,
151
- //snappedLoopA, // Fails TestAreaConsistentWithTurningAngle
151
+ // snappedLoopA, // Fails TestAreaConsistentWithTurningAngle
152
152
loopB ,
153
153
aIntersectB ,
154
154
aUnionB ,
Original file line number Diff line number Diff line change @@ -34,6 +34,9 @@ type Metric struct {
34
34
35
35
// Defined metrics.
36
36
// Of the projection methods defined in C++, Go only supports the quadratic projection.
37
+ // See
38
+ // https://github.com/google/s2geometry/blob/58de4ea1e2f8a294e0c072c602c22232fd1433ad/src/s2/s2coords.h#L238
39
+ // for more details.
37
40
38
41
// Each cell is bounded by four planes passing through its four edges and
39
42
// the center of the sphere. These metrics relate to the angle between each
Original file line number Diff line number Diff line change @@ -298,6 +298,9 @@ func TestRegionCovererIsCanonical(t *testing.T) {
298
298
}
299
299
}
300
300
301
+ // To run these benchmarks with blaze/bazel use:
302
+ // blaze test -c opt --test_output=all --test_arg=--test.bench=BenchmarkRegion --test_arg=--test.benchmem util/geometry/go:s2_test
303
+
301
304
const numCoveringBMRegions = 1000
302
305
303
306
func BenchmarkRegionCovererCoveringCap (b * testing.B ) {
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ import (
28
28
29
29
var (
30
30
// To set in testing add "--benchmark_brute_force=true" to your test command.
31
+ // When using blaze/bazel add "--test_arg=--benchmark_brute_force=true"
31
32
benchmarkBruteForce = flag .Bool ("benchmark_brute_force" , false ,
32
33
"When set, use brute force algorithms in benchmarking." )
33
34
)
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ import (
32
32
// transformation is designed to make the cells at each level fairly uniform
33
33
// in size.
34
34
//
35
- /// /////////////////////// S2 Cell Decomposition /////////////////////////
35
+ // /////////////////////// S2 Cell Decomposition /////////////////////////
36
36
//
37
37
// The following methods define the cube-to-sphere projection used by
38
38
// the Cell decomposition.
You can’t perform that action at this time.
0 commit comments