GNU Octave  4.2.1
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 "errwarn.h"
#include "ovl.h"
#include "oct-stream.h"
#include "octave-preserve-stream-state.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<typename 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 Ffdisp (const octave_value_list &args, int) fdisp(stdout
 
OCTAVE_EXPORT octave_value_list Fformat (const octave_value_list &args, int) the variable is changed locally for the function and any subroutines it calls.The original variable value is restored when exiting the function.@seealso
 
end deftypefn *OCTAVE_EXPORT
octave_value_list 
Fprint_empty_dimensions (const octave_value_list &args, int nargout) amp
 
OCTAVE_EXPORT octave_value_list Frats (const octave_value_list &args, int) an asterisk(*) padded with spaces will be returned instead.eealso
 
nd deftypefn * if (nargin< 1||nargin > 2) print_usage()
 
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<typename T >
void octave_print_internal_template (std::ostream &os, const octave_int< T > &val, bool)
 
template<typename 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<typename 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<typename 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_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)
 
For the expression xample zeros (3, 0) nd example oindent will print xample ans
 

Variables

octave_value arg = args(0)
 
static bool bank_format = false
 
static int bit_format = 0
 
static float_formatcurr_imag_fmt = 0
 
static float_formatcurr_real_fmt = 0
 
For example
 
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
 
if(!arg.is_numeric_type())
error("rats return 
retval
 
OCTAVE_EXPORT octave_value_list pi rint
 
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 3074 of file pr-output.cc.

#define PRINT_CHAR_BITS (   os,
  c 
)
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)
while(ischar(s=fgets(fid))) fputs(stdout
the sparsity preserving column transformation such that that defines the pivoting threshold can be given in which case it defines the c
Definition: lu.cc:138

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

Referenced by pr_any_float(), and pr_int().

#define PRINT_CHAR_BITS_SWAPPED (   os,
  c 
)
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)
while(ischar(s=fgets(fid))) fputs(stdout
the sparsity preserving column transformation such that that defines the pivoting threshold can be given in which case it defines the c
Definition: lu.cc:138

Definition at line 1441 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 2984 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:3123
#define OCTINTERP_API
Definition: mexproto.h:69
void octave_print_internal(std::ostream &, char, bool)
Definition: pr-output.cc:1722

Definition at line 3384 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) \
{ \
}
identity matrix If supplied two scalar respectively For allows like xample val
Definition: data.cc:5068
void octave_print_internal_template(std::ostream &os, const octave_int< T > &val, bool)
Definition: pr-output.cc:3123
#define OCTINTERP_API
Definition: mexproto.h:69
void octave_print_internal(std::ostream &, char, bool)
Definition: pr-output.cc:1722

Definition at line 3139 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:3069
F77_RET_T F77_REAL &F77_RET_T F77_DBLE &F77_RET_T F77_REAL &F77_RET_T F77_DBLE &F77_RET_T F77_REAL &F77_RET_T F77_DBLE &F77_RET_T const F77_REAL const F77_REAL F77_REAL &F77_RET_T const F77_DBLE const F77_DBLE F77_DBLE &F77_RET_T F77_REAL &F77_RET_T F77_DBLE &F77_RET_T F77_DBLE &F77_RET_T F77_REAL &F77_RET_T F77_REAL &F77_RET_T F77_DBLE &F77_RET_T const F77_DBLE F77_DBLE &F77_RET_T const F77_REAL F77_REAL &F77_RET_T F77_REAL F77_REAL &F77_RET_T F77_DBLE F77_DBLE &F77_RET_T const F77_DBLE * x

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

Function Documentation

template<typename T >
T abs ( x)
inline

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

References x.

Referenced by octave_print_internal_template(), and rational_approx().

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 3091 of file pr-output.cc.

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

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

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

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

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

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

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

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

static int calc_scale_exp ( const int x)
static

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

References x.

Referenced by set_format().

static int current_output_max_field_width ( void  )
static

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

References Voutput_max_field_width.

static int current_output_precision ( void  )
static

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

References Voutput_precision.

static int engineering_exponent ( const double x)
static

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

References octave::math::floor(), and x.

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

OCTAVE_EXPORT octave_value_list Ffdisp ( const octave_value_list args,
int   
)

Referenced by install_pr_output_fcns().

OCTAVE_EXPORT octave_value_list Fformat ( const octave_value_list args,
int   
)

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

References argc, argv, ovl(), and set_format_style().

Referenced by install_pr_output_fcns().

end deftypefn* OCTAVE_EXPORT octave_value_list Fprint_empty_dimensions ( const octave_value_list args,
int  nargout 
)

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

References SET_INTERNAL_VARIABLE.

Referenced by install_pr_output_fcns(), and maximum_braindamage().

OCTAVE_EXPORT octave_value_list Frats ( const octave_value_list args,
int   
)

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

References nargin, and print_usage().

Referenced by install_pr_output_fcns().

nd deftypefn* if ( nargin< 1||nargin 2)
static int num_digits ( const double x)
static

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

References engineering_exponent(), and octave::math::floor().

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 1728 of file pr-output.cc.

References d, 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 2106 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 2144 of file pr-output.cc.

References c, 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 2583 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 2602 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 2610 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 2616 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 2623 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 2630 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 2637 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 2644 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 2652 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 2660 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 2783 of file pr-output.cc.

References octave_print_internal(), and tmp.

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

Definition at line 2792 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 2859 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 2879 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 3146 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 3147 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 3148 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 3149 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 3150 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 3151 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 3152 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 3153 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 3392 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 3393 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 3394 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 3395 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 3396 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 3397 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 3398 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 3399 of file pr-output.cc.

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

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

References panic_impossible.

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

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

References panic_impossible.

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

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

References pr_int(), and pr_plus_format().

Referenced by octave_print_internal_template().

template<typename 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 1678 of file pr-output.cc.

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

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

References c, lo_ieee_signbit, pr_float(), pr_imag_float(), scale(), and tmp.

Referenced by octave_print_internal().

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

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

References pr_any_float(), and scale().

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 1582 of file pr-output.cc.

References pr_any_float().

Referenced by pr_complex().

template<typename 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 500 of file pr-output.cc.

References Array< T >::columns(), octave::math::finite(), m, max(), result, Array< T >::rows(), and val.

Referenced by set_format().

static double pr_min_internal ( const Matrix m)
static

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

References Array< T >::columns(), octave::math::finite(), m, max(), result, Array< T >::rows(), and val.

Referenced by set_format().

template<typename 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 2125 of file pr-output.cc.

References c, and pr_plus_format().

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

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

References left.

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 1621 of file pr-output.cc.

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
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

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

References double, print_g, float_format::uppercase(), and Voutput_precision.

Referenced by set_format().

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

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

References double, float_format::uppercase(), Voutput_max_field_width, and Voutput_precision.

Referenced by set_format().

static void set_format ( double  d,
int fw 
)
static
static void set_format ( double  d)
inlinestatic

Definition at line 675 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 835 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 1038 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 1255 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 1410 of file pr-output.cc.

References scale(), and set_format().

static void set_format_style ( int  argc,
const string_vector argv 
)
static

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

References string_vector::append(), arg, error(), plus_format_chars, and string.

Referenced by Fformat().

static void set_range_format ( int  x_max,
int  x_min,
int  all_ints,
int fw 
)
static

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

References double, float_format::uppercase(), Voutput_max_field_width, and Voutput_precision.

Referenced by set_format().

static void set_real_format ( int  digits,
bool  inf_or_nan,
bool  int_only,
int fw 
)
static

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

References double, print_eng, float_format::uppercase(), and Voutput_precision.

Referenced by set_format().

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

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

References double, float_format::uppercase(), Voutput_max_field_width, and Voutput_precision.

Referenced by set_format().

For the expression xample zeros ( ,
 
)

Variable Documentation

octave_value arg = args(0)

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

Referenced by jit_function::call(), file_editor::call_custom_editor(), file_editor::check_conflict_save(), file_editor_tab::check_file_modified(), file_editor_tab::check_valid_codec(), file_editor_tab::check_valid_identifier(), jit_convert_llvm::convert_loop(), HTMLDecoder::decodeLine(), main_window::display_release_notes(), jit_instruction::do_construct_ssa(), do_fft(), do_fft2(), do_fftn(), octave_qt_link::do_file_dialog(), do_history(), do_minmax_body(), do_minmax_red_op(), do_minmax_red_op< boolNDArray >(), do_minmax_red_op< charNDArray >(), do_printf_string(), octave_qt_link::do_prompt_new_edit_file(), do_sqrtm(), do_trilu(), F__dump_symtab_info__(), F__fieldnames__(), Fangle(), Fdet(), Fdiary(), Fhess(), file_editor_tab::file_has_changed(), Finv(), Fmore(), Fnproc(), Fschur(), Fsqrtm(), Fsvd(), Gchol(), get_dispatch_type(), get_mapper_fun_options(), Gqr(), Gsymrcm(), octave::gui_application::gui_running(), handle_message(), QTerminal::handleCustomContextMenuRequested(), initial_page::initial_page(), octave::interpreter::interactive(), octave::command_editor::interrupt(), jit_function_info::jit_function_info(), main(), 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(), file_editor::mru_menu_update(), workspace_view::notice_settings(), parser::open_file(), HTMLDecoder::openSpan(), parse_dbfunction_params(), annotation_dialog::prompt_for_color(), jit_typeinfo::register_generic(), jit_infer::release_dead_phi(), jit_infer::release_temp(), find_dialog::replace_all(), file_editor::request_open_file(), file_editor_tab::save_file(), set_format_style(), octave_dock_widget::set_style(), shortcut_manager::shortcut_dialog_finished(), jit_infer::simplify_phi(), sparse(), sparse_ascending_compare< Complex >(), sparse_descending_compare< Complex >(), color_picker::update_button(), QtHandles::Figure::updateStatusBar(), Vt102Emulation::updateTitle(), jit_convert_llvm::visit(), octave::tree_evaluator::visit_simple_for_command(), webinfo::webinfo(), and Vt102Emulation::XtermHack().

bool bank_format = false
static

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

int bit_format = 0
static

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

Referenced by octave_print_internal().

float_format* curr_imag_fmt = 0
static

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

float_format* curr_real_fmt = 0
static

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

For example

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

bool free_format = false
static

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

int hex_format = 0
static

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

bool plus_format = false
static

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

std::string plus_format_chars = "+- "
static

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

Referenced by pr_plus_format(), and set_format_style().

bool print_big_e = false
static

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

bool print_e = false
static

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

bool print_eng = false
static

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

Referenced by set_real_format().

bool print_g = false
static

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

Referenced by set_complex_format().

bool rat_format = false
static

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

int rat_string_len = -1
static

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

if (! arg.is_numeric_type ()) error ("rats return retval

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

OCTAVE_EXPORT octave_value_list pi rint

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

bool Vcompact_format = false
bool Vfixed_point_format = false
static

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

int Voutput_max_field_width = 10
static
int Voutput_precision = 5
static
bool Vprint_empty_dimensions = true

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

Referenced by octave_cell::print_raw().

bool Vsplit_long_rows = true
static

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