illumina::interop::io::table Namespace Reference
Functions | |
| template<typename T > | |
| void | read_csv_line (std::istream &in, std::vector< T > &values, const T missing=T()) |
| template<typename T > | |
| T | read_value (std::istream &in, std::string &buf, const char delim=',') |
| template<typename T > | |
| void | read_value (std::istream &in, T &dest, std::string &buf, const char delim=',') |
| template<typename I > | |
| void | read_csv (std::istream &in, I beg, I end, const char delim=',') |
| template<class T > | |
| const T & | handle_nan (const T &val) |
| float | handle_nan (const float val) |
| double | handle_nan (const double val) |
| template<typename I > | |
| void | write_csv (std::ostream &out, I beg, I end, const char eol, const size_t precision=10) |
| template<typename T > | |
| void | write_csv_line (std::ostream &out, const std::vector< T > &values, const size_t beg=0, size_t last=0) |
Function Documentation
|
inline |
Ignore non-float values
|
inline |
Ensure we get consistent NaNs
- Parameters
-
val float value
- Returns
- float value
|
inline |
Ensure we get consistent NaNs
- Parameters
-
val float value
- Returns
- float value
| void illumina::interop::io::table::read_csv | ( | std::istream & | in, |
| I | beg, | ||
| I | end, | ||
| const char | delim = ',' |
||
| ) |
Read a csv values into a preallocated buffer
- Parameters
-
in input stream beg start of the buffer end end of the buffer delim deliminator
| void illumina::interop::io::table::read_csv_line | ( | std::istream & | in, |
| std::vector< T > & | values, | ||
| const T | missing = T() |
||
| ) |
Read a vector of values from a single in a CSV file
- Parameters
-
in input stream values destination vector missing sentinel for missing values
| T illumina::interop::io::table::read_value | ( | std::istream & | in, |
| std::string & | buf, | ||
| const char | delim = ',' |
||
| ) |
Read delimited value from the input stream and cast to proper destination type
- Parameters
-
in input stream buf reusable buffer delim deliminator
- Returns
- destintion value
| void illumina::interop::io::table::read_value | ( | std::istream & | in, |
| T & | dest, | ||
| std::string & | buf, | ||
| const char | delim = ',' |
||
| ) |
Read delimited value from the input stream and cast to proper destination type
- Parameters
-
in input stream dest destination type buf reusable buffer delim deliminator
| void illumina::interop::io::table::write_csv | ( | std::ostream & | out, |
| I | beg, | ||
| I | end, | ||
| const char | eol, | ||
| const size_t | precision = 10 |
||
| ) |
Write a vector of values as a single in a CSV file
- Parameters
-
out output stream beg iterator to start of collection end iterator to end of collection eol end of line terminator character precision number of digits for floating point number
| void illumina::interop::io::table::write_csv_line | ( | std::ostream & | out, |
| const std::vector< T > & | values, | ||
| const size_t | beg = 0, |
||
| size_t | last = 0 |
||
| ) |
Write a vector of values as a single in a CSV file
- Parameters
-
out output stream values source vector of values beg start column offset last last column offset