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

#include "pr-flt-fmt.h"

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 ()=default
 
int exponent_width () const
 
float_formatexponent_width (int w)
 
float_formatfixed ()
 
int format () const
 
std::ios::fmtflags format_flags () const
 
float_formatgeneral ()
 
bool is_fixed () const
 
bool is_general () const
 
bool is_lowercase () const
 
bool is_scientific () const
 
bool is_uppercase () const
 
float_formatlowercase ()
 
float_formatoperator= (const float_format &)=default
 
int precision () const
 
float_formatprecision (int p)
 
float_formatscientific ()
 
bool show_trailing_zeros () const
 
float_formattrailing_zeros (bool tz=true)
 
float_formatuppercase ()
 
int width () const
 
float_formatwidth (int w)
 

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 53 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 56 of file pr-flt-fmt.h.

◆ float_format() [3/3]

float_format::float_format ( const float_format )
default

◆ ~float_format()

float_format::~float_format ( )
default

Member Function Documentation

◆ exponent_width() [1/2]

int float_format::exponent_width ( ) const
inline

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

◆ exponent_width() [2/2]

float_format& float_format::exponent_width ( int  w)
inline

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

References Faddeeva::w().

◆ fixed()

float_format& float_format::fixed ( )
inline

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

◆ format()

int float_format::format ( ) const
inline

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

◆ format_flags()

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

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

◆ general()

float_format& float_format::general ( )
inline

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

◆ is_fixed()

bool float_format::is_fixed ( ) const
inline

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

◆ is_general()

bool float_format::is_general ( ) const
inline

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

◆ is_lowercase()

bool float_format::is_lowercase ( ) const
inline

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

◆ is_scientific()

bool float_format::is_scientific ( ) const
inline

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

◆ is_uppercase()

bool float_format::is_uppercase ( ) const
inline

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

◆ lowercase()

float_format& float_format::lowercase ( )
inline

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

◆ operator=()

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

◆ precision() [1/2]

int float_format::precision ( ) const
inline

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

◆ precision() [2/2]

float_format& float_format::precision ( int  p)
inline

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

◆ scientific()

float_format& float_format::scientific ( )
inline

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

◆ show_trailing_zeros()

bool float_format::show_trailing_zeros ( ) const
inline

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

◆ trailing_zeros()

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

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

◆ uppercase()

float_format& float_format::uppercase ( )
inline

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

◆ width() [1/2]

int float_format::width ( ) const
inline

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

◆ width() [2/2]

float_format& float_format::width ( int  w)
inline

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

References Faddeeva::w().

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.


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