GNU Octave  4.0.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Classes | Macros | Functions | Variables
pr-output.cc File Reference
#include <cfloat>
#include <cstdio>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <sstream>
#include <string>
#include "Array-util.h"
#include "CMatrix.h"
#include "Range.h"
#include "cmd-edit.h"
#include "dMatrix.h"
#include "lo-mappers.h"
#include "lo-math.h"
#include "mach-info.h"
#include "oct-cmplx.h"
#include "quit.h"
#include "str-vec.h"
#include "Cell.h"
#include "defun.h"
#include "error.h"
#include "gripes.h"
#include "oct-obj.h"
#include "oct-stream.h"
#include "pager.h"
#include "pr-output.h"
#include "sysdep.h"
#include "unwind-prot.h"
#include "utils.h"
#include "variables.h"
Include dependency graph for pr-output.cc:

Go to the source code of this file.

Classes

union  equiv
 
class  float_format
 
class  octave_print_conv< T >
 
class  octave_print_conv< octave_int8 >
 
class  octave_print_conv< octave_uint8 >
 
class  pr_engineering_float
 
class  pr_formatted_float
 
class  pr_rational_float
 

Macros

#define INSTANTIATE_ABS(T)   template /* static */ T abs (T)
 
#define PRINT_CHAR_BITS(os, c)
 
#define PRINT_CHAR_BITS_SWAPPED(os, c)
 
#define PRINT_CONV(T1, T2)
 
#define PRINT_INT_ARRAY_INTERNAL(TYPE)
 
#define PRINT_INT_SCALAR_INTERNAL(TYPE)
 
#define SPECIALIZE_UABS(T)
 

Functions

template<class T >
abs (T x)
 
template signed char abs (signed char)
 
template short abs (short)
 
template int abs (int)
 
template long abs (long)
 
template<>
unsigned char abs (unsigned char x)
 
template<>
unsigned short abs (unsigned short x)
 
template<>
unsigned int abs (unsigned int x)
 
template<>
unsigned long abs (unsigned long x)
 
template<>
unsigned long long abs (unsigned long long x)
 
static int calc_scale_exp (const int &x)
 
static int current_output_max_field_width (void)
 
static int current_output_precision (void)
 
static int engineering_exponent (const double &x)
 
OCTAVE_EXPORT octave_value_list F__compactformat__ (const octave_value_list &args, int nargout)
 
OCTAVE_EXPORT octave_value_list F__formatstring__ (const octave_value_list &, int)
 
OCTAVE_EXPORT octave_value_list Fdisp (const octave_value_list &args, int nargout)
 
