Loading...
Searching...
No Matches
terra::io::detail Namespace Reference

Functions

std::vector< std::string > split_flexible (const std::string &line)
 Split a line on any combination of spaces, tabs, and commas.
 
void flat_to_grid (int k, const GridLayout2D &layout, int &ix, int &iy)
 Given a flat index k, return (ix, iy) according to the layout strides.
 

Function Documentation

◆ flat_to_grid()

void terra::io::detail::flat_to_grid ( int  k,
const GridLayout2D layout,
int &  ix,
int &  iy 
)
inline

Given a flat index k, return (ix, iy) according to the layout strides.

Requires that exactly one of layout.stride_x / layout.stride_y equals 1.

◆ split_flexible()

std::vector< std::string > terra::io::detail::split_flexible ( const std::string &  line)
inline

Split a line on any combination of spaces, tabs, and commas.

Consecutive delimiters are collapsed (empty tokens are ignored), so both "1.0, 2.0, 3.0" and "1.0 2.0 3.0" (and "1.0 ,2.0, 3.0") produce the same three-token result.