ArrayIndexBase struct
#include <gtopt/array_index_traits.hpp>
Derived classes
-
template<typename Type, typename Map, typename FSched, typename... Uid>struct ArrayIndexTraits
Public types
Public static variables
-
template<typename Type>static ValueKind value_kind_v
- Mirrors the int32 / double dispatch of
InputTraits::access_sched.
Public static functions
- static auto coerce_value_column(const ArrowChunkedArray& col, ValueKind kind, std::string_view cname, std::string_view fname) -> ArrowChunkedArray
-
template<typename Type, typename... Uid>static auto get_arrow_index(const SystemContext& system_context, std::string_view cname, std::string_view fname, const Id& id, auto& array_map, auto& table_map) -> auto
- static auto read_arrow_table(const SystemContext& sc, std::string_view cname, std::string_view fname) -> ArrowTable
Enum documentation
Function documentation
static ArrowChunkedArray gtopt:: ArrayIndexBase:: coerce_value_column(const ArrowChunkedArray& col,
ValueKind kind,
std::string_view cname,
std::string_view fname)
Coerce a long table's value column to the type the schedule reads, once at load time:
- integer: any integer column is widened to int32; a float/double column is accepted when every value is a whole number in int32 range (e.g. an
activeschedule written as 1.0 / 0.0). - real: float is widened and any integer column is converted to double. Any other column type, or a fractional value for an integer schedule, throws std::runtime_error naming
<cname>/<fname>, the offending row and value.