source: src/Fragmentation/Summation/unittests/SubsetMapUnitTest.hpp@ cdac1d

SaturateAtoms_singleDegree
Last change on this file since cdac1d was 19c50e, checked in by Frederik Heber <heber@…>, 12 years ago

IndexSetContainer now treats super set specially.

  • The super set must not gather its subsets via the gatherSubsets() as by construction all other sets are its subsets! As the super set is very large the power set way is no good idea.
  • added default cstor for SortedVector
  • removed SubsetMap::getMaximumSubsetLevel() as is replaced by ::getMaximumSetLevel() which is the level to sum up to.
  • changed all uses of getMaximumSubsetLevel() to getMaximumSetLevel().
  • TESTFIX: Changed unit test function on getMaximumSubsetLevel() to check on getMaximumSetLevel()
  • removed OrthogonalFullSummator as is fully replacable by OrthogonalSummator.
  • changed IndexSetContainer::createSuperSet a bit.
  • IndexSetContainer::AllIndices is now no more static convenience entity but truely contains the super set (non-statically). ::createSuperSet() is for convenience to be called in cstor for AllIndices.
  • Property mode set to 100644
File size: 1.1 KB
Line 
1/*
2 * SubsetMapUnitTest.hpp
3 *
4 * Created on: Jul 3, 2012
5 * Author: heber
6 */
7
8#ifndef SUBSETMAPUNITTEST_HPP_
9#define SUBSETMAPUNITTEST_HPP_
10
11// include config.h
12#ifdef HAVE_CONFIG_H
13#include <config.h>
14#endif
15
16
17#include <cppunit/extensions/HelperMacros.h>
18
19#include <vector>
20
21#include "Fragmentation/Summation/IndexSet.hpp"
22#include "Fragmentation/Summation/SubsetMap.hpp"
23
24/********************************************** Test classes **************************************/
25
26class SubsetMapTest : public CppUnit::TestFixture
27{
28 CPPUNIT_TEST_SUITE( SubsetMapTest) ;
29 CPPUNIT_TEST ( getNoPowerSetsTest );
30 CPPUNIT_TEST ( getPowerSetIndexTest );
31 CPPUNIT_TEST ( getSubsetTest );
32 CPPUNIT_TEST ( gatherSubsetTest );
33 CPPUNIT_TEST ( getMaximumSetLevelTest );
34 CPPUNIT_TEST_SUITE_END();
35
36public:
37 void setUp();
38 void tearDown();
39 void getNoPowerSetsTest();
40 void getPowerSetIndexTest();
41 void getSubsetTest();
42 void gatherSubsetTest();
43 void getMaximumSetLevelTest();
44
45private:
46 SubsetMap *SM;
47 std::vector<IndexSet> allsets;
48};
49
50#endif /* SUBSETMAPUNITTEST_HPP_ */
Note: See TracBrowser for help on using the repository browser.