OCTAVE_EXPORT octave_value_list Ffdisp (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Ffixed_point_format (const octave_value_list &args, int nargout)
 
OCTAVE_EXPORT octave_value_list Fformat (const octave_value_list &args, int)
 
static std::string format_string ("short")
 
OCTAVE_EXPORT octave_value_list Foutput_max_field_width (const octave_value_list &args, int nargout)
 
OCTAVE_EXPORT octave_value_list Foutput_precision (const octave_value_list &args, int nargout)
 
OCTAVE_EXPORT octave_value_list Fprint_empty_dimensions (const octave_value_list &args, int nargout)
 
OCTAVE_EXPORT octave_value_list Frats (const octave_value_list &args, int nargout)
 
OCTAVE_EXPORT octave_value_list Fsplit_long_rows (const octave_value_list &args, int nargout)
 
static void init_format_state (void)
 
static int num_digits (const double &x)
 
void octave_print_internal (std::ostream &, char, bool)
 
void octave_print_internal (std::ostream &os, double d, bool pr_as_read_syntax)
 
void octave_print_internal (std::ostream &os, const Matrix &m, bool pr_as_read_syntax, int extra_indent)
 
void octave_print_internal (std::ostream &os, const DiagMatrix &m, bool pr_as_read_syntax, int extra_indent)
 
void octave_print_internal (std::ostream &os, const NDArray &nda, bool pr_as_read_syntax, int extra_indent)
 
void octave_print_internal (std::ostream &os, const Complex &c, bool pr_as_read_syntax)
 
void octave_print_internal (std::ostream &os, const ComplexMatrix &cm, bool pr_as_read_syntax, int extra_indent)
 
void octave_print_internal (std::ostream &os, const ComplexDiagMatrix &cm, bool pr_as_read_syntax, int extra_indent)
 
void octave_print_internal (std::ostream &os, const PermMatrix &m, bool pr_as_read_syntax, int extra_indent)
 
void octave_print_internal (std::ostream &os, const ComplexNDArray &nda, bool pr_as_read_syntax, int extra_indent)
 
void octave_print_internal (std::ostream &os, bool d, bool pr_as_read_syntax)
 
void octave_print_internal (std::ostream &os, float d, bool pr_as_read_syntax)
 
void octave_print_internal (std::ostream &os, const FloatMatrix &m, bool pr_as_read_syntax, int extra_indent)
 
void octave_print_internal (std::ostream &os, const FloatDiagMatrix &m, bool pr_as_read_syntax, int extra_indent)
 
void octave_print_internal (std::ostream &os, const FloatNDArray &nda, bool pr_as_read_syntax, int extra_indent)
 
void octave_print_internal (std::ostream &os, const FloatComplex &c, bool pr_as_read_syntax)
 
void octave_print_internal (std::ostream &os, const FloatComplexMatrix &cm, bool pr_as_read_syntax, int extra_indent)
 
void octave_print_internal (std::ostream &os, const FloatComplexDiagMatrix &cm, bool pr_as_read_syntax, int extra_indent)
 
void octave_print_internal (std::ostream &os, const FloatComplexNDArray &nda, bool pr_as_read_syntax, int extra_indent)
 
void octave_print_internal (std::ostream &os, const Range &r, bool pr_as_read_syntax, int extra_indent)
 
void octave_print_internal (std::ostream &os, const boolMatrix &bm, bool pr_as_read_syntax, int extra_indent)
 
void octave_print_internal (std::ostream &os, const boolNDArray &nda, bool pr_as_read_syntax, int extra_indent)
 
void octave_print_internal (std::ostream &os, const charMatrix &chm, bool pr_as_read_syntax, int, bool pr_as_string)
 
void octave_print_internal (std::ostream &os, const charNDArray &nda, bool pr_as_read_syntax, int extra_indent, bool pr_as_string)
 
void octave_print_internal (std::ostream &os, const std::string &s, bool pr_as_read_syntax, int extra_indent)
 
void octave_print_internal (std::ostream &os, const Array< std::string > &nda, bool pr_as_read_syntax, int)
 
OCTINTERP_API void octave_print_internal (std::ostream &os, const octave_int< int8_t > &val, bool dummy)
 
OCTINTERP_API void octave_print_internal (std::ostream &os, const octave_int< uint8_t > &val, bool dummy)
 
OCTINTERP_API void octave_print_internal (std::ostream &os, const octave_int< int16_t > &val, bool dummy)
 
OCTINTERP_API void octave_print_internal (std::ostream &os, const octave_int< uint16_t > &val, bool dummy)
 
OCTINTERP_API void octave_print_internal (std::ostream &os, const octave_int< int32_t > &val, bool dummy)
 
OCTINTERP_API void octave_print_internal (std::ostream &os, const octave_int< uint32_t > &val, bool dummy)
 
OCTINTERP_API void octave_print_internal (std::ostream &os, const octave_int< int64_t > &val, bool dummy)
 
OCTINTERP_API void octave_print_internal (std::ostream &os, const octave_int< uint64_t > &val, bool dummy)
 
OCTINTERP_API void octave_print_internal (std::ostream &os, const intNDArray< octave_int8 > &nda, bool pr_as_read_syntax, int extra_indent)
 
OCTINTERP_API void octave_print_internal (std::ostream &os, const intNDArray< octave_uint8 > &nda, bool pr_as_read_syntax, int extra_indent)
 
OCTINTERP_API void octave_print_internal (std::ostream &os, const intNDArray< octave_int16 > &nda, bool pr_as_read_syntax, int extra_indent)
 
OCTINTERP_API void octave_print_internal (std::ostream &os, const intNDArray< octave_uint16 > &nda, bool pr_as_read_syntax, int extra_indent)
 
OCTINTERP_API void octave_print_internal (std::ostream &os, const intNDArray< octave_int32 > &nda, bool pr_as_read_syntax, int extra_indent)
 
OCTINTERP_API void octave_print_internal (std::ostream &os, const intNDArray< octave_uint32 > &nda, bool pr_as_read_syntax, int extra_indent)
 
OCTINTERP_API void octave_print_internal (std::ostream &os, const intNDArray< octave_int64 > &nda, bool pr_as_read_syntax, int extra_indent)
 
OCTINTERP_API void octave_print_internal (std::ostream &os, const intNDArray< octave_uint64 > &nda, bool pr_as_read_syntax, int extra_indent)
 
void octave_print_internal (std::ostream &, const Cell &, bool, int, bool)
 
void octave_print_internal (std::ostream &, const octave_value &, bool)
 
template<class T >
void octave_print_internal_template (std::ostream &os, const octave_int< T > &val, bool)
 
template<class T >
void octave_print_internal_template (std::ostream &os, const intNDArray< T > &nda, bool pr_as_read_syntax, int extra_indent)
 
std::ostream & operator<< (std::ostream &os, const pr_engineering_float &pef)
 
std::ostream & operator<< (std::ostream &os, const pr_formatted_float &pff)
 
std::ostream & operator<< (std::ostream &os, const pr_rational_float &prf)
 
static void pr_any_float (const float_format *fmt, std::ostream &os, double d, int fw=0)
 
static void pr_col_num_header (std::ostream &os, octave_idx_type total_width, int max_width, octave_idx_type lim, octave_idx_type col, int extra_indent)
 
static void pr_complex (std::ostream &os, const Complex &c, int r_fw=0, int i_fw=0, double scale=1.0)
 
static void pr_float (std::ostream &os, double d, int fw=0, double scale=1.0)
 
static void pr_imag_float (std::ostream &os, double d, int fw=0)
 
template<class T >
void pr_int (std::ostream &os, const T &d, int fw=0)
 
template void pr_int (std::ostream &, const octave_int8 &, int)
 
template void pr_int (std::ostream &, const octave_int16 &, int)
 
template void pr_int (std::ostream &, const octave_int32 &, int)
 
template void pr_int (std::ostream &, const octave_int64 &, int)
 
template void pr_int (std::ostream &, const octave_uint8 &, int)
 
template void pr_int (std::ostream &, const octave_uint16 &, int)
 
template void pr_int (std::ostream &, const octave_uint32 &, int)
 
template void pr_int (std::ostream &, const octave_uint64 &, int)
 
static double pr_max_internal (const Matrix &m)
 
static double pr_min_internal (const Matrix &m)
 
template<class T >
void pr_plus_format (std::ostream &os, const T &val)
 
template<>
void pr_plus_format (std::ostream &os, const Complex &c)
 
static void pr_scale_header (std::ostream &os, double scale)
 
static void print_empty_matrix (std::ostream &os, octave_idx_type nr, octave_idx_type nc, bool pr_as_read_syntax)
 
static void print_empty_nd_array (std::ostream &os, const dim_vector &dims, bool pr_as_read_syntax)
 
template<typename NDA_T , typename ELT_T , typename MAT_T >
void print_nd_array (std::ostream &os, const NDA_T &nda, bool pr_as_read_syntax)
 
static std::string rational_approx (double val, int len)
 
static void set_complex_format (int x_max, int x_min, int r_x, bool inf_or_nan, int int_only, int &r_fw, int &i_fw)
 
static void set_complex_matrix_format (int x_max, int x_min, int r_x_max, int r_x_min, bool inf_or_nan, int int_or_inf_or_nan, int &r_fw, int &i_fw)
 
static void set_format (double d, int &fw)
 
static void set_format (double d)
 
static void set_format (const Matrix &m, int &fw, double &scale)
 
static void set_format (const Matrix &m)
 
static void set_format (const Complex &c, int &r_fw, int &i_fw)
 
static void set_format (const Complex &c)
 
static void set_format (const ComplexMatrix &cm, int &r_fw, int &i_fw, double &scale)
 
static void set_format (const ComplexMatrix &cm)
 
static void set_format (const Range &r, int &fw, double &scale)
 
static void set_format (const Range &r)
 
static void set_format_style (int argc, const string_vector &argv)
 
static void set_output_prec_and_fw (int prec, int fw)
 
static void set_range_format (int x_max, int x_min, int all_ints, int &fw)
 
static void set_real_format (int digits, bool inf_or_nan, bool int_only, int &fw)
 
static void set_real_matrix_format (int x_max, int x_min, bool inf_or_nan, int int_or_inf_or_nan, int &fw)
 

Variables

static bool bank_format = false
 
static int bit_format = 0
 
static float_formatcurr_imag_fmt = 0
 
static float_formatcurr_real_fmt = 0
 
static bool free_format = false
 
static int hex_format = 0
 
static bool plus_format = false
 
static std::string plus_format_chars = "+- "
 
static bool print_big_e = false
 
static bool print_e = false
 
static bool print_eng = false
 
static bool print_g = false
 
static bool rat_format = false
 
static int rat_string_len = -1
 
bool Vcompact_format = false
 
static bool Vfixed_point_format = false
 
static int Voutput_max_field_width = 10
 
static int Voutput_precision = 5
 
bool Vprint_empty_dimensions = true
 
static bool Vsplit_long_rows = true
 

Macro Definition Documentation

#define INSTANTIATE_ABS (   T)    template /* static */ T abs (T)

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

#define PRINT_CHAR_BITS (   os,
 
)
Value:
do \
{ \
unsigned char ctmp = c; \
char stmp[9]; \
stmp[0] = (ctmp & 0x80) ? '1' : '0'; \
stmp[1] = (ctmp & 0x40) ? '1' : '0'; \
stmp[2] = (ctmp & 0x20) ? '1' : '0'; \
stmp[3] = (ctmp & 0x10) ? '1' : '0'; \
stmp[4] = (ctmp & 0x08) ? '1' : '0'; \
stmp[5] = (ctmp & 0x04) ? '1' : '0'; \
stmp[6] = (ctmp & 0x02) ? '1' : '0'; \
stmp[7] = (ctmp & 0x01) ? '1' : '0'; \
stmp[8] = '\0'; \
os << stmp; \
} \
while (0)

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

