示例#1
0
文件: GSEA.cpp 项目: koralgooll/GSEA
//----Constructors----//
GSEA::GSEA(const char* database_file_, const char* population_file_, const char* sample_file_)
	: database_file(database_file_), population_file(population_file_), sample_file(sample_file_)
{	
	/*
		This constructor handles the GSEA object.
		Sets the given file paths.
		Calls the make methods in sequence.
	*/
	clock_t tStart = clock();
	make_population();
	printf("make_population: %.2fs\n", (double)(clock() - tStart) / CLOCKS_PER_SEC);
	
	clock_t tpop_suc = clock();
	make_db_pop();
	printf("population success: %.2fs\n", (double)(clock() - tpop_suc) / CLOCKS_PER_SEC);
	
	clock_t tmake_sample = clock();
	make_sample();
	printf("make_sample: %.2fs\n", (double)(clock() - tmake_sample) / CLOCKS_PER_SEC);
	
	clock_t tsample = clock();
	make_result(sample);
	printf("make_result: %.2fs\n", (double)(clock() - tsample) / CLOCKS_PER_SEC);
	
};
示例#2
0
vector<Population> make_teams(size_t numTeams, size_t teamSize, PopulationLayout& pl) {
	vector<Population> teams(numTeams);
	size_t teamID = 0;
	std::generate(teams.begin(), teams.end(), [&]() { return make_population(teamID++, pl); });
	return teams;
}