Icarus
Vehicle Simulation as a Transformable Computational Graph, built on Vulcan and Janus
Loading...
Searching...
No Matches
ScalarFormat.hpp File Reference

Scalar type formatting utilities for dual-mode compatibility. More...

#include <icarus/core/CoreTypes.hpp>
#include <iomanip>
#include <sstream>
#include <string>
Include dependency graph for ScalarFormat.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  icarus::io::ScalarFormatter< Scalar >
 Format a scalar value to string. More...
struct  icarus::io::ScalarFormatter< double >
 Specialization for double (numeric mode). More...
struct  icarus::io::ScalarFormatter< SymbolicScalar >
 Specialization for SymbolicScalar (symbolic mode). More...

Namespaces

namespace  icarus
namespace  icarus::io

Functions

template<typename Scalar>
std::string icarus::io::FormatScalar (const Scalar &value, int precision=6)
 Format a scalar value (auto-dispatch).
template<typename Scalar>
std::string icarus::io::FormatScalarFixed (const Scalar &value, int precision=6)
 Format a scalar with fixed notation.
template<typename Scalar>
std::string icarus::io::FormatScalarScientific (const Scalar &value, int precision=6)
 Format a scalar with scientific notation.
template<typename Scalar>
constexpr bool icarus::io::IsNumericScalar ()
 Check if a scalar type is numeric.
template<typename Scalar>
bool icarus::io::CanEvaluateToDouble (const Scalar &value)
 Check if a value can be safely converted to double.
template<typename Scalar>
double icarus::io::EvaluateToDouble (const Scalar &value, double default_val=0.0)
 Safely get double value if possible.

Detailed Description

Scalar type formatting utilities for dual-mode compatibility.

Part of Phase 3.5: Logger Symbolic Support Provides templated formatting that works for both double and SymbolicScalar.