Пример #1
0
void read_complex(String & complex_name, Complex & complex){
	std::ifstream in;
	std::cout << "File IO ..." << std::flush;
	ctl::open_file( in, complex_name.c_str());
	complex.read( in);
	ctl::close_file( in);
	std::cout << "completed!" << std::endl;
}
Пример #2
0
void read_complex_and_data(String & complex_name, String & data_file, 
			   Complex & complex, Functor & f){
	std::ifstream in;
	std::cout << "File IO ..." << std::flush;
	//first read the complex in
	ctl::open_file( in, complex_name.c_str());
	complex.read( in);
	ctl::close_file( in);
	//then read the data file in, e.g. weights, cover, etc..
	ctl::open_file( in, data_file.c_str());
	complex.read_data( in, f);	
	ctl::close_file( in);
	std::cout << "completed!" << std::endl;
}