Changeset 543ce4 for molecuilder/src/graph.cpp
- Timestamp:
- Nov 4, 2009, 7:56:04 PM (16 years ago)
- Children:
- 4ef101, aa8542
- Parents:
- ec70ec
- File:
-
- 1 edited
-
molecuilder/src/graph.cpp (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
molecuilder/src/graph.cpp
rec70ec r543ce4 11 11 #include "config.hpp" 12 12 #include "graph.hpp" 13 #include "log.hpp" 13 14 #include "molecule.hpp" 14 15 … … 78 79 * \param factor energy factor for the fragment 79 80 */ 80 void InsertFragmentIntoGraph( ofstream *out,struct UniqueFragments *Fragment)81 void InsertFragmentIntoGraph(struct UniqueFragments *Fragment) 81 82 { 82 83 GraphTestPair testGraphInsert; … … 84 85 testGraphInsert = Fragment->Leaflet->insert(GraphPair (*Fragment->FragmentSet,pair<int,double>(Fragment->FragmentCounter,Fragment->TEFactor))); // store fragment number and current factor 85 86 if (testGraphInsert.second) { 86 *out<< Verbose(2) << "KeySet " << Fragment->FragmentCounter << " successfully inserted." << endl;87 Log() << Verbose(2) << "KeySet " << Fragment->FragmentCounter << " successfully inserted." << endl; 87 88 Fragment->FragmentCounter++; 88 89 } else { 89 *out<< Verbose(2) << "KeySet " << Fragment->FragmentCounter << " failed to insert, present fragment is " << ((*(testGraphInsert.first)).second).first << endl;90 Log() << Verbose(2) << "KeySet " << Fragment->FragmentCounter << " failed to insert, present fragment is " << ((*(testGraphInsert.first)).second).first << endl; 90 91 ((*(testGraphInsert.first)).second).second += Fragment->TEFactor; // increase the "created" counter 91 *out<< Verbose(2) << "New factor is " << ((*(testGraphInsert.first)).second).second << "." << endl;92 Log() << Verbose(2) << "New factor is " << ((*(testGraphInsert.first)).second).second << "." << endl; 92 93 } 93 94 }; 94 //void inline InsertIntoGraph( ofstream *out,KeyStack &stack, Graph &graph, int *counter, double factor)95 //void inline InsertIntoGraph(KeyStack &stack, Graph &graph, int *counter, double factor) 95 96 //{ 96 97 // // copy stack contents to set and call overloaded function again … … 98 99 // for(KeyStack::iterator runner = stack.begin(); runner != stack.begin(); runner++) 99 100 // set.insert((*runner)); 100 // InsertIntoGraph( out,set, graph, counter, factor);101 // InsertIntoGraph(set, graph, counter, factor); 101 102 //}; 102 103 … … 107 108 * \param *counter keyset counter that gets increased 108 109 */ 109 void InsertGraphIntoGraph( ofstream *out,Graph &graph1, Graph &graph2, int *counter)110 void InsertGraphIntoGraph(Graph &graph1, Graph &graph2, int *counter) 110 111 { 111 112 GraphTestPair testGraphInsert; … … 114 115 testGraphInsert = graph1.insert(GraphPair ((*runner).first,pair<int,double>((*counter)++,((*runner).second).second))); // store fragment number and current factor 115 116 if (testGraphInsert.second) { 116 *out<< Verbose(2) << "KeySet " << (*counter)-1 << " successfully inserted." << endl;117 Log() << Verbose(2) << "KeySet " << (*counter)-1 << " successfully inserted." << endl; 117 118 } else { 118 *out<< Verbose(2) << "KeySet " << (*counter)-1 << " failed to insert, present fragment is " << ((*(testGraphInsert.first)).second).first << endl;119 Log() << Verbose(2) << "KeySet " << (*counter)-1 << " failed to insert, present fragment is " << ((*(testGraphInsert.first)).second).first << endl; 119 120 ((*(testGraphInsert.first)).second).second += (*runner).second.second; 120 *out<< Verbose(2) << "New factor is " << (*(testGraphInsert.first)).second.second << "." << endl;121 Log() << Verbose(2) << "New factor is " << (*(testGraphInsert.first)).second.second << "." << endl; 121 122 } 122 123 }
Note:
See TracChangeset
for help on using the changeset viewer.
