19 width_(
Format::defaultWidth()),
20 precision_(
Format::defaultPrecision()),
27 width_(
Format::defaultWidth()),
28 precision_(
Format::defaultPrecision()),
36 precision_(
Format::defaultPrecision()),
41 Dbl::Dbl(
double value,
int width,
int precision,
bool isFixed)
44 precision_(precision),
64 {
return precision_; }
88 if (
object.isFixed_) {
89 out.setf(std::ios::fixed, std::ios::floatfield);
91 out.setf(std::ios::scientific, std::ios::floatfield);
93 out.width(
object.width_);
94 out.precision(
object.precision_);
Wrapper for a double precision number, for formatted ostream output.
Dbl()
Default constructor.
double value()
Get value of associated double.
int width()
Get field width.
void setValue(double value)
Set value of associated double.
void setPrecision(int precision)
Set output floating point precision.
int precision()
Get floating point precision.
void setWidth(int width)
Set output field width.
Utility classes for scientific computation.
std::istream & operator>>(std::istream &in, Pair< Data > &pair)
Input a Pair from an istream.
std::ostream & operator<<(std::ostream &out, const Pair< Data > &pair)
Output a Pair to an ostream, without line breaks.