Adding_MD_integration_tests
        Adding_StructOpt_integration_tests
        AutomationFragmentation_failures
        Candidate_v1.6.1
        Candidate_v1.7.0
        ChemicalSpaceEvaluator
        Enhanced_StructuralOptimization
        Enhanced_StructuralOptimization_continued
        Exclude_Hydrogens_annealWithBondGraph
        ForceAnnealing_with_BondGraph
        ForceAnnealing_with_BondGraph_contraction-expansion
        Gui_displays_atomic_force_velocity
        JobMarket_RobustOnKillsSegFaults
        JobMarket_StableWorkerPool
        PythonUI_with_named_parameters
        StoppableMakroAction
        TremoloParser_IncreasedPrecision
        stable
      
      
      
| Line |   | 
|---|
| 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 | 
 | 
|---|
| 16 | #include "boost/serialization/vector.hpp"
 | 
|---|
| 17 | 
 | 
|---|
| 18 | #include <vector>
 | 
|---|
| 19 | 
 | 
|---|
| 20 | /** Contains the index set for each fragment.
 | 
|---|
| 21 |  *
 | 
|---|
| 22 |  */
 | 
|---|
| 23 | class KeySetsContainer {
 | 
|---|
| 24 |   public:
 | 
|---|
| 25 |     typedef std::vector<int> IntVector;
 | 
|---|
| 26 |     typedef std::vector<IntVector> ArrayOfIntVectors;
 | 
|---|
| 27 |     ArrayOfIntVectors KeySets;
 | 
|---|
| 28 |     IntVector AtomCounter;
 | 
|---|
| 29 |     int FragmentCounter;
 | 
|---|
| 30 |     int Order;
 | 
|---|
| 31 |     IntVector FragmentsPerOrder;
 | 
|---|
| 32 |     ArrayOfIntVectors OrderSet;
 | 
|---|
| 33 | 
 | 
|---|
| 34 |   KeySetsContainer();
 | 
|---|
| 35 |   ~KeySetsContainer();
 | 
|---|
| 36 | 
 | 
|---|
| 37 |   bool ParseKeySets(const std::string path, const std::string name, const int FCounter);
 | 
|---|
| 38 |   bool ParseManyBodyTerms();
 | 
|---|
| 39 |   bool Contains(const int GreaterSet, const int SmallerSet);
 | 
|---|
| 40 | 
 | 
|---|
| 41 |   bool operator==(const KeySetsContainer &other) const;
 | 
|---|
| 42 | 
 | 
|---|
| 43 |   bool operator!=(const KeySetsContainer &other) const {
 | 
|---|
| 44 |     return !(*this == other);
 | 
|---|
| 45 |   }
 | 
|---|
| 46 | 
 | 
|---|
| 47 |   void clear();
 | 
|---|
| 48 | 
 | 
|---|
| 49 |   void insert(const KeySetsContainer &other);
 | 
|---|
| 50 | 
 | 
|---|
| 51 |   void insert(const IntVector &set, const size_t order);
 | 
|---|
| 52 | 
 | 
|---|
| 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 |   }
 | 
|---|
| 66 | };
 | 
|---|
| 67 | 
 | 
|---|
| 68 | 
 | 
|---|
| 69 | #endif /* KEYSETSCONTAINER_HPP_ */
 | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.