| Rev | Line |  | 
|---|
| [2d4334] | 1 | /* | 
|---|
|  | 2 | * BuildInducedSubgraph.hpp | 
|---|
|  | 3 | * | 
|---|
|  | 4 | *  Created on: Mar 3, 2011 | 
|---|
|  | 5 | *      Author: heber | 
|---|
|  | 6 | */ | 
|---|
|  | 7 |  | 
|---|
|  | 8 | #ifndef BUILDINDUCEDSUBGRAPH_HPP_ | 
|---|
|  | 9 | #define BUILDINDUCEDSUBGRAPH_HPP_ | 
|---|
|  | 10 |  | 
|---|
|  | 11 | // include config.h | 
|---|
|  | 12 | #ifdef HAVE_CONFIG_H | 
|---|
|  | 13 | #include <config.h> | 
|---|
|  | 14 | #endif | 
|---|
|  | 15 |  | 
|---|
|  | 16 | #include <map> | 
|---|
|  | 17 |  | 
|---|
|  | 18 | class atom; | 
|---|
|  | 19 | class molecule; | 
|---|
|  | 20 |  | 
|---|
|  | 21 | class BuildInducedSubgraph | 
|---|
|  | 22 | { | 
|---|
|  | 23 | public: | 
|---|
|  | 24 | BuildInducedSubgraph(molecule * const _Son, const molecule * const _Father); | 
|---|
|  | 25 | ~BuildInducedSubgraph(); | 
|---|
|  | 26 |  | 
|---|
|  | 27 | /** Adds bond structure to this molecule from \a Father molecule. | 
|---|
|  | 28 | * This basically causes this molecule to become an induced subgraph of the \a Father, i.e. for every bond in Father | 
|---|
|  | 29 | * with end points present in this molecule, bond is created in this molecule. | 
|---|
|  | 30 | * Special care was taken to ensure that this is of complexity O(N), where N is the \a Father's molecule::AtomCount. | 
|---|
|  | 31 | * \param *Father father molecule | 
|---|
|  | 32 | * \return true - is induced subgraph, false - there are atoms with fathers not in \a Father | 
|---|
|  | 33 | * \todo not checked, not fully working probably | 
|---|
|  | 34 | */ | 
|---|
|  | 35 | bool operator()(); | 
|---|
|  | 36 |  | 
|---|
|  | 37 |  | 
|---|
|  | 38 | private: | 
|---|
|  | 39 | std::map<atom *, atom*> ParentList; | 
|---|
|  | 40 | molecule * const Son; | 
|---|
|  | 41 | const molecule * const Father; | 
|---|
|  | 42 |  | 
|---|
|  | 43 | void FillParentList(); | 
|---|
|  | 44 | bool CreateBondsFromParent(); | 
|---|
|  | 45 | }; | 
|---|
|  | 46 |  | 
|---|
|  | 47 | #endif /* BUILDINDUCEDSUBGRAPH_HPP_ */ | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.