gtopt::detail namespace

Classes

struct IntCacheData
struct label_size
template<typename T T, typename Tuple Tuple>
struct lp_type_index_impl
template<typename T T, typename... Ts>
struct lp_type_index_impl<T, std::tuple<Ts...>>
class string_holder

Functions

auto build_int_cache() -> consteval IntCacheData noexcept
auto cached_int_view(std::int64_t n) -> constexpr std::optional<std::string_view> noexcept
auto create_block_array(std::span<const Block> block_array, const Stage& stage) -> constexpr auto
auto create_scenario_array(std::span<const Scenario> scenario_array, const Scene& scene, SceneIndex scene_index) -> constexpr auto
auto create_stage_array(const Phase& phase, PhaseIndex phase_index, double annual_discount_rate, std::span<const Stage> stage_array, std::span<const Block> all_blocks) -> constexpr auto
template<integral_convertible T>
auto int_to_string(const T& value) -> std::string
auto to_lower_char(char c) -> constexpr char noexcept
template<typename T, typename... Ts>
auto type_index_in() -> consteval std::size_t noexcept
template<typename SourceArrayType>
auto widen_to_double_array(const arrow::Array& chunk) -> std::shared_ptr< arrow::DoubleArray > -> auto
template<typename SourceArrayType>
auto widen_to_int32_array(const arrow::Array& chunk) -> std::shared_ptr< arrow::Int32Array > -> auto
Cast an Arrow array chunk to Int32Array, handling int8/int16/int64 conversion.

Variables

constexpr std::size_t int_buf_size
constexpr IntCacheData int_cache
constexpr std::size_t int_cache_buf_len
constexpr std::size_t int_cache_size

Function documentation

consteval IntCacheData gtopt::detail::build_int_cache() noexcept

constexpr std::optional<std::string_view> gtopt::detail::cached_int_view(std::int64_t n) noexcept

constexpr auto gtopt::detail::create_block_array(std::span<const Block> block_array, const Stage& stage)

constexpr auto gtopt::detail::create_scenario_array(std::span<const Scenario> scenario_array, const Scene& scene, SceneIndex scene_index)

constexpr auto gtopt::detail::create_stage_array(const Phase& phase, PhaseIndex phase_index, double annual_discount_rate, std::span<const Stage> stage_array, std::span<const Block> all_blocks)

template<integral_convertible T>
std::string gtopt::detail::int_to_string(const T& value)

constexpr char gtopt::detail::to_lower_char(char c) noexcept

template<typename T, typename... Ts>
consteval std::size_t gtopt::detail::type_index_in() noexcept

Returns the 0-based position of T in the pack Ts..., or sizeof...(Ts) if not found. Implemented as a consteval function (C++20) with a local bool array to avoid recursive template instantiation depth.

template<typename SourceArrayType>
auto gtopt::detail::widen_to_double_array(const arrow::Array& chunk) -> std::shared_ptr< arrow::DoubleArray >

template<typename SourceArrayType>
auto gtopt::detail::widen_to_int32_array(const arrow::Array& chunk) -> std::shared_ptr< arrow::Int32Array >

Cast an Arrow array chunk to Int32Array, handling int8/int16/int64 conversion.

Parameters
chunk The Arrow array chunk to cast
Returns A shared pointer to an Int32Array, or nullptr if the type is incompatible

Variable documentation

constexpr std::size_t gtopt::detail::int_buf_size

constexpr std::size_t gtopt::detail::int_cache_buf_len

constexpr std::size_t gtopt::detail::int_cache_size