TEST(CoordinateSetTest, Resize) { CoordinateSet<Vector3> data; data.resize(5); EXPECT_EQ(data.size(), static_cast<size_t>(5)); data.resize(3); EXPECT_EQ(data.size(), static_cast<size_t>(3)); }
void CoordinateSets::write_xyz(std::string filename) { ofstream ofile(filename.c_str()); for(size_t i = 0; i < size(); ++i) { CoordinateSet* pcset = load(i); ofile << pcset->size() << endl; ofile << "generated by s_coordump" << endl; for(size_t j = 0; j < pcset->size(); ++j) { ofile << j << " " << pcset->c1[j] << " " << pcset->c2[j] << " " << pcset->c3[j] << endl; } delete pcset; } ofile.close(); }