Changeset df0520 for molecuilder/src/molecule_graph.cpp
- Timestamp:
- Nov 2, 2009, 12:50:57 PM (16 years ago)
- Children:
- 8bc524
- Parents:
- 245826
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
molecuilder/src/molecule_graph.cpp
r245826 rdf0520 190 190 * \param output stream 191 191 */ 192 void molecule::OutputBondsList(ofstream *out) 192 void molecule::OutputBondsList(ofstream *out) const 193 193 { 194 194 *out << Verbose(1) << endl << "From contents of bond chain list:"; … … 210 210 * \return number of bonds that could not be corrected 211 211 */ 212 int molecule::CorrectBondDegree(ofstream *out) 212 int molecule::CorrectBondDegree(ofstream *out) const 213 213 { 214 214 int No = 0; … … 265 265 * \return string of the flag 266 266 */ 267 string molecule::GetColor(enum Shading color) 267 string molecule::GetColor(enum Shading color) const 268 268 { 269 269 switch (color) { … … 314 314 * \param &DFS DFS accounting data 315 315 */ 316 void DepthFirstSearchAnalysis_ProbeAlongUnusedBond(ofstream *out, molecule *mol, atom *&Walker, bond *&Binder, struct DFSAccounting &DFS)316 void DepthFirstSearchAnalysis_ProbeAlongUnusedBond(ofstream *out, const molecule * const mol, atom *&Walker, bond *&Binder, struct DFSAccounting &DFS) 317 317 { 318 318 atom *OtherAtom = NULL; … … 357 357 * \param &DFS DFS accounting data 358 358 */ 359 void DepthFirstSearchAnalysis_CheckForaNewComponent(ofstream *out, molecule *mol, atom *&Walker, struct DFSAccounting &DFS, MoleculeLeafClass *&LeafWalker)359 void DepthFirstSearchAnalysis_CheckForaNewComponent(ofstream *out, const molecule * const mol, atom *&Walker, struct DFSAccounting &DFS, MoleculeLeafClass *&LeafWalker) 360 360 { 361 361 atom *OtherAtom = NULL; … … 403 403 * \param &DFS DFS accounting data 404 404 */ 405 void DepthFirstSearchAnalysis_CleanRootStackDownTillWalker(ofstream *out, molecule *mol, atom *&Walker, bond *&Binder, struct DFSAccounting &DFS, MoleculeLeafClass *&LeafWalker)405 void DepthFirstSearchAnalysis_CleanRootStackDownTillWalker(ofstream *out, const molecule * const mol, atom *&Walker, bond *&Binder, struct DFSAccounting &DFS, MoleculeLeafClass *&LeafWalker) 406 406 { 407 407 atom *OtherAtom = NULL; … … 467 467 * \return list of each disconnected subgraph as an individual molecule class structure 468 468 */ 469 MoleculeLeafClass * molecule::DepthFirstSearchAnalysis(ofstream *out, class StackClass<bond *> *&BackEdgeStack) 469 MoleculeLeafClass * molecule::DepthFirstSearchAnalysis(ofstream *out, class StackClass<bond *> *&BackEdgeStack) const 470 470 { 471 471 struct DFSAccounting DFS; … … 548 548 /** Scans through all bonds and set bond::Cyclic to true where atom::LowpointNr of both ends is equal: LP criterion. 549 549 */ 550 void molecule::CyclicBondAnalysis() 550 void molecule::CyclicBondAnalysis() const 551 551 { 552 552 NoCyclicBonds = 0; … … 565 565 * \param *out output stream 566 566 */ 567 void molecule::OutputGraphInfoPerAtom(ofstream *out) 567 void molecule::OutputGraphInfoPerAtom(ofstream *out) const 568 568 { 569 569 *out << Verbose(1) << "Final graph info for each atom is:" << endl; … … 575 575 * \param *out output stream 576 576 */ 577 void molecule::OutputGraphInfoPerBond(ofstream *out) 577 void molecule::OutputGraphInfoPerBond(ofstream *out) const 578 578 { 579 579 *out << Verbose(1) << "Final graph info for each bond is:" << endl; … … 829 829 * \param *mol molecule with atoms 830 830 */ 831 void CyclicStructureAnalysis_AssignRingSizetoNonCycleMembers(ofstream *out, int *&MinimumRingSize, int &MinRingSize, int &NumCycles, molecule *mol)831 void CyclicStructureAnalysis_AssignRingSizetoNonCycleMembers(ofstream *out, int *&MinimumRingSize, int &MinRingSize, int &NumCycles, const molecule * const mol) 832 832 { 833 833 atom *Root = NULL; … … 864 864 * \todo BFS from the not-same-LP to find back to starting point of tributary cycle over more than one bond 865 865 */ 866 void molecule::CyclicStructureAnalysis(ofstream *out, class StackClass<bond *> * BackEdgeStack, int *&MinimumRingSize) 866 void molecule::CyclicStructureAnalysis(ofstream *out, class StackClass<bond *> * BackEdgeStack, int *&MinimumRingSize) const 867 867 { 868 868 struct BFSAccounting BFS; … … 900 900 901 901 CyclicStructureAnalysis_AssignRingSizetoNonCycleMembers(out, MinimumRingSize, MinRingSize, NumCycles, this); 902 903 } 904 ; 902 }; 905 903 906 904 /** Sets the next component number. … … 909 907 * \param nr number to use 910 908 */ 911 void molecule::SetNextComponentNumber(atom *vertex, int nr) 909 void molecule::SetNextComponentNumber(atom *vertex, int nr) const 912 910 { 913 911 size_t i = 0; … … 931 929 * \return bond class or NULL 932 930 */ 933 bond * molecule::FindNextUnused(atom *vertex) 931 bond * molecule::FindNextUnused(atom *vertex) const 934 932 { 935 933 for (BondList::const_iterator Runner = vertex->ListOfBonds.begin(); Runner != vertex->ListOfBonds.end(); (++Runner)) … … 943 941 * \return true - success, false - -failure 944 942 */ 945 void molecule::ResetAllBondsToUnused() 943 void molecule::ResetAllBondsToUnused() const 946 944 { 947 945 bond *Binder = first; … … 1103 1101 * \return true - everything ok, false - ReferenceStack was empty 1104 1102 */ 1105 bool molecule::PickLocalBackEdges(ofstream *out, atom **ListOfLocalAtoms, class StackClass<bond *> *&ReferenceStack, class StackClass<bond *> *&LocalStack) 1103 bool molecule::PickLocalBackEdges(ofstream *out, atom **ListOfLocalAtoms, class StackClass<bond *> *&ReferenceStack, class StackClass<bond *> *&LocalStack) const 1106 1104 { 1107 1105 bool status = true;
Note:
See TracChangeset
for help on using the changeset viewer.