/* * AdjacencyList.hpp * * Created on: Mar 3, 2011 * Author: heber */ #ifndef ADJACENCYLIST_HPP_ #define ADJACENCYLIST_HPP_ // include config.h #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include "types.hpp" #include "World.hpp" class atom; /** This class contains the adjacency structure inside an internal map of atoms. * * The adjacency structure is either from a file or from a given set of atoms. * * We may compare a subset of atoms against this internal bond structure. It is * true it is a true subset of the bond structure. */ class AdjacencyList { //!> Unit test is granted access to internal data friend class AdjacencyListTest; public: typedef std::vector atomids_t; AdjacencyList(std::istream &File); AdjacencyList(const atomids_t &atoms); ~AdjacencyList(); bool CheckAgainstSubset(const atomids_t &atoms); private: typedef std::set KeysSet; typedef std::set ValuesSet; typedef std::pair AtomBondPair; typedef std::multimap< atomId_t, atomId_t > AtomBondMap; typedef std::pair AtomBondRange; AtomBondMap InternalAtomBondMap; AtomBondMap ExternalAtomBondMap; int NonMatchNumber; KeysSet getKeys(const AtomBondRange &_range) const; ValuesSet getValues(const AtomBondRange&_range) const; void CreateExternalMap(const atomids_t &atoms); bool ParseInInternalMap(std::istream &File); bool CompareInternalExternalMap(); }; #endif /* ADJACENCYLIST_HPP_ */