DNDSR 0.1.0.dev1+gcd065ad
Distributed Numeric Data Structure for CFV
Loading...
Searching...
No Matches
DNDS::LogSimpleDIValue Struct Reference

Storage-agnostic "either int or double" value with CSV-friendly streaming. More...

#include <CsvLog.hpp>

Public Member Functions

template<class T >
std::enable_if_t< std::is_integral_v< T >, LogSimpleDIValue & > operator= (T v)
 
template<class T >
std::enable_if_t<!std::is_integral_v< T >, LogSimpleDIValue & > operator= (T v)
 

Public Attributes

int64_t i {UnInitIndex}
 
double d {0}
 

Friends

std::ostream & operator<< (std::ostream &o, const LogSimpleDIValue &v)
 

Detailed Description

Storage-agnostic "either int or double" value with CSV-friendly streaming.

Each instance holds either an integer (i) or a double (d); the unused field is set to the UnInitIndex / UnInitReal sentinel. The assignment operator dispatches on the source type, and operator<< prints whichever field is live. Designed for columns where some rows are integer counts and others are floating residuals.

Definition at line 23 of file CsvLog.hpp.

Member Function Documentation

◆ operator=() [1/2]

template<class T >
std::enable_if_t< std::is_integral_v< T >, LogSimpleDIValue & > DNDS::LogSimpleDIValue::operator= ( v)
inline

Definition at line 29 of file CsvLog.hpp.

◆ operator=() [2/2]

template<class T >
std::enable_if_t<!std::is_integral_v< T >, LogSimpleDIValue & > DNDS::LogSimpleDIValue::operator= ( v)
inline

Definition at line 38 of file CsvLog.hpp.

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  o,
const LogSimpleDIValue v 
)
friend

Definition at line 45 of file CsvLog.hpp.

Member Data Documentation

◆ d

double DNDS::LogSimpleDIValue::d {0}

Definition at line 26 of file CsvLog.hpp.

◆ i

int64_t DNDS::LogSimpleDIValue::i {UnInitIndex}

Definition at line 25 of file CsvLog.hpp.


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