Referenced by pr_any_float(), and pr_int().

#define PRINT_CHAR_BITS_SWAPPED (   os,
 
)
Value:
do \
{ \
unsigned char ctmp = c; \
char stmp[9]; \
stmp[0] = (ctmp & 0x01) ? '1' : '0'; \
stmp[1] = (ctmp & 0x02) ? '1' : '0'; \
stmp[2] = (ctmp & 0x04) ? '1' : '0'; \
stmp[3] = (ctmp & 0x08) ? '1' : '0'; \
stmp[4] = (ctmp & 0x10) ? '1' : '0'; \
stmp[5] = (ctmp & 0x20) ? '1' : '0'; \
stmp[6] = (ctmp & 0x40) ? '1' : '0'; \
stmp[7] = (ctmp & 0x80) ? '1' : '0'; \
stmp[8] = '\0'; \
os << stmp; \
} \
while (0)

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

Referenced by pr_any_float(), and pr_int().

#define PRINT_CONV (   T1,
  T2 
)
Value:
template <> \
class \
octave_print_conv<T1> \
{ \
public: \
typedef T2 print_conv_type; \
}

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

#define PRINT_INT_ARRAY_INTERNAL (   TYPE)
Value:
octave_print_internal (std::ostream& os, const intNDArray<TYPE>& nda, \
bool pr_as_read_syntax, int extra_indent) \
{ \
octave_print_internal_template (os, nda, pr_as_read_syntax, extra_indent); \
}
void octave_print_internal_template(std::ostream &os, const octave_int< T > &val, bool)
Definition: pr-output.cc:3116
#define OCTINTERP_API
Definition: mexproto.h:66
void octave_print_internal(std::ostream &, char, bool)
Definition: pr-output.cc:1715

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

#define PRINT_INT_SCALAR_INTERNAL (   TYPE)
Value:
octave_print_internal (std::ostream& os, const octave_int<TYPE>& val, bool dummy) \
{ \
}
void octave_print_internal_template(std::ostream &os, const octave_int< T > &val, bool)
Definition: pr-output.cc:3116
#define OCTINTERP_API
Definition: mexproto.h:66
void octave_print_internal(std::ostream &, char, bool)
Definition: pr-output.cc:1715

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

#define SPECIALIZE_UABS (   T)
Value:
template <> \
/* static */ inline unsigned T \
abs (unsigned T x) \
{ \
return x; \
}
T abs(T x)
Definition: pr-output.cc:3062
F77_RET_T const double * x

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

Function Documentation

template<class T >
T abs ( x)
inline

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

References x.

Referenced by SparseComplexMatrix::abs(), norm_accumulator_p< R >::accum(), norm_accumulator_mp< R >::accum(), norm_accumulator_2< R >::accum(), norm_accumulator_1< R >::accum(), norm_accumulator_inf< R >::accum(), norm_accumulator_minf< R >::accum(), alngam(), alnrel(), asinh(), atanh(), biry(), SparseComplexMatrix::bsolve(), cacon(), cairy(), casyi(), cbesh(), cbesi(), cbesj(), cbesy(), cbiry(), cbknu(), cbrt(), cbrtf(), cbuni(), cbunk(), ComplexMatrix::column_max(), FloatComplexMatrix::column_max(), ComplexMatrix::column_min(), FloatComplexMatrix::column_min(), csevl(), cuchk(), cunhj(), cuni1(), cuni2(), cunik(), cunk1(), cunk2(), cuoik(), d9gmit(), d9lgic(), d9lgit(), dasinh(), datanh(), dcnstr(), dcsevl(), ddaini(), ddajac(), ddanrm(), ddaspk(), ddasrt(), ddassl(), ddastp(), ddawts(), ddstp(), ddwnrm(), derf(), derfc(), dgamit(), dgamlm(), dgamma(), dgamr(), dheqr(), Sparse< T >::diag(), Array< T >::diag(), SparseComplexMatrix::dinverse(), dlngam(), dlnrel(), dmatd(), dpchim(), SparseComplexMatrix::dsolve(), dspigm(), EigsComplexNonSymmetricFunc(), EigsRealNonSymmetricFunc(), EigsRealSymmetricFunc(), elem_dual_p(), erf(), erfc(), exchqz(), expm1(), extended_gcd(), gamit(), gamlim(), gamln(), gamma(), gamr(), genmul(), axes::properties::get_axis_limits(), higham_subp(), ichol_t(), ignbin(), ignpoi(), ilu_crout(), ilu_tp(), initds(), inits(), install_mappers_fcns(), jcobi(), SparseComplexMatrix::ltsolve(), LuAminusSigmaB(), magform(), octave_sparse_complex_matrix::map(), octave_sparse_matrix::map(), octave_float_complex_matrix::map(), octave_complex_matrix::map(), octave_float_complex::map(), octave_complex::map(), octave_float_matrix::map(), octave_matrix::map(), octave_scalar::map(), octave_float_scalar::map(), ComplexRowVector::max(), FloatComplexRowVector::max(), SparseComplexMatrix::max(), ComplexColumnVector::max(), FloatComplexColumnVector::max(), ComplexRowVector::min(), FloatComplexRowVector::min(), SparseComplexMatrix::min(), ComplexColumnVector::min(), FloatComplexColumnVector::min(), min(), null(), octave_print_internal_template(), pchim(), DiagMatrix::pseudo_inverse(), FloatDiagMatrix::pseudo_inverse(), ComplexDiagMatrix::pseudo_inverse(), FloatComplexDiagMatrix::pseudo_inverse(), qagie(), qagpe(), qelg(), qk15i(), qk21(), qp(), r9gmit(), r9lgic(), r9lgit(), ComplexDiagMatrix::rcond(), FloatComplexDiagMatrix::rcond(), ComplexMatrix::row_max(), FloatComplexMatrix::row_max(), ComplexMatrix::row_min(), FloatComplexMatrix::row_min(), TerminalView::scrollImage(), select_dig(), sewset(), sexchqz(), sgamma(), signum(), simple_gcd(), sintdy(), slsode(), sprepj(), ssolsy(), sstode(), SparseComplexMatrix::tinverse(), axes::properties::update_axes_layout(), axes::properties::update_camera(), figure::properties::update_papersize(), axes::properties::update_ticklength(), SparseComplexMatrix::utsolve(), xabs(), xclange(), xermsg(), xgammainc(), xlog2(), xmax(), xmin(), xmod(), xrem(), xsetf(), xsgammainc(), xzlange(), zbesi(), zbesj(), and zbesy().

template signed char abs ( signed  char)
template short abs ( short  )
template int abs ( int  )
template long long abs ( long  )
template<>
unsigned char abs ( unsigned char  x)
inline

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

template<>
unsigned short abs ( unsigned short  x)
inline

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

template<>
unsigned int abs ( unsigned int  x)
inline

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

template<>
unsigned long abs ( unsigned long  x)
inline

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

template<>
unsigned long long abs ( unsigned long long  x)
inline

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

static int calc_scale_exp ( const int x)
static

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

References print_eng, and x.

Referenced by set_format().

static int current_output_max_field_width ( void  )
static

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

References Voutput_max_field_width.

static int current_output_precision ( void  )
static

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

References Voutput_precision.

static int engineering_exponent ( const double x)
static

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

References floor(), and x.

Referenced by pr_engineering_float::exponent(), and num_digits().

OCTAVE_EXPORT octave_value_list F__compactformat__ ( const octave_value_list args,
int  nargout 
)
OCTAVE_EXPORT octave_value_list F__formatstring__ ( const octave_value_list ,
int   
)

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

References format_string(), and ovl().

Referenced by root_figure::properties::get_format().

OCTAVE_EXPORT octave_value_list Fdisp ( const octave_value_list args,
int  nargout 
)
OCTAVE_EXPORT octave_value_list Ffdisp ( const octave_value_list args,
int   
)
OCTAVE_EXPORT octave_value_list Ffixed_point_format ( const octave_value_list args,
int  nargout 
)

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

References SET_INTERNAL_VARIABLE.

Referenced by maximum_braindamage().

OCTAVE_EXPORT octave_value_list Fformat ( const octave_value_list args,
int   
)
static std::string format_string ( "short"  )
static
OCTAVE_EXPORT octave_value_list Foutput_max_field_width ( const octave_value_list args,
int  nargout 
)

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

References max(), and SET_INTERNAL_VARIABLE_WITH_LIMITS.

OCTAVE_EXPORT octave_value_list Foutput_precision ( const octave_value_list args,
int  nargout 
)

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

References max(), and SET_INTERNAL_VARIABLE_WITH_LIMITS.

OCTAVE_EXPORT octave_value_list Fprint_empty_dimensions ( const octave_value_list args,
int  nargout 
)

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

References SET_INTERNAL_VARIABLE.

Referenced by maximum_braindamage().

OCTAVE_EXPORT octave_value_list Frats ( const octave_value_list args,
int  nargout 
)
OCTAVE_EXPORT octave_value_list Fsplit_long_rows ( const octave_value_list args,
int  nargout 
)

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

