Janus 2.0.0
High-performance C++20 dual-mode numerical framework
Loading...
Searching...
No Matches
janus::ExtrapolationConfig Struct Reference

Configuration for extrapolation behavior. More...

#include <Interpolate.hpp>

Static Public Member Functions

static ExtrapolationConfig clamp ()
 Factory: create clamp config (default, safe).
static ExtrapolationConfig linear (std::optional< double > lower=std::nullopt, std::optional< double > upper=std::nullopt)
 Factory: create linear extrapolation config with optional bounds.

Public Attributes

ExtrapolationMode mode = ExtrapolationMode::Clamp
std::optional< double > lower_bound = std::nullopt
 Safety bounds applied to output values (nullopt = unbounded).
std::optional< double > upper_bound = std::nullopt

Detailed Description

Configuration for extrapolation behavior.

Use the factory methods for convenient construction: ExtrapolationConfig::clamp() - Safe clamping (default) ExtrapolationConfig::linear() - Linear extrapolation, unbounded ExtrapolationConfig::linear(-10, 100) - Linear with output bounds

Member Function Documentation

◆ clamp()

ExtrapolationConfig janus::ExtrapolationConfig::clamp ( )
inlinestatic

Factory: create clamp config (default, safe).

Examples
/home/runner/work/janus/janus/include/janus/math/Interpolate.hpp.

◆ linear()

ExtrapolationConfig janus::ExtrapolationConfig::linear ( std::optional< double > lower = std::nullopt,
std::optional< double > upper = std::nullopt )
inlinestatic

Factory: create linear extrapolation config with optional bounds.

Examples
/home/runner/work/janus/janus/include/janus/math/Interpolate.hpp.

Member Data Documentation

◆ lower_bound

std::optional<double> janus::ExtrapolationConfig::lower_bound = std::nullopt

Safety bounds applied to output values (nullopt = unbounded).

Examples
/home/runner/work/janus/janus/include/janus/math/Interpolate.hpp.

◆ mode

◆ upper_bound

std::optional<double> janus::ExtrapolationConfig::upper_bound = std::nullopt

The documentation for this struct was generated from the following file: