/* * BuildInducedSubgraph.hpp * * Created on: Mar 3, 2011 * Author: heber */ #ifndef BUILDINDUCEDSUBGRAPH_HPP_ #define BUILDINDUCEDSUBGRAPH_HPP_ // include config.h #ifdef HAVE_CONFIG_H #include #endif #include class atom; class molecule; class BuildInducedSubgraph { public: BuildInducedSubgraph(molecule * const _Son, const molecule * const _Father); ~BuildInducedSubgraph(); /** Adds bond structure to this molecule from \a Father molecule. * This basically causes this molecule to become an induced subgraph of the \a Father, i.e. for every bond in Father * with end points present in this molecule, bond is created in this molecule. * Special care was taken to ensure that this is of complexity O(N), where N is the \a Father's molecule::AtomCount. * \param *Father father molecule * \return true - is induced subgraph, false - there are atoms with fathers not in \a Father * \todo not checked, not fully working probably */ bool operator()(); private: std::map ParentList; molecule * const Son; const molecule * const Father; void FillParentList(); bool CreateBondsFromParent(); }; #endif /* BUILDINDUCEDSUBGRAPH_HPP_ */