OpenSWMM Engine  6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
TableData.cpp File Reference

File-backed I/O, cache management, validation, and multicolumn lookup for Table/TableData. More...

#include "TableData.hpp"
#include "core/FileIO.hpp"
#include "../core/DateTime.hpp"
#include "../core/ErrorCodes.hpp"
#include "../core/charconv_compat.hpp"
#include <algorithm>
#include <charconv>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <string>
Include dependency graph for TableData.cpp:

Namespaces

namespace  openswmm
 

Functions

TableValidation openswmm::validate_table (Table &tbl)
 Check table structure and derive its smallest positive x interval.
 
bool openswmm::table_open_file (Table &tbl, std::size_t boundary_rows=128)
 Open a legacy streaming table file and prepare sparse index/boundaries.
 
std::size_t openswmm::table_load_cache (Table &tbl, std::size_t start_row)
 Replace the streaming cache starting at a logical data-row offset.
 
double openswmm::table_lookup_column (Table &tbl, int col_idx, double x_query)
 Read and linearly interpolate a selected value column.
 
double openswmm::table_step_column (Table &tbl, int col_idx, double x_query)
 Read and step-hold a selected value column.
 

Detailed Description

File-backed I/O, cache management, validation, and multicolumn lookup for Table/TableData.

All value data uses flat row-major layout: y[row * num_cols + col]. This applies to in-memory storage, the sliding cache, and boundary buffers.

See also
TableData.hpp
Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
License
Apache-2.0