References SET_INTERNAL_VARIABLE.

static void init_format_state ( void  )
static
static int num_digits ( const double x)
static

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

References engineering_exponent(), floor(), and print_eng.

Referenced by set_format().

void octave_print_internal ( std::ostream &  ,
char  ,
bool   
)
void octave_print_internal ( std::ostream &  os,
double  d,
bool  pr_as_read_syntax 
)

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

References d, free_format, plus_format, pr_float(), pr_plus_format(), and set_format().

void octave_print_internal ( std::ostream &  os,
const Matrix m,
bool  pr_as_read_syntax,
int  extra_indent 
)
void octave_print_internal ( std::ostream &  os,
const DiagMatrix m,
bool  pr_as_read_syntax,
int  extra_indent 
)
void octave_print_internal ( std::ostream &  os,
const NDArray nda,
bool  pr_as_read_syntax,
int  extra_indent 
)

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

References Array< T >::ndims(), and octave_print_internal().

void octave_print_internal ( std::ostream &  os,
const Complex c,
bool  pr_as_read_syntax 
)

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

References free_format, plus_format, pr_complex(), pr_plus_format(), and set_format().

void octave_print_internal ( std::ostream &  os,
const ComplexMatrix cm,
bool  pr_as_read_syntax,
int  extra_indent 
)
void octave_print_internal ( std::ostream &  os,
const ComplexDiagMatrix cm,
bool  pr_as_read_syntax,
int  extra_indent 
)
void octave_print_internal ( std::ostream &  os,
const PermMatrix m,
bool  pr_as_read_syntax,
int  extra_indent 
)
void octave_print_internal ( std::ostream &  os,
const ComplexNDArray nda,
bool  pr_as_read_syntax,
int  extra_indent 
)

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

References Array< T >::ndims(), and octave_print_internal().

void octave_print_internal ( std::ostream &  os,
bool  d,
bool  pr_as_read_syntax 
)

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

References octave_print_internal().

void octave_print_internal ( std::ostream &  os,
float  d,
bool  pr_as_read_syntax 
)

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

References octave_print_internal().

void octave_print_internal ( std::ostream &  os,
const FloatMatrix m,
bool  pr_as_read_syntax,
int  extra_indent 
)

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

References octave_print_internal().

void octave_print_internal ( std::ostream &  os,
const FloatDiagMatrix m,
bool  pr_as_read_syntax,
int  extra_indent 
)

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

References octave_print_internal().

void octave_print_internal ( std::ostream &  os,
const FloatNDArray nda,
bool  pr_as_read_syntax,
int  extra_indent 
)

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

References octave_print_internal().

void octave_print_internal ( std::ostream &  os,
const FloatComplex c,
bool  pr_as_read_syntax 
)

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

References octave_print_internal().

void octave_print_internal ( std::ostream &  os,
const FloatComplexMatrix cm,
bool  pr_as_read_syntax,
int  extra_indent 
)

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

References octave_print_internal().

void octave_print_internal ( std::ostream &  os,
const FloatComplexDiagMatrix cm,
bool  pr_as_read_syntax,
int  extra_indent 
)

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

References octave_print_internal().

void octave_print_internal ( std::ostream &  os,
const FloatComplexNDArray nda,
bool  pr_as_read_syntax,
int  extra_indent 
)

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

References octave_print_internal().

void octave_print_internal ( std::ostream &  os,
const Range r,
bool  pr_as_read_syntax,
int  extra_indent 
)
void octave_print_internal ( std::ostream &  os,
const boolMatrix bm,
bool  pr_as_read_syntax,
int  extra_indent 
)

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

References octave_print_internal().

void octave_print_internal ( std::ostream &  os,
const boolNDArray nda,
bool  pr_as_read_syntax,
int  extra_indent 
)

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

References Array< T >::ndims(), octave_print_internal(), and print_nd_array().

void octave_print_internal ( std::ostream &  os,
const charMatrix chm,
bool  pr_as_read_syntax,
int  ,
bool  pr_as_string 
)
void octave_print_internal ( std::ostream &  os,
const charNDArray nda,
bool  pr_as_read_syntax,
int  extra_indent,
bool  pr_as_string 
)

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

References Array< T >::ndims(), and octave_print_internal().

void octave_print_internal ( std::ostream &  os,
const std::string &  s,
bool  pr_as_read_syntax,
int  extra_indent 
)

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

References octave_print_internal().

void octave_print_internal ( std::ostream &  os,
const Array< std::string > &  nda,
bool  pr_as_read_syntax,
int   
)
OCTINTERP_API void octave_print_internal ( std::ostream &  os,
const octave_int< int8_t > &  val,
bool  dummy 
)

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

OCTINTERP_API void octave_print_internal ( std::ostream &  os,
const octave_int< uint8_t > &  val,
bool  dummy 
)

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

OCTINTERP_API void octave_print_internal ( std::ostream &  os,
const octave_int< int16_t > &  val,
bool  dummy 
)

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

OCTINTERP_API void octave_print_internal ( std::ostream &  os,
const octave_int< uint16_t > &  val,
bool  dummy 
)

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

OCTINTERP_API void octave_print_internal ( std::ostream &  os,
const octave_int< int32_t > &  val,
bool  dummy 
)

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

OCTINTERP_API void octave_print_internal ( std::ostream &  os,
const octave_int< uint32_t > &  val,
bool  dummy 
)

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

OCTINTERP_API void octave_print_internal ( std::ostream &  os,
const octave_int< int64_t > &  val,
bool  dummy 
)

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

OCTINTERP_API void octave_print_internal ( std::ostream &  os,
const octave_int< uint64_t > &  val,
bool  dummy 
)

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

OCTINTERP_API void octave_print_internal ( std::ostream &  os,
const intNDArray< octave_int8 > &  nda,
bool  pr_as_read_syntax,
int  extra_indent 
)

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

OCTINTERP_API void octave_print_internal ( std::ostream &  os,
const intNDArray< octave_uint8 > &  nda,
bool  pr_as_read_syntax,
int  extra_indent 
)

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

OCTINTERP_API void octave_print_internal ( std::ostream &  os,
const intNDArray< octave_int16 > &  nda,
bool  pr_as_read_syntax,
int  extra_indent 
)

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

OCTINTERP_API void octave_print_internal ( std::ostream &  os,
const intNDArray< octave_uint16 > &  nda,
bool  pr_as_read_syntax,
int  extra_indent 
)

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

OCTINTERP_API void octave_print_internal ( std::ostream &  os,
const intNDArray< octave_int32 > &  nda,
bool  pr_as_read_syntax,
int  extra_indent 
)

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

OCTINTERP_API void octave_print_internal ( std::ostream &  os,
const intNDArray< octave_uint32 > &  nda,
bool  pr_as_read_syntax,
int  extra_indent 
)

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

OCTINTERP_API void octave_print_internal ( std::ostream &  os,
const intNDArray< octave_int64 > &  nda,
bool  pr_as_read_syntax,
int  extra_indent 
)

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

OCTINTERP_API void octave_print_internal ( std::ostream &  os,
const intNDArray< octave_uint64 > &  nda,
bool  pr_as_read_syntax,
int  extra_indent 
)

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

void octave_print_internal ( std::ostream &  ,
const Cell ,
bool  ,
int  ,
bool   
)

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

References panic_impossible.

void octave_print_internal ( std::ostream &  ,
const octave_value ,
bool   
)

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

References panic_impossible.

template<class T >
void octave_print_internal_template ( std::ostream &  os,
const octave_int< T > &  val,
bool   
)

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

References free_format, plus_format, pr_int(), and pr_plus_format().

Referenced by octave_print_internal_template().

template<class T >
void octave_print_internal_template ( std::ostream &  os,
const intNDArray< T > &  nda,
bool  pr_as_read_syntax,
int  extra_indent 
)
inline
std::ostream& operator<< ( std::ostream &  os,
const pr_engineering_float pef 
)
std::ostream& operator<< ( std::ostream &  os,
const pr_formatted_float pff 
)
std::ostream& operator<< ( std::ostream &  os,
const pr_rational_float prf 
)
static void pr_any_float ( const float_format fmt,
std::ostream &  os,
double  d,
int  fw = 0 
)
static
static void pr_col_num_header ( std::ostream &  os,
octave_idx_type  total_width,
int  max_width,
octave_idx_type  lim,
octave_idx_type  col,
int  extra_indent 
)
static

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

References Vcompact_format, and Vsplit_long_rows.

Referenced by octave_print_internal(), and octave_print_internal_template().

static void pr_complex ( std::ostream &  os,
const Complex c,
int  r_fw = 0,
int  i_fw = 0,
double  scale = 1.0 
)
static
static void pr_float ( std::ostream &  os,
double  d,
int  fw = 0,
double  scale = 1.0 
)
inlinestatic

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

References pr_any_float(), print_g, scale(), and Vfixed_point_format.

Referenced by octave_print_internal(), and pr_complex().

static void pr_imag_float ( std::ostream &  os,
double  d,
int  fw = 0 
)
inlinestatic

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

References pr_any_float().

Referenced by pr_complex().

template<class T >
void pr_int ( std::ostream &  os,
const T &  d,
int  fw = 0 
)
inline
template void pr_int ( std::ostream &  ,
const octave_int8 ,
int   
)
template void pr_int ( std::ostream &  ,
const octave_int16 ,
int   
)
template void pr_int ( std::ostream &  ,
const octave_int32 ,
int   
)
template void pr_int ( std::ostream &  ,
const octave_int64 ,
int   
)
template void pr_int ( std::ostream &  ,
const octave_uint8 ,
int   
)
template void pr_int ( std::ostream &  ,
const octave_uint16 ,
int   
)
template void pr_int ( std::ostream &  ,
const octave_uint32 ,
int   
)
template void pr_int ( std::ostream &  ,
const octave_uint64 ,
int   
)
static double pr_max_internal ( const Matrix m)
static

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

References Array< T >::columns(), max(), Array< T >::rows(), pr_rational_float::val, and xfinite().

Referenced by set_format().

static double pr_min_internal ( const Matrix m)
static

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

References Array< T >::columns(), max(), Array< T >::rows(), pr_rational_float::val, and xfinite().

Referenced by set_format().

template<class T >
void pr_plus_format ( std::ostream &  os,
const T &  val 
)
inline
template<>
void pr_plus_format ( std::ostream &  os,
const Complex c 
)
inline

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

References pr_plus_format().

static void pr_scale_header ( std::ostream &  os,
double  scale 
)
static

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

References left, print_g, Vcompact_format, and Vfixed_point_format.

Referenced by octave_print_internal().

static void print_empty_matrix ( std::ostream &  os,
octave_idx_type  nr,
octave_idx_type  nc,
bool  pr_as_read_syntax 
)
static

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

References Vprint_empty_dimensions.

Referenced by octave_print_internal().

static void print_empty_nd_array ( std::ostream &  os,
const dim_vector dims,
bool  pr_as_read_syntax 
)
static
template<typename NDA_T , typename ELT_T , typename MAT_T >
void print_nd_array ( std::ostream &  os,
const NDA_T &  nda,
bool  pr_as_read_syntax 
)
static std::string rational_approx ( double  val,
int  len 
)
inlinestatic

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

References d, D_NINT(), max(), min(), xisinf(), xisnan(), and xround().

Referenced by operator<<().

static void set_complex_format ( int  x_max,
int  x_min,
int  r_x,
bool  inf_or_nan,
int  int_only,
int r_fw,
int i_fw 
)
static
static void set_complex_matrix_format ( int  x_max,
int  x_min,
int  r_x_max,
int  r_x_min,
bool  inf_or_nan,
int  int_or_inf_or_nan,
int r_fw,
int i_fw 
)
static
static void set_format ( double  d,
int fw 
)
static
static void set_format ( double  d)
inlinestatic

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

References set_format().

static void set_format ( const Matrix m,
int fw,
double scale 
)
static
static void set_format ( const Matrix m)
inlinestatic

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

References scale(), and set_format().

static void set_format ( const Complex c,
int r_fw,
int i_fw 
)
static
static void set_format ( const Complex c)
inlinestatic

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

References set_format().

static void set_format ( const ComplexMatrix cm,
int r_fw,
int i_fw,
double scale 
)
static
static void set_format ( const ComplexMatrix cm)
inlinestatic

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

References scale(), and set_format().

static void set_format ( const Range r,
int fw,
double scale 
)
static
static void set_format ( const Range r)
inlinestatic

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

References scale(), and set_format().

static void set_format_style ( int  argc,
const string_vector argv 
)
static
static void set_output_prec_and_fw ( int  prec,
int  fw 
)
static

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

Referenced by set_format_style().

static void set_range_format ( int  x_max,
int  x_min,
int  all_ints,
int fw 
)
static
static void set_real_format ( int  digits,
bool  inf_or_nan,
bool  int_only,
int fw 
)
static
static void set_real_matrix_format ( int  x_max,
int  x_min,
bool  inf_or_nan,
int  int_or_inf_or_nan,
int fw 
)
static

Variable Documentation

bool bank_format = false
static
int bit_format = 0
static

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

Referenced by octave_print_internal().

float_format* curr_imag_fmt = 0
static

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

float_format* curr_real_fmt = 0
static

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

bool free_format = false
static
int hex_format = 0
static

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

bool plus_format = false
static
std::string plus_format_chars = "+- "
static

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

Referenced by pr_plus_format(), and set_format_style().

bool print_big_e = false
static
bool print_e = false
static
bool print_eng = false
static
bool print_g = false
static
bool rat_format = false
static
int rat_string_len = -1
static

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

bool Vcompact_format = false
bool Vfixed_point_format = false
static
int Voutput_max_field_width = 10
static
int Voutput_precision = 5
static
bool Vprint_empty_dimensions = true

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

Referenced by print_empty_matrix(), print_empty_nd_array(), and octave_cell::print_raw().

bool Vsplit_long_rows = true
static