GNU Octave  6.2.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
float_format Class Reference

#include "pr-flt-fmt.h"

Collaboration diagram for float_format:

Public Member Functions

 float_format (const float_format &)=default
 
 float_format (int w, int e, int p, int f)
 
 float_format (int w=0, int p=output_precision(), int f=0)
 
 ~float_format (void)=default
 
float_formatexponent_width (int w)
 
int exponent_width (void) const
 
float_formatfixed (void)
 
int format (void) const
 
std::ios::fmtflags format_flags (void) const
 
float_formatgeneral (void)
 
bool is_fixed (void) const
 
bool is_general (void) const
 
bool is_lowercase (void) const
 
bool is_scientific (void) const
 
bool is_uppercase (void) const
 
float_formatlowercase (void)
 
float_formatoperator= (const float_format &)=default
 
float_formatprecision (int p)
 
int precision (void) const
 
float_formatscientific (void)
 
bool show_trailing_zeros (void) const
 
float_formattrailing_zeros (bool tz=true)
 
float_formatuppercase (void)
 
float_formatwidth (int w)
 
int width (void) const
 

Private Attributes

int m_ex
 
int m_fmt
 
int m_fw
 
int m_prec
 
int m_sp
 
int m_up
 

Friends

template<typename T >
std::ostream & operator<< (std::ostream &os, const pr_engineering_float< T > &pef)
 
template<typename T >
std::ostream & operator<< (std::ostream &os, const pr_formatted_float< T > &pff)
 
template<typename T >
std::ostream & operator<< (std::ostream &os, const pr_rational_float< T > &prf)
 

Detailed Description

Definition at line 47 of file pr-flt-fmt.h.

Constructor & Destructor Documentation

◆ float_format() [1/3]

float_format::float_format ( int  w = 0,
int  p = output_precision (),
int  f = 0 
)
inline

Definition at line 52 of file pr-flt-fmt.h.

◆ float_format() [2/3]

float_format::float_format ( int  w,
int  e,
int  p,
int  f 
)
inline

Definition at line 55 of file pr-flt-fmt.h.

◆ float_format() [3/3]

float_format::float_format ( const float_format )
default

◆ ~float_format()

float_format::~float_format ( void  )
default

Member Function Documentation

◆ exponent_width() [1/2]

float_format& float_format::exponent_width ( int  w)
inline

Definition at line 106 of file pr-flt-fmt.h.

References Faddeeva::w().

◆ exponent_width() [2/2]

int float_format::exponent_width ( void  ) const
inline

Definition at line 164 of file pr-flt-fmt.h.

◆ fixed()

float_format& float_format::fixed ( void  )
inline

Definition at line 70 of file pr-flt-fmt.h.

◆ format()

int float_format::format ( void  ) const
inline

Definition at line 124 of file pr-flt-fmt.h.

◆ format_flags()

std::ios::fmtflags float_format::format_flags ( void  ) const
inline

Definition at line 119 of file pr-flt-fmt.h.

◆ general()

float_format& float_format::general ( void  )
inline

Definition at line 76 of file pr-flt-fmt.h.

◆ is_fixed()

bool float_format::is_fixed ( void  ) const
inline

Definition at line 134 of file pr-flt-fmt.h.

◆ is_general()

bool float_format::is_general ( void  ) const
inline

Definition at line 139 of file pr-flt-fmt.h.

◆ is_lowercase()

bool float_format::is_lowercase ( void  ) const
inline

Definition at line 149 of file pr-flt-fmt.h.

◆ is_scientific()

bool float_format::is_scientific ( void  ) const
inline

Definition at line 129 of file pr-flt-fmt.h.

◆ is_uppercase()

bool float_format::is_uppercase ( void  ) const
inline

Definition at line 144 of file pr-flt-fmt.h.

◆ lowercase()

float_format& float_format::lowercase ( void  )
inline

Definition at line 88 of file pr-flt-fmt.h.

◆ operator=()

float_format& float_format::operator= ( const float_format )
default

◆ precision() [1/2]

float_format& float_format::precision ( int  p)
inline

Definition at line 94 of file pr-flt-fmt.h.

◆ precision() [2/2]

int float_format::precision ( void  ) const
inline

Definition at line 154 of file pr-flt-fmt.h.

◆ scientific()

float_format& float_format::scientific ( void  )
inline

Definition at line 64 of file pr-flt-fmt.h.

◆ show_trailing_zeros()

bool float_format::show_trailing_zeros ( void  ) const
inline

Definition at line 169 of file pr-flt-fmt.h.

◆ trailing_zeros()

float_format& float_format::trailing_zeros ( bool  tz = true)
inline

Definition at line 112 of file pr-flt-fmt.h.

◆ uppercase()

float_format& float_format::uppercase ( void  )
inline

◆ width() [1/2]

float_format& float_format::width ( int  w)
inline

◆ width() [2/2]

int float_format::width ( void  ) const
inline

Definition at line 159 of file pr-flt-fmt.h.

Friends And Related Function Documentation

◆ operator<< [1/3]

template<typename T >
std::ostream& operator<< ( std::ostream &  os,
const pr_engineering_float< T > &  pef 
)
friend

Definition at line 186 of file pr-output.cc.

◆ operator<< [2/3]

template<typename T >
std::ostream& operator<< ( std::ostream &  os,
const pr_formatted_float< T > &  pff 
)
friend

Definition at line 227 of file pr-output.cc.

◆ operator<< [3/3]

template<typename T >
std::ostream& operator<< ( std::ostream &  os,
const pr_rational_float< T > &  prf 
)
friend

Definition at line 248 of file pr-output.cc.

Member Data Documentation

◆ m_ex

int float_format::m_ex
private

Definition at line 192 of file pr-flt-fmt.h.

◆ m_fmt

int float_format::m_fmt
private

Definition at line 198 of file pr-flt-fmt.h.

◆ m_fw

int float_format::m_fw
private

Definition at line 189 of file pr-flt-fmt.h.

◆ m_prec

int float_format::m_prec
private

Definition at line 195 of file pr-flt-fmt.h.

◆ m_sp

int float_format::m_sp
private

Definition at line 204 of file pr-flt-fmt.h.

◆ m_up

int float_format::m_up
private

Definition at line 201 of file pr-flt-fmt.h.


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