MCPcopy Create free account
hub / github.com/BirolLab/abyss / generatePathsThroughEstimates

Function generatePathsThroughEstimates

SimpleGraph/SimpleGraph.cpp:738–828  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

736}
737
738static void generatePathsThroughEstimates(const Graph& g,
739 const string& estPath)
740{
741 if (opt::verbose > 0)
742 cerr << "Reading `" << estPath << "'..." << endl;
743 ifstream inStream(estPath.c_str());
744 assert_good(inStream, estPath);
745
746 ofstream outStream(opt::out.c_str());
747 assert(outStream.is_open());
748
749 // Create the worker threads.
750 vector<pthread_t> threads;
751 threads.reserve(opt::threads);
752 WorkerArg arg(&inStream, &outStream, &g);
753 for (unsigned i = 0; i < opt::threads; i++) {
754 pthread_t thread;
755 pthread_create(&thread, NULL, worker, &arg);
756 threads.push_back(thread);
757 }
758
759 // Wait for the worker threads to finish.
760 for (vector<pthread_t>::const_iterator it = threads.begin();
761 it != threads.end(); ++it) {
762 void* status;
763 pthread_join(*it, &status);
764 }
765 if (opt::verbose > 0)
766 cout << '\n';
767
768 cout <<
769 "Seed too short: " << stats.seedTooShort << "\n"
770 "Seeds with no edges: " << stats.noEdges << "\n"
771 "Edges removed: " << stats.edgesRemoved << "\n"
772 "Total paths attempted: " << stats.totalAttempted << "\n"
773 "Unique path: " << stats.uniqueEnd << "\n"
774 "No possible paths: " << stats.noPossiblePaths << "\n"
775 "No valid paths: " << stats.noValidPaths << "\n"
776 "Repetitive: " << stats.repeat << "\n"
777 "Multiple valid paths: " << stats.multiEnd << "\n"
778 "Too many solutions: " << stats.tooManySolutions << "\n"
779 "Too complex: " << stats.tooComplex << "\n";
780
781 vector<int> vals = make_vector<int>()
782 << stats.totalAttempted
783 << stats.uniqueEnd
784 << stats.noPossiblePaths
785 << stats.noValidPaths
786 << stats.repeat
787 << stats.multiEnd
788 << stats.tooManySolutions
789 << stats.tooComplex;
790
791 vector<string> keys = make_vector<string>()
792 << "stat_attempted_path_total"
793 << "stat_unique_path"
794 << "stat_impossible_path"
795 << "stat_no_valid_path"

Callers 1

mainFunction · 0.85

Calls 9

assert_goodFunction · 0.85
addToDbFunction · 0.85
closeMethod · 0.80
c_strMethod · 0.45
push_backMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
emptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected