MCPcopy Create free account
hub / github.com/abess-team/abess / testIntersect2

Method testIntersect2

python/include/unsupported/test/BVH.cpp:141–164  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

139 }
140
141 void testIntersect2()
142 {
143 BallTypeList b;
144 VectorTypeList v;
145
146 for(int i = 0; i < 50; ++i) {
147 b.push_back(BallType(VectorType::Random(), 0.5 * internal::random(0., 1.)));
148 for(int j = 0; j < 3; ++j)
149 v.push_back(VectorType::Random());
150 }
151
152 KdBVH<double, Dim, BallType> tree(b.begin(), b.end());
153 KdBVH<double, Dim, VectorType> vTree(v.begin(), v.end());
154
155 BallPointStuff<Dim> i1, i2;
156
157 for(int i = 0; i < (int)b.size(); ++i)
158 for(int j = 0; j < (int)v.size(); ++j)
159 i1.intersectObjectObject(b[i], v[j]);
160
161 BVIntersect(tree, vTree, i2);
162
163 VERIFY(i1.count == i2.count);
164 }
165
166 void testMinimize2()
167 {

Callers 1

test_BVHFunction · 0.80

Calls 7

BVIntersectFunction · 0.85
beginMethod · 0.80
endMethod · 0.80
intersectObjectObjectMethod · 0.80
randomFunction · 0.50
push_backMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected