Candidate_v1.6.1
Rev | Line | |
---|
[a9b86d] | 1 | /*
|
---|
| 2 | * KeySetsContainer.hpp
|
---|
| 3 | *
|
---|
| 4 | * Created on: Sep 15, 2011
|
---|
| 5 | * Author: heber
|
---|
| 6 | */
|
---|
| 7 |
|
---|
| 8 | #ifndef KEYSETSCONTAINER_HPP_
|
---|
| 9 | #define KEYSETSCONTAINER_HPP_
|
---|
| 10 |
|
---|
| 11 | // include config.h
|
---|
| 12 | #ifdef HAVE_CONFIG_H
|
---|
| 13 | #include <config.h>
|
---|
| 14 | #endif
|
---|
| 15 |
|
---|
[942906] | 16 | #include "boost/serialization/vector.hpp"
|
---|
| 17 |
|
---|
| 18 | #include <vector>
|
---|
[a9b86d] | 19 |
|
---|
| 20 | /** Contains the index set for each fragment.
|
---|
| 21 | *
|
---|
| 22 | */
|
---|
| 23 | class KeySetsContainer {
|
---|
| 24 | public:
|
---|
[9758f7] | 25 | typedef std::vector<int> IntVector;
|
---|
| 26 | typedef std::vector<IntVector> ArrayOfIntVectors;
|
---|
| 27 | ArrayOfIntVectors KeySets;
|
---|
| 28 | IntVector AtomCounter;
|
---|
[a9b86d] | 29 | int FragmentCounter;
|
---|
| 30 | int Order;
|
---|
[9758f7] | 31 | IntVector FragmentsPerOrder;
|
---|
| 32 | ArrayOfIntVectors OrderSet;
|
---|
[a9b86d] | 33 |
|
---|
| 34 | KeySetsContainer();
|
---|
| 35 | ~KeySetsContainer();
|
---|
| 36 |
|
---|
[8b58ac] | 37 | bool ParseKeySets(const std::string path, const std::string name, const int FCounter);
|
---|
[a9b86d] | 38 | bool ParseManyBodyTerms();
|
---|
| 39 | bool Contains(const int GreaterSet, const int SmallerSet);
|
---|
[1b145f] | 40 |
|
---|
| 41 | bool operator==(const KeySetsContainer &other) const;
|
---|
| 42 |
|
---|
| 43 | bool operator!=(const KeySetsContainer &other) const {
|
---|
| 44 | return !(*this == other);
|
---|
| 45 | }
|
---|
[942906] | 46 |
|
---|
[ac9ca4] | 47 | void clear();
|
---|
| 48 |
|
---|
| 49 | void insert(const KeySetsContainer &other);
|
---|
| 50 |
|
---|
| 51 | void insert(const IntVector &set, const size_t order);
|
---|
| 52 |
|
---|
[942906] | 53 | private:
|
---|
| 54 | friend class boost::serialization::access;
|
---|
| 55 | // serialization
|
---|
| 56 | template<class Archive>
|
---|
| 57 | void serialize(Archive & ar, const unsigned int version)
|
---|
| 58 | {
|
---|
| 59 | ar & KeySets;
|
---|
| 60 | ar & AtomCounter;
|
---|
| 61 | ar & FragmentCounter;
|
---|
| 62 | ar & Order;
|
---|
| 63 | ar & FragmentsPerOrder;
|
---|
| 64 | ar & OrderSet;
|
---|
| 65 | }
|
---|
[a9b86d] | 66 | };
|
---|
| 67 |
|
---|
| 68 |
|
---|
| 69 | #endif /* KEYSETSCONTAINER_HPP_ */
|
---|
Note:
See
TracBrowser
for help on using the repository browser.