ForceAnnealing_goodresults
ForceAnnealing_tocheck
|
Last change
on this file since 7c7696 was f01769, checked in by Frederik Heber <heber@…>, 10 years ago |
|
Replaced World::getAtom() wherever possible by const version.
- some AtomSet member functions now have const atom ptr instead of atom ptr.
- molecule can return const and non-const AtomSet.
- added FromIdToConstAtom to allow iterate through atoms in molecule (which
are stored by id, not by ptr) in const fashion.
- in molecule::isInMolecule() is now const, ::CopyMolecule..() is non-const
(because copying involves father atom who is stored non-const).
|
-
Property mode
set to
100644
|
|
File size:
1.2 KB
|
| Line | |
|---|
| 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, 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 | 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.