21#include <boost/test/unit_test.hpp>
32 double dx = std::fabs( a.x - b.x );
33 double dy = std::fabs( a.y - b.y );
41 return dx * dx + dy * dy;
65 const double minDist = 0.125;
69 for(
size_t i = 0; i < samples.size(); ++i )
71 for(
size_t j = i + 1; j < samples.size(); ++j )
73 BOOST_CHECK_MESSAGE(
torDistSq( samples[i], samples[j] ) >= minDist * minDist,
74 "samples " << i <<
" and " << j <<
" closer than minDist" );
87 for(
size_t i = 0; i < a.size(); ++i )
96 bool differs = ( a.size() != c.size() );
98 for(
size_t i = 0; !differs && i < a.size(); ++i )
99 differs = ( a[i] != c[i] );
107 const double minDist = 0.125;
114 BOOST_CHECK_GE( samples.size(), 20 );
115 BOOST_CHECK_LE( samples.size(), 74 );
static bool empty(const wxTextEntryBase *aCtrl)
std::vector< VECTOR2D > ToroidalUnitTile(double aMinDist, uint32_t aSeed)
Bridson's "Fast Poisson Disk Sampling in Arbitrary Dimensions" with toroidal boundary conditions on t...
BOOST_AUTO_TEST_SUITE(CadstarPartParser)
BOOST_CHECK(res.column_datatype(0)==SQL_NUMERIC||res.column_datatype(0)==SQL_DECIMAL)
BOOST_REQUIRE_EQUAL(rows.size(), 1)
BOOST_CHECK_EQUAL(std::any_cast< std::string >(rows[0].at("val")), "12345678901234567.89")
BOOST_AUTO_TEST_SUITE_END()
BOOST_AUTO_TEST_CASE(DegenerateInputs)
static double torDistSq(const VECTOR2D &a, const VECTOR2D &b)
VECTOR2< double > VECTOR2D