Ignore:
Timestamp:
May 25, 2016, 7:13:59 AM (9 years ago)
Author:
Frederik Heber <heber@…>
Children:
a92c27
Parents:
66700f2
git-author:
Frederik Heber <heber@…> (07/12/14 11:57:54)
git-committer:
Frederik Heber <heber@…> (05/25/16 07:13:59)
Message:

Added getConnections() to SphericalPointDistribution.

  • we use tesselation in order to extract the connection information between nearest neighboring points from the BoundaryLines of the tesselation. The triangles are ideal as they assure that no point lies within a triangle, hence all these points may be safely combined.
  • functions reside in extra module as with get().
  • added extensive unit tests.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Fragmentation/Exporters/unittests/SphericalPointDistributionUnitTest.hpp

    r66700f2 r4492f1  
    1919/********************************************** Test classes **************************************/
    2020
    21 class SphericalPointDistributionTest : public CppUnit::TestFixture
     21/** Template specialization needs to be in front of adding the test via CPPUNIT_TEST
     22 * Hence,we put it in an extra class and inherit the functions.
     23 */
     24struct SphericalPointDistributionTest_assistant
    2225{
     26public:
     27  template <int N>
     28  void getConnectionTest();
     29};
     30
     31template <> void SphericalPointDistributionTest_assistant::getConnectionTest<0>();
     32template <> void SphericalPointDistributionTest_assistant::getConnectionTest<1>();
     33template <> void SphericalPointDistributionTest_assistant::getConnectionTest<2>();
     34
     35#include "SphericalPointDistributionUnitTest_assistant.hpp"
     36
     37class SphericalPointDistributionTest :
     38  public CppUnit::TestFixture,
     39  public SphericalPointDistributionTest_assistant
     40{
     41
     42private:
    2343    CPPUNIT_TEST_SUITE( SphericalPointDistributionTest) ;
    2444    CPPUNIT_TEST( calculateCenterOfMinimumDistanceTest );
    2545    CPPUNIT_TEST ( areEqualToWithinBoundsTest );
    2646    CPPUNIT_TEST ( joinPointsTest );
     47    CPPUNIT_TEST ( getConnectionTest<0> );
     48    CPPUNIT_TEST ( getConnectionTest<1> );
     49    CPPUNIT_TEST ( getConnectionTest<2> );
     50    CPPUNIT_TEST ( getConnectionTest<3> );
     51    CPPUNIT_TEST ( getConnectionTest<4> );
     52    CPPUNIT_TEST ( getConnectionTest<5> );
     53    CPPUNIT_TEST ( getConnectionTest<6> );
     54    CPPUNIT_TEST ( getConnectionTest<7> );
     55    CPPUNIT_TEST ( getConnectionTest<8> );
     56    CPPUNIT_TEST ( getConnectionTest<9> );
     57    CPPUNIT_TEST ( getConnectionTest<10> );
     58    CPPUNIT_TEST ( getConnectionTest<11> );
     59    CPPUNIT_TEST ( getConnectionTest<12> );
     60    CPPUNIT_TEST ( getConnectionTest<14> );
    2761    CPPUNIT_TEST ( matchSphericalPointDistributionsTest_2 );
    2862    CPPUNIT_TEST ( matchSphericalPointDistributionsTest_3 );
     
    3266    CPPUNIT_TEST ( matchSphericalPointDistributionsTest_7 );
    3367    CPPUNIT_TEST ( matchSphericalPointDistributionsTest_8 );
    34     CPPUNIT_TEST ( matchSphericalPointDistributionsTest_multiple );
     68//    CPPUNIT_TEST ( matchSphericalPointDistributionsTest_multiple );
    3569    CPPUNIT_TEST_SUITE_END();
    3670
Note: See TracChangeset for help on using the changeset viewer.