MCPcopy Create free account
hub / github.com/colmap/colmap / VectorToCSV

Function VectorToCSV

src/colmap/util/misc.h:93–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91
92template <typename T>
93std::string VectorToCSV(const std::vector<T>& values) {
94 if (values.empty()) {
95 return "";
96 }
97
98 std::ostringstream stream;
99 stream.imbue(std::locale::classic());
100 for (const T& value : values) {
101 stream << value << ", ";
102 }
103 std::string buf = stream.str();
104 buf.resize(buf.size() - 2);
105 return buf;
106}
107
108template <typename T>
109std::vector<T> CSVToVector(const std::string& csv) {

Callers 3

ParamsToStringMethod · 0.85
ReloadMethod · 0.85
itemChangedMethod · 0.85

Calls 2

emptyMethod · 0.80
sizeMethod · 0.80

Tested by

no test coverage detected