Mercurial > octave
annotate libinterp/corefcn/pr-output.h @ 24784:4d945f2e5914
eliminate output_max_field width; limit output precision (bug #53167)
* pr-flt-fmt.h, pr-flt-fmt.cc (Voutput_max_field_width,
output_max_field_width): Delete. Eliminate all uses.
(set_output_prec): Rename from set_output_prec_and_fw. Change all uses.
(Foutput_max_field_width): Always return 20. Don't do anything with
input. Document new behavior.
(Foutput_precision): Limit value to be in the range 0 to 16.
(class float_format): Always set width to 0.
* pr-output.h, pr-output.cc (pr_output_traits): New template.
(make_real_format): Limit output precision.
(octave_print_real_matrix_internal,
octave_print_real_diag_matrix_internal,
octave_print_complex_matrix_internal,
octave_print_complex_diag_matrix_internal): New template functions.
Use them to define float and double versions of octave_print_internal
for real and complex matrix and diag matrix functions.
(octave_print_internal): Define separate versions for float and float
complex N-d arrays.
(Fformat): Update doc string.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 21 Feb 2018 08:24:41 -0500 |
parents | 0eb41237424e |
children | 0aeef407b04e |
rev | line source |
---|---|
1 | 1 /* |
2 | |
23219
3ac9f9ecfae5
maint: Update copyright dates.
John W. Eaton <jwe@octave.org>
parents:
23083
diff
changeset
|
3 Copyright (C) 1993-2017 John W. Eaton |
1 | 4 |
5 This file is part of Octave. | |
6 | |
24534
194eb4bd202b
maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents:
23220
diff
changeset
|
7 Octave is free software: you can redistribute it and/or modify it |
22755
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22407
diff
changeset
|
8 under the terms of the GNU General Public License as published by |
24534
194eb4bd202b
maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents:
23220
diff
changeset
|
9 the Free Software Foundation, either version 3 of the License, or |
22755
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22407
diff
changeset
|
10 (at your option) any later version. |
1 | 11 |
22755
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22407
diff
changeset
|
12 Octave is distributed in the hope that it will be useful, but |
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22407
diff
changeset
|
13 WITHOUT ANY WARRANTY; without even the implied warranty of |
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22407
diff
changeset
|
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22407
diff
changeset
|
15 GNU General Public License for more details. |
1 | 16 |
17 You should have received a copy of the GNU General Public License | |
7016 | 18 along with Octave; see the file COPYING. If not, see |
24534
194eb4bd202b
maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents:
23220
diff
changeset
|
19 <https://www.gnu.org/licenses/>. |
1 | 20 |
21 */ | |
22 | |
20791
f7084eae3318
maint: Use Octave coding conventions for #if statements.
Rik <rik@octave.org>
parents:
19697
diff
changeset
|
23 #if ! defined (octave_pr_output_h) |
383 | 24 #define octave_pr_output_h 1 |
1 | 25 |
21244
1473547f50f5
include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents:
20791
diff
changeset
|
26 #include "octave-config.h" |
1473547f50f5
include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents:
20791
diff
changeset
|
27 |
8950
d865363208d6
include <iosfwd> instead of <iostream> in header files
John W. Eaton <jwe@octave.org>
parents:
8920
diff
changeset
|
28 #include <iosfwd> |
1 | 29 |
1651 | 30 #include "oct-cmplx.h" |
21785
c9f8a7f7915e
use forward declarations instead of including oct-inttypes.h where possible
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
31 #include "oct-inttypes-fwd.h" |
1651 | 32 |
24667
56f889d66b7c
move float_format container to setparate file
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
33 #include "pr-flt-fmt.h" |
56f889d66b7c
move float_format container to setparate file
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
34 |
9732
b4fdfee405b5
remove ArrayN<T> + fix nonhom. diag-scalar ops
Jaroslav Hajek <highegg@gmail.com>
parents:
8950
diff
changeset
|
35 template <typename T> class Array; |
1738 | 36 class ComplexMatrix; |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7215
diff
changeset
|
37 class FloatComplexMatrix; |
8891
d077c590eb88
indicate diag & perm matrices on output
Jaroslav Hajek <highegg@gmail.com>
parents:
8625
diff
changeset
|
38 class ComplexDiagMatrix; |
d077c590eb88
indicate diag & perm matrices on output
Jaroslav Hajek <highegg@gmail.com>
parents:
8625
diff
changeset
|
39 class FloatComplexDiagMatrix; |
4513 | 40 class ComplexNDArray; |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7215
diff
changeset
|
41 class FloatComplexNDArray; |
1 | 42 class Matrix; |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7215
diff
changeset
|
43 class FloatMatrix; |
8891
d077c590eb88
indicate diag & perm matrices on output
Jaroslav Hajek <highegg@gmail.com>
parents:
8625
diff
changeset
|
44 class DiagMatrix; |
d077c590eb88
indicate diag & perm matrices on output
Jaroslav Hajek <highegg@gmail.com>
parents:
8625
diff
changeset
|
45 class FloatDiagMatrix; |
4513 | 46 class NDArray; |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7215
diff
changeset
|
47 class FloatNDArray; |
1738 | 48 class Range; |
3215 | 49 class boolMatrix; |
4513 | 50 class boolNDArray; |
1572 | 51 class charMatrix; |
4513 | 52 class charNDArray; |
8891
d077c590eb88
indicate diag & perm matrices on output
Jaroslav Hajek <highegg@gmail.com>
parents:
8625
diff
changeset
|
53 class PermMatrix; |
3928 | 54 class Cell; |
17866
ea0ecbe2eaf5
display matrix values in GUI workspace viewer (bug #40499)
John W. Eaton <jwe@octave.org>
parents:
17744
diff
changeset
|
55 class octave_value; |
1 | 56 |
21785
c9f8a7f7915e
use forward declarations instead of including oct-inttypes.h where possible
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
57 template <typename T> class intNDArray; |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7215
diff
changeset
|
58 |
24760
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
59 extern float_display_format |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
60 make_format (const Matrix& m, int& fw, double& scale); |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
61 |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
62 extern float_display_format |
24782
0eb41237424e
more templates for pr-output.cc functions
John W. Eaton <jwe@octave.org>
parents:
24776
diff
changeset
|
63 make_format (const FloatMatrix& m, int& fw, float& scale); |
0eb41237424e
more templates for pr-output.cc functions
John W. Eaton <jwe@octave.org>
parents:
24776
diff
changeset
|
64 |
0eb41237424e
more templates for pr-output.cc functions
John W. Eaton <jwe@octave.org>
parents:
24776
diff
changeset
|
65 template <typename T> |
0eb41237424e
more templates for pr-output.cc functions
John W. Eaton <jwe@octave.org>
parents:
24776
diff
changeset
|
66 extern float_display_format |
0eb41237424e
more templates for pr-output.cc functions
John W. Eaton <jwe@octave.org>
parents:
24776
diff
changeset
|
67 make_format (const std::complex<T>& c, int& r_fw, int& i_fw); |
24760
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
68 |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
69 extern float_display_format |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
70 make_format (const ComplexMatrix& cm, int& r_fw, int& i_fw, double& scale); |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
71 |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
72 extern float_display_format |
24782
0eb41237424e
more templates for pr-output.cc functions
John W. Eaton <jwe@octave.org>
parents:
24776
diff
changeset
|
73 make_format (const FloatComplexMatrix& cm, int& r_fw, int& i_fw, double& scale); |
0eb41237424e
more templates for pr-output.cc functions
John W. Eaton <jwe@octave.org>
parents:
24776
diff
changeset
|
74 |
0eb41237424e
more templates for pr-output.cc functions
John W. Eaton <jwe@octave.org>
parents:
24776
diff
changeset
|
75 extern float_display_format |
24760
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
76 make_format (const Range& r, int& fw, double& scale); |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
77 |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
78 template <typename MT> |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
79 float_display_format |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
80 make_format (const MT&) |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
81 { |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
82 return float_display_format (); |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
83 } |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
84 |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
85 template <> |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
86 float_display_format |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
87 make_format (const Range& r); |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
88 |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
89 template <> |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
90 float_display_format |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
91 make_format (const NDArray& nda); |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
92 |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
93 template <> |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
94 float_display_format |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
95 make_format (const FloatNDArray& nda); |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
96 |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
97 template <> |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
98 float_display_format |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
99 make_format (const ComplexNDArray& nda); |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
100 |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
101 template <> |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
102 float_display_format |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
103 make_format (const FloatComplexNDArray& nda); |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
104 |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
105 template <> |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
106 float_display_format |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
107 make_format (const boolNDArray& nda); |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
108 |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
109 template <> |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
110 float_display_format |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
111 make_format (const intNDArray<octave_int8>& nda); |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
112 |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
113 template <> |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
114 float_display_format |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
115 make_format (const intNDArray<octave_int16>& nda); |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
116 |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
117 template <> |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
118 float_display_format |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
119 make_format (const intNDArray<octave_int32>& nda); |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
120 |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
121 template <> |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
122 float_display_format |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
123 make_format (const intNDArray<octave_int64>& nda); |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
124 |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
125 template <> |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
126 float_display_format |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
127 make_format (const intNDArray<octave_uint8>& nda); |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
128 |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
129 template <> |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
130 float_display_format |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
131 make_format (const intNDArray<octave_uint16>& nda); |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
132 |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
133 template <> |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
134 float_display_format |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
135 make_format (const intNDArray<octave_uint32>& nda); |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
136 |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
137 template <> |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
138 float_display_format |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
139 make_format (const intNDArray<octave_uint64>& nda); |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
140 |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
141 template <> |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
142 float_display_format |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
143 make_format (const double& d); |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
144 |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
145 template <> |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
146 float_display_format |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
147 make_format (const float& f); |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
148 |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
149 template <> |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
150 float_display_format |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
151 make_format (const Complex& c); |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
152 |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
153 template <> |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
154 float_display_format |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
155 make_format (const FloatComplex& c); |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
156 |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
157 template <> |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
158 float_display_format |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
159 make_format (const octave_int8& nda); |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
160 |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
161 template <> |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
162 float_display_format |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
163 make_format (const octave_int16& nda); |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
164 |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
165 template <> |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
166 float_display_format |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
167 make_format (const octave_int32& nda); |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
168 |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
169 template <> |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
170 float_display_format |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
171 make_format (const octave_int64& nda); |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
172 |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
173 template <> |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
174 float_display_format |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
175 make_format (const octave_uint8& nda); |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
176 |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
177 template <> |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
178 float_display_format |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
179 make_format (const octave_uint16& nda); |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
180 |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
181 template <> |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
182 float_display_format |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
183 make_format (const octave_uint32& nda); |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
184 |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
185 template <> |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
186 float_display_format |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
187 make_format (const octave_uint64& nda); |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
188 |
24668
d4dd741b2794
new octave_value functions for formatting output
John W. Eaton <jwe@octave.org>
parents:
24667
diff
changeset
|
189 // FIXME: templates plus specializations might help here. |
d4dd741b2794
new octave_value functions for formatting output
John W. Eaton <jwe@octave.org>
parents:
24667
diff
changeset
|
190 |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7215
diff
changeset
|
191 extern OCTINTERP_API void |
24760
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
192 octave_print_internal (std::ostream& os, const float_display_format& fmt, |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
193 bool d, bool pr_as_read_syntax = false); |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
194 |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
195 extern OCTINTERP_API void |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7215
diff
changeset
|
196 octave_print_internal (std::ostream& os, bool d, |
10313 | 197 bool pr_as_read_syntax = false); |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7215
diff
changeset
|
198 |
6109 | 199 extern OCTINTERP_API void |
24760
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
200 octave_print_internal (std::ostream& os, const float_display_format& fmt, |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
201 char c, bool pr_as_read_syntax = false); |
17866
ea0ecbe2eaf5
display matrix values in GUI workspace viewer (bug #40499)
John W. Eaton <jwe@octave.org>
parents:
17744
diff
changeset
|
202 |
24668
d4dd741b2794
new octave_value functions for formatting output
John W. Eaton <jwe@octave.org>
parents:
24667
diff
changeset
|
203 inline void |
24760
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
204 octave_print_internal (std::ostream& os, char c, |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
205 bool pr_as_read_syntax = false) |
24668
d4dd741b2794
new octave_value functions for formatting output
John W. Eaton <jwe@octave.org>
parents:
24667
diff
changeset
|
206 { |
24760
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
207 float_display_format fmt (float_format (0, 0)); |
24776
240bd1e4f31e
pr-output.cc (octave_print_internal): Avoid inifinite recursion.
John W. Eaton <jwe@octave.org>
parents:
24770
diff
changeset
|
208 octave_print_internal (os, fmt, c, pr_as_read_syntax); |
24668
d4dd741b2794
new octave_value functions for formatting output
John W. Eaton <jwe@octave.org>
parents:
24667
diff
changeset
|
209 } |
d4dd741b2794
new octave_value functions for formatting output
John W. Eaton <jwe@octave.org>
parents:
24667
diff
changeset
|
210 |
17866
ea0ecbe2eaf5
display matrix values in GUI workspace viewer (bug #40499)
John W. Eaton <jwe@octave.org>
parents:
17744
diff
changeset
|
211 extern OCTINTERP_API void |
24668
d4dd741b2794
new octave_value functions for formatting output
John W. Eaton <jwe@octave.org>
parents:
24667
diff
changeset
|
212 octave_print_internal (std::ostream& os, const float_display_format& fmt, |
d4dd741b2794
new octave_value functions for formatting output
John W. Eaton <jwe@octave.org>
parents:
24667
diff
changeset
|
213 double d, bool pr_as_read_syntax = false); |
d4dd741b2794
new octave_value functions for formatting output
John W. Eaton <jwe@octave.org>
parents:
24667
diff
changeset
|
214 |
24760
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
215 inline void |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
216 octave_print_internal (std::ostream& os, double d, |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
217 bool pr_as_read_syntax = false) |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
218 { |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
219 octave_print_internal (os, make_format (d), d, pr_as_read_syntax); |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
220 } |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7215
diff
changeset
|
221 |
24782
0eb41237424e
more templates for pr-output.cc functions
John W. Eaton <jwe@octave.org>
parents:
24776
diff
changeset
|
222 extern OCTINTERP_API void |
24760
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
223 octave_print_internal (std::ostream& os, const float_display_format& fmt, |
24782
0eb41237424e
more templates for pr-output.cc functions
John W. Eaton <jwe@octave.org>
parents:
24776
diff
changeset
|
224 float d, bool pr_as_read_syntax = false); |
24760
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
225 |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
226 inline void |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
227 octave_print_internal (std::ostream& os, float d, |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
228 bool pr_as_read_syntax = false) |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
229 { |
24782
0eb41237424e
more templates for pr-output.cc functions
John W. Eaton <jwe@octave.org>
parents:
24776
diff
changeset
|
230 octave_print_internal (os, make_format (d), d, pr_as_read_syntax); |
24668
d4dd741b2794
new octave_value functions for formatting output
John W. Eaton <jwe@octave.org>
parents:
24667
diff
changeset
|
231 } |
d4dd741b2794
new octave_value functions for formatting output
John W. Eaton <jwe@octave.org>
parents:
24667
diff
changeset
|
232 |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7215
diff
changeset
|
233 extern OCTINTERP_API void |
3523 | 234 octave_print_internal (std::ostream& os, const Matrix& m, |
10313 | 235 bool pr_as_read_syntax = false, |
236 int extra_indent = 0); | |
625 | 237 |
6109 | 238 extern OCTINTERP_API void |
24784
4d945f2e5914
eliminate output_max_field width; limit output precision (bug #53167)
John W. Eaton <jwe@octave.org>
parents:
24782
diff
changeset
|
239 octave_print_internal (std::ostream& os, const FloatMatrix& m, |
10313 | 240 bool pr_as_read_syntax = false, |
241 int extra_indent = 0); | |
8625
4d90d21a9cd9
special printing of diagonal matrices
Jaroslav Hajek <highegg@gmail.com>
parents:
7789
diff
changeset
|
242 |
4d90d21a9cd9
special printing of diagonal matrices
Jaroslav Hajek <highegg@gmail.com>
parents:
7789
diff
changeset
|
243 extern OCTINTERP_API void |
24784
4d945f2e5914
eliminate output_max_field width; limit output precision (bug #53167)
John W. Eaton <jwe@octave.org>
parents:
24782
diff
changeset
|
244 octave_print_internal (std::ostream& os, const DiagMatrix& m, |
10313 | 245 bool pr_as_read_syntax = false, |
246 int extra_indent = 0); | |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7215
diff
changeset
|
247 |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7215
diff
changeset
|
248 extern OCTINTERP_API void |
8625
4d90d21a9cd9
special printing of diagonal matrices
Jaroslav Hajek <highegg@gmail.com>
parents:
7789
diff
changeset
|
249 octave_print_internal (std::ostream& os, const FloatDiagMatrix& m, |
10313 | 250 bool pr_as_read_syntax = false, |
251 int extra_indent = 0); | |
8625
4d90d21a9cd9
special printing of diagonal matrices
Jaroslav Hajek <highegg@gmail.com>
parents:
7789
diff
changeset
|
252 |
4d90d21a9cd9
special printing of diagonal matrices
Jaroslav Hajek <highegg@gmail.com>
parents:
7789
diff
changeset
|
253 extern OCTINTERP_API void |
4513 | 254 octave_print_internal (std::ostream& os, const NDArray& nda, |
10313 | 255 bool pr_as_read_syntax = false, |
256 int extra_indent = 0); | |
4513 | 257 |
6109 | 258 extern OCTINTERP_API void |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7215
diff
changeset
|
259 octave_print_internal (std::ostream& os, const FloatNDArray& nda, |
10313 | 260 bool pr_as_read_syntax = false, |
261 int extra_indent = 0); | |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7215
diff
changeset
|
262 |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7215
diff
changeset
|
263 extern OCTINTERP_API void |
24668
d4dd741b2794
new octave_value functions for formatting output
John W. Eaton <jwe@octave.org>
parents:
24667
diff
changeset
|
264 octave_print_internal (std::ostream& os, const float_display_format& fmt, |
d4dd741b2794
new octave_value functions for formatting output
John W. Eaton <jwe@octave.org>
parents:
24667
diff
changeset
|
265 const Complex& c, bool pr_as_read_syntax = false); |
d4dd741b2794
new octave_value functions for formatting output
John W. Eaton <jwe@octave.org>
parents:
24667
diff
changeset
|
266 |
24760
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
267 inline void |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
268 octave_print_internal (std::ostream& os, const Complex& c, |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
269 bool pr_as_read_syntax = false) |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
270 { |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
271 octave_print_internal (os, make_format (c), c, pr_as_read_syntax); |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
272 } |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7215
diff
changeset
|
273 |
24782
0eb41237424e
more templates for pr-output.cc functions
John W. Eaton <jwe@octave.org>
parents:
24776
diff
changeset
|
274 extern OCTINTERP_API void |
24760
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
275 octave_print_internal (std::ostream& os, const float_display_format& fmt, |
24782
0eb41237424e
more templates for pr-output.cc functions
John W. Eaton <jwe@octave.org>
parents:
24776
diff
changeset
|
276 const FloatComplex& c, bool pr_as_read_syntax = false); |
24760
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
277 |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
278 inline void |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
279 octave_print_internal (std::ostream& os, const FloatComplex& c, |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
280 bool pr_as_read_syntax = false) |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
281 { |
24782
0eb41237424e
more templates for pr-output.cc functions
John W. Eaton <jwe@octave.org>
parents:
24776
diff
changeset
|
282 octave_print_internal (os, make_format (c), c, pr_as_read_syntax); |
24668
d4dd741b2794
new octave_value functions for formatting output
John W. Eaton <jwe@octave.org>
parents:
24667
diff
changeset
|
283 } |
d4dd741b2794
new octave_value functions for formatting output
John W. Eaton <jwe@octave.org>
parents:
24667
diff
changeset
|
284 |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7215
diff
changeset
|
285 extern OCTINTERP_API void |
3523 | 286 octave_print_internal (std::ostream& os, const ComplexMatrix& cm, |
10313 | 287 bool pr_as_read_syntax = false, |
288 int extra_indent = 0); | |
625 | 289 |
6109 | 290 extern OCTINTERP_API void |
8625
4d90d21a9cd9
special printing of diagonal matrices
Jaroslav Hajek <highegg@gmail.com>
parents:
7789
diff
changeset
|
291 octave_print_internal (std::ostream& os, const ComplexDiagMatrix& cm, |
10313 | 292 bool pr_as_read_syntax = false, |
293 int extra_indent = 0); | |
8625
4d90d21a9cd9
special printing of diagonal matrices
Jaroslav Hajek <highegg@gmail.com>
parents:
7789
diff
changeset
|
294 |
4d90d21a9cd9
special printing of diagonal matrices
Jaroslav Hajek <highegg@gmail.com>
parents:
7789
diff
changeset
|
295 extern OCTINTERP_API void |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7215
diff
changeset
|
296 octave_print_internal (std::ostream& os, const FloatComplexMatrix& cm, |
10313 | 297 bool pr_as_read_syntax = false, |
298 int extra_indent = 0); | |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7215
diff
changeset
|
299 |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7215
diff
changeset
|
300 extern OCTINTERP_API void |
8625
4d90d21a9cd9
special printing of diagonal matrices
Jaroslav Hajek <highegg@gmail.com>
parents:
7789
diff
changeset
|
301 octave_print_internal (std::ostream& os, const FloatComplexDiagMatrix& cm, |
10313 | 302 bool pr_as_read_syntax = false, |
303 int extra_indent = 0); | |
8625
4d90d21a9cd9
special printing of diagonal matrices
Jaroslav Hajek <highegg@gmail.com>
parents:
7789
diff
changeset
|
304 |
4d90d21a9cd9
special printing of diagonal matrices
Jaroslav Hajek <highegg@gmail.com>
parents:
7789
diff
changeset
|
305 extern OCTINTERP_API void |
4513 | 306 octave_print_internal (std::ostream& os, const ComplexNDArray& nda, |
10313 | 307 bool pr_as_read_syntax = false, |
308 int extra_indent = 0); | |
4513 | 309 |
6109 | 310 extern OCTINTERP_API void |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7215
diff
changeset
|
311 octave_print_internal (std::ostream& os, const FloatComplexNDArray& nda, |
10313 | 312 bool pr_as_read_syntax = false, |
313 int extra_indent = 0); | |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7215
diff
changeset
|
314 |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7215
diff
changeset
|
315 extern OCTINTERP_API void |
8891
d077c590eb88
indicate diag & perm matrices on output
Jaroslav Hajek <highegg@gmail.com>
parents:
8625
diff
changeset
|
316 octave_print_internal (std::ostream& os, const PermMatrix& m, |
10313 | 317 bool pr_as_read_syntax = false, |
318 int extra_indent = 0); | |
8891
d077c590eb88
indicate diag & perm matrices on output
Jaroslav Hajek <highegg@gmail.com>
parents:
8625
diff
changeset
|
319 |
d077c590eb88
indicate diag & perm matrices on output
Jaroslav Hajek <highegg@gmail.com>
parents:
8625
diff
changeset
|
320 extern OCTINTERP_API void |
3523 | 321 octave_print_internal (std::ostream& os, const Range& r, |
10313 | 322 bool pr_as_read_syntax = false, |
323 int extra_indent = 0); | |
1 | 324 |
6109 | 325 extern OCTINTERP_API void |
3523 | 326 octave_print_internal (std::ostream& os, const boolMatrix& m, |
10313 | 327 bool pr_as_read_syntax = false, |
328 int extra_indent = 0); | |
3215 | 329 |
6109 | 330 extern OCTINTERP_API void |
4513 | 331 octave_print_internal (std::ostream& os, const boolNDArray& m, |
10313 | 332 bool pr_as_read_syntax = false, |
333 int extra_indent = 0); | |
4513 | 334 |
6109 | 335 extern OCTINTERP_API void |
3523 | 336 octave_print_internal (std::ostream& os, const charMatrix& chm, |
10313 | 337 bool pr_as_read_syntax = false, |
338 int extra_indent = 0, | |
339 bool pr_as_string = false); | |
1355 | 340 |
6109 | 341 extern OCTINTERP_API void |
4655 | 342 octave_print_internal (std::ostream& os, const charNDArray& nda, |
10313 | 343 bool pr_as_read_syntax = false, |
344 int extra_indent = 0, | |
345 bool pr_as_string = false); | |
4513 | 346 |
6109 | 347 extern OCTINTERP_API void |
4925 | 348 octave_print_internal (std::ostream& os, const std::string& s, |
10313 | 349 bool pr_as_read_syntax = false, |
350 int extra_indent = 0); | |
4925 | 351 |
6109 | 352 extern OCTINTERP_API void |
9732
b4fdfee405b5
remove ArrayN<T> + fix nonhom. diag-scalar ops
Jaroslav Hajek <highegg@gmail.com>
parents:
8950
diff
changeset
|
353 octave_print_internal (std::ostream& os, const Array<std::string>& sa, |
10313 | 354 bool pr_as_read_syntax = false, |
355 int extra_indent = 0); | |
4655 | 356 |
7215 | 357 extern OCTINTERP_API void |
358 octave_print_internal (std::ostream& os, const intNDArray<octave_int8>& sa, | |
10313 | 359 bool pr_as_read_syntax = false, |
360 int extra_indent = 0); | |
7215 | 361 |
362 extern OCTINTERP_API void | |
363 octave_print_internal (std::ostream& os, const intNDArray<octave_uint8>& sa, | |
10313 | 364 bool pr_as_read_syntax = false, |
365 int extra_indent = 0); | |
7215 | 366 |
367 extern OCTINTERP_API void | |
368 octave_print_internal (std::ostream& os, const intNDArray<octave_int16>& sa, | |
10313 | 369 bool pr_as_read_syntax = false, |
370 int extra_indent = 0); | |
7215 | 371 |
372 extern OCTINTERP_API void | |
373 octave_print_internal (std::ostream& os, const intNDArray<octave_uint16>& sa, | |
10313 | 374 bool pr_as_read_syntax = false, |
375 int extra_indent = 0); | |
7215 | 376 |
377 extern OCTINTERP_API void | |
378 octave_print_internal (std::ostream& os, const intNDArray<octave_int32>& sa, | |
10313 | 379 bool pr_as_read_syntax = false, |
380 int extra_indent = 0); | |
7215 | 381 |
382 extern OCTINTERP_API void | |
383 octave_print_internal (std::ostream& os, const intNDArray<octave_uint32>& sa, | |
10313 | 384 bool pr_as_read_syntax = false, |
385 int extra_indent = 0); | |
7215 | 386 |
387 extern OCTINTERP_API void | |
388 octave_print_internal (std::ostream& os, const intNDArray<octave_int64>& sa, | |
10313 | 389 bool pr_as_read_syntax = false, |
390 int extra_indent = 0); | |
4901 | 391 |
7215 | 392 extern OCTINTERP_API void |
393 octave_print_internal (std::ostream& os, const intNDArray<octave_uint64>& sa, | |
10313 | 394 bool pr_as_read_syntax = false, |
395 int extra_indent = 0); | |
7215 | 396 |
24745
d2467914ce33
enable (or improve) display for more types in the variable editor
John W. Eaton <jwe@octave.org>
parents:
24668
diff
changeset
|
397 extern void |
24668
d4dd741b2794
new octave_value functions for formatting output
John W. Eaton <jwe@octave.org>
parents:
24667
diff
changeset
|
398 octave_print_internal (std::ostream& os, const float_display_format&, |
d4dd741b2794
new octave_value functions for formatting output
John W. Eaton <jwe@octave.org>
parents:
24667
diff
changeset
|
399 const octave_int<int8_t>& sa, |
24745
d2467914ce33
enable (or improve) display for more types in the variable editor
John W. Eaton <jwe@octave.org>
parents:
24668
diff
changeset
|
400 bool pr_as_read_syntax = false); |
24760
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
401 |
24745
d2467914ce33
enable (or improve) display for more types in the variable editor
John W. Eaton <jwe@octave.org>
parents:
24668
diff
changeset
|
402 inline OCTINTERP_API void |
d2467914ce33
enable (or improve) display for more types in the variable editor
John W. Eaton <jwe@octave.org>
parents:
24668
diff
changeset
|
403 octave_print_internal (std::ostream& os, const octave_int<int8_t>& sa, |
24668
d4dd741b2794
new octave_value functions for formatting output
John W. Eaton <jwe@octave.org>
parents:
24667
diff
changeset
|
404 bool pr_as_read_syntax = false) |
d4dd741b2794
new octave_value functions for formatting output
John W. Eaton <jwe@octave.org>
parents:
24667
diff
changeset
|
405 { |
24760
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
406 float_display_format fmt (float_format (0, 0)); |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
407 octave_print_internal (os, fmt, sa, pr_as_read_syntax); |
24668
d4dd741b2794
new octave_value functions for formatting output
John W. Eaton <jwe@octave.org>
parents:
24667
diff
changeset
|
408 } |
d4dd741b2794
new octave_value functions for formatting output
John W. Eaton <jwe@octave.org>
parents:
24667
diff
changeset
|
409 |
24745
d2467914ce33
enable (or improve) display for more types in the variable editor
John W. Eaton <jwe@octave.org>
parents:
24668
diff
changeset
|
410 extern void |
d2467914ce33
enable (or improve) display for more types in the variable editor
John W. Eaton <jwe@octave.org>
parents:
24668
diff
changeset
|
411 octave_print_internal (std::ostream& os, const float_display_format&, |
d2467914ce33
enable (or improve) display for more types in the variable editor
John W. Eaton <jwe@octave.org>
parents:
24668
diff
changeset
|
412 const octave_int<uint8_t>& sa, |
10313 | 413 bool pr_as_read_syntax = false); |
7215 | 414 |
24745
d2467914ce33
enable (or improve) display for more types in the variable editor
John W. Eaton <jwe@octave.org>
parents:
24668
diff
changeset
|
415 inline OCTINTERP_API void |
d2467914ce33
enable (or improve) display for more types in the variable editor
John W. Eaton <jwe@octave.org>
parents:
24668
diff
changeset
|
416 octave_print_internal (std::ostream& os, const octave_int<uint8_t>& sa, |
24668
d4dd741b2794
new octave_value functions for formatting output
John W. Eaton <jwe@octave.org>
parents:
24667
diff
changeset
|
417 bool pr_as_read_syntax = false) |
d4dd741b2794
new octave_value functions for formatting output
John W. Eaton <jwe@octave.org>
parents:
24667
diff
changeset
|
418 { |
24760
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
419 float_display_format fmt (float_format (0, 0)); |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
420 octave_print_internal (os, fmt, sa, pr_as_read_syntax); |
24668
d4dd741b2794
new octave_value functions for formatting output
John W. Eaton <jwe@octave.org>
parents:
24667
diff
changeset
|
421 } |
d4dd741b2794
new octave_value functions for formatting output
John W. Eaton <jwe@octave.org>
parents:
24667
diff
changeset
|
422 |
24745
d2467914ce33
enable (or improve) display for more types in the variable editor
John W. Eaton <jwe@octave.org>
parents:
24668
diff
changeset
|
423 extern void |
24668
d4dd741b2794
new octave_value functions for formatting output
John W. Eaton <jwe@octave.org>
parents:
24667
diff
changeset
|
424 octave_print_internal (std::ostream& os, const float_display_format&, |
d4dd741b2794
new octave_value functions for formatting output
John W. Eaton <jwe@octave.org>
parents:
24667
diff
changeset
|
425 const octave_int<int16_t>& sa, |
24745
d2467914ce33
enable (or improve) display for more types in the variable editor
John W. Eaton <jwe@octave.org>
parents:
24668
diff
changeset
|
426 bool pr_as_read_syntax = false); |
d2467914ce33
enable (or improve) display for more types in the variable editor
John W. Eaton <jwe@octave.org>
parents:
24668
diff
changeset
|
427 |
d2467914ce33
enable (or improve) display for more types in the variable editor
John W. Eaton <jwe@octave.org>
parents:
24668
diff
changeset
|
428 inline OCTINTERP_API void |
d2467914ce33
enable (or improve) display for more types in the variable editor
John W. Eaton <jwe@octave.org>
parents:
24668
diff
changeset
|
429 octave_print_internal (std::ostream& os, const octave_int<int16_t>& sa, |
24668
d4dd741b2794
new octave_value functions for formatting output
John W. Eaton <jwe@octave.org>
parents:
24667
diff
changeset
|
430 bool pr_as_read_syntax = false) |
d4dd741b2794
new octave_value functions for formatting output
John W. Eaton <jwe@octave.org>
parents:
24667
diff
changeset
|
431 { |
24760
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
432 float_display_format fmt (float_format (0, 0)); |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
433 octave_print_internal (os, fmt, sa, pr_as_read_syntax); |
24668
d4dd741b2794
new octave_value functions for formatting output
John W. Eaton <jwe@octave.org>
parents:
24667
diff
changeset
|
434 } |
d4dd741b2794
new octave_value functions for formatting output
John W. Eaton <jwe@octave.org>
parents:
24667
diff
changeset
|
435 |
24745
d2467914ce33
enable (or improve) display for more types in the variable editor
John W. Eaton <jwe@octave.org>
parents:
24668
diff
changeset
|
436 extern void |
d2467914ce33
enable (or improve) display for more types in the variable editor
John W. Eaton <jwe@octave.org>
parents:
24668
diff
changeset
|
437 octave_print_internal (std::ostream& os, const float_display_format&, |
d2467914ce33
enable (or improve) display for more types in the variable editor
John W. Eaton <jwe@octave.org>
parents:
24668
diff
changeset
|
438 const octave_int<uint16_t>& sa, |
10313 | 439 bool pr_as_read_syntax = false); |
7215 | 440 |
24745
d2467914ce33
enable (or improve) display for more types in the variable editor
John W. Eaton <jwe@octave.org>
parents:
24668
diff
changeset
|
441 inline OCTINTERP_API void |
d2467914ce33
enable (or improve) display for more types in the variable editor
John W. Eaton <jwe@octave.org>
parents:
24668
diff
changeset
|
442 octave_print_internal (std::ostream& os, const octave_int<uint16_t>& sa, |
24668
d4dd741b2794
new octave_value functions for formatting output
John W. Eaton <jwe@octave.org>
parents:
24667
diff
changeset
|
443 bool pr_as_read_syntax = false) |
d4dd741b2794
new octave_value functions for formatting output
John W. Eaton <jwe@octave.org>
parents:
24667
diff
changeset
|
444 { |
24760
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
445 float_display_format fmt (float_format (0, 0)); |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
446 octave_print_internal (os, fmt, sa, pr_as_read_syntax); |
24668
d4dd741b2794
new octave_value functions for formatting output
John W. Eaton <jwe@octave.org>
parents:
24667
diff
changeset
|
447 } |
d4dd741b2794
new octave_value functions for formatting output
John W. Eaton <jwe@octave.org>
parents:
24667
diff
changeset
|
448 |
24745
d2467914ce33
enable (or improve) display for more types in the variable editor
John W. Eaton <jwe@octave.org>
parents:
24668
diff
changeset
|
449 extern void |
24668
d4dd741b2794
new octave_value functions for formatting output
John W. Eaton <jwe@octave.org>
parents:
24667
diff
changeset
|
450 octave_print_internal (std::ostream& os, const float_display_format&, |
d4dd741b2794
new octave_value functions for formatting output
John W. Eaton <jwe@octave.org>
parents:
24667
diff
changeset
|
451 const octave_int<int32_t>& sa, |
24745
d2467914ce33
enable (or improve) display for more types in the variable editor
John W. Eaton <jwe@octave.org>
parents:
24668
diff
changeset
|
452 bool pr_as_read_syntax = false); |
d2467914ce33
enable (or improve) display for more types in the variable editor
John W. Eaton <jwe@octave.org>
parents:
24668
diff
changeset
|
453 |
d2467914ce33
enable (or improve) display for more types in the variable editor
John W. Eaton <jwe@octave.org>
parents:
24668
diff
changeset
|
454 inline OCTINTERP_API void |
d2467914ce33
enable (or improve) display for more types in the variable editor
John W. Eaton <jwe@octave.org>
parents:
24668
diff
changeset
|
455 octave_print_internal (std::ostream& os, const octave_int<int32_t>& sa, |
24668
d4dd741b2794
new octave_value functions for formatting output
John W. Eaton <jwe@octave.org>
parents:
24667
diff
changeset
|
456 bool pr_as_read_syntax = false) |
d4dd741b2794
new octave_value functions for formatting output
John W. Eaton <jwe@octave.org>
parents:
24667
diff
changeset
|
457 { |
24760
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
458 float_display_format fmt (float_format (0, 0)); |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
459 octave_print_internal (os, fmt, sa, pr_as_read_syntax); |
24668
d4dd741b2794
new octave_value functions for formatting output
John W. Eaton <jwe@octave.org>
parents:
24667
diff
changeset
|
460 } |
d4dd741b2794
new octave_value functions for formatting output
John W. Eaton <jwe@octave.org>
parents:
24667
diff
changeset
|
461 |
24745
d2467914ce33
enable (or improve) display for more types in the variable editor
John W. Eaton <jwe@octave.org>
parents:
24668
diff
changeset
|
462 extern void |
d2467914ce33
enable (or improve) display for more types in the variable editor
John W. Eaton <jwe@octave.org>
parents:
24668
diff
changeset
|
463 octave_print_internal (std::ostream& os, const float_display_format&, |
d2467914ce33
enable (or improve) display for more types in the variable editor
John W. Eaton <jwe@octave.org>
parents:
24668
diff
changeset
|
464 const octave_int<uint32_t>& sa, |
10313 | 465 bool pr_as_read_syntax = false); |
7215 | 466 |
24745
d2467914ce33
enable (or improve) display for more types in the variable editor
John W. Eaton <jwe@octave.org>
parents:
24668
diff
changeset
|
467 inline OCTINTERP_API void |
d2467914ce33
enable (or improve) display for more types in the variable editor
John W. Eaton <jwe@octave.org>
parents:
24668
diff
changeset
|
468 octave_print_internal (std::ostream& os, const octave_int<uint32_t>& sa, |
24668
d4dd741b2794
new octave_value functions for formatting output
John W. Eaton <jwe@octave.org>
parents:
24667
diff
changeset
|
469 bool pr_as_read_syntax = false) |
d4dd741b2794
new octave_value functions for formatting output
John W. Eaton <jwe@octave.org>
parents:
24667
diff
changeset
|
470 { |
24760
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
471 float_display_format fmt (float_format (0, 0)); |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
472 octave_print_internal (os, fmt, sa, pr_as_read_syntax); |
24668
d4dd741b2794
new octave_value functions for formatting output
John W. Eaton <jwe@octave.org>
parents:
24667
diff
changeset
|
473 } |
d4dd741b2794
new octave_value functions for formatting output
John W. Eaton <jwe@octave.org>
parents:
24667
diff
changeset
|
474 |
24745
d2467914ce33
enable (or improve) display for more types in the variable editor
John W. Eaton <jwe@octave.org>
parents:
24668
diff
changeset
|
475 extern void |
d2467914ce33
enable (or improve) display for more types in the variable editor
John W. Eaton <jwe@octave.org>
parents:
24668
diff
changeset
|
476 octave_print_internal (std::ostream& os, const float_display_format&, |
d2467914ce33
enable (or improve) display for more types in the variable editor
John W. Eaton <jwe@octave.org>
parents:
24668
diff
changeset
|
477 const octave_int<int64_t>& sa, |
10313 | 478 bool pr_as_read_syntax = false); |
7215 | 479 |
24745
d2467914ce33
enable (or improve) display for more types in the variable editor
John W. Eaton <jwe@octave.org>
parents:
24668
diff
changeset
|
480 inline OCTINTERP_API void |
d2467914ce33
enable (or improve) display for more types in the variable editor
John W. Eaton <jwe@octave.org>
parents:
24668
diff
changeset
|
481 octave_print_internal (std::ostream& os, const octave_int<int64_t>& sa, |
24668
d4dd741b2794
new octave_value functions for formatting output
John W. Eaton <jwe@octave.org>
parents:
24667
diff
changeset
|
482 bool pr_as_read_syntax = false) |
d4dd741b2794
new octave_value functions for formatting output
John W. Eaton <jwe@octave.org>
parents:
24667
diff
changeset
|
483 { |
24760
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
484 float_display_format fmt (float_format (0, 0)); |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
485 octave_print_internal (os, fmt, sa, pr_as_read_syntax); |
24668
d4dd741b2794
new octave_value functions for formatting output
John W. Eaton <jwe@octave.org>
parents:
24667
diff
changeset
|
486 } |
d4dd741b2794
new octave_value functions for formatting output
John W. Eaton <jwe@octave.org>
parents:
24667
diff
changeset
|
487 |
24745
d2467914ce33
enable (or improve) display for more types in the variable editor
John W. Eaton <jwe@octave.org>
parents:
24668
diff
changeset
|
488 extern void |
d2467914ce33
enable (or improve) display for more types in the variable editor
John W. Eaton <jwe@octave.org>
parents:
24668
diff
changeset
|
489 octave_print_internal (std::ostream& os, const float_display_format&, |
d2467914ce33
enable (or improve) display for more types in the variable editor
John W. Eaton <jwe@octave.org>
parents:
24668
diff
changeset
|
490 const octave_int<uint64_t>& sa, |
10313 | 491 bool pr_as_read_syntax = false); |
4901 | 492 |
24745
d2467914ce33
enable (or improve) display for more types in the variable editor
John W. Eaton <jwe@octave.org>
parents:
24668
diff
changeset
|
493 inline OCTINTERP_API void |
d2467914ce33
enable (or improve) display for more types in the variable editor
John W. Eaton <jwe@octave.org>
parents:
24668
diff
changeset
|
494 octave_print_internal (std::ostream& os, const octave_int<uint64_t>& sa, |
24668
d4dd741b2794
new octave_value functions for formatting output
John W. Eaton <jwe@octave.org>
parents:
24667
diff
changeset
|
495 bool pr_as_read_syntax = false) |
d4dd741b2794
new octave_value functions for formatting output
John W. Eaton <jwe@octave.org>
parents:
24667
diff
changeset
|
496 { |
24760
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
497 float_display_format fmt (float_format (0, 0)); |
b784d68f7c44
fix printing of logical values (bug #53160)
John W. Eaton <jwe@octave.org>
parents:
24745
diff
changeset
|
498 octave_print_internal (os, fmt, sa, pr_as_read_syntax); |
24668
d4dd741b2794
new octave_value functions for formatting output
John W. Eaton <jwe@octave.org>
parents:
24667
diff
changeset
|
499 } |
d4dd741b2794
new octave_value functions for formatting output
John W. Eaton <jwe@octave.org>
parents:
24667
diff
changeset
|
500 |
6109 | 501 extern OCTINTERP_API void |
3933 | 502 octave_print_internal (std::ostream& os, const Cell& cell, |
10313 | 503 bool pr_as_read_syntax = false, |
504 int extra_indent = 0, | |
505 bool pr_as_string = false); | |
3928 | 506 |
24668
d4dd741b2794
new octave_value functions for formatting output
John W. Eaton <jwe@octave.org>
parents:
24667
diff
changeset
|
507 inline void |
d4dd741b2794
new octave_value functions for formatting output
John W. Eaton <jwe@octave.org>
parents:
24667
diff
changeset
|
508 octave_print_internal (std::ostream& os, const float_display_format&, |
d4dd741b2794
new octave_value functions for formatting output
John W. Eaton <jwe@octave.org>
parents:
24667
diff
changeset
|
509 const Cell& cell, bool pr_as_read_syntax = false, |
d4dd741b2794
new octave_value functions for formatting output
John W. Eaton <jwe@octave.org>
parents:
24667
diff
changeset
|
510 int extra_indent = 0, bool pr_as_string = false) |
d4dd741b2794
new octave_value functions for formatting output
John W. Eaton <jwe@octave.org>
parents:
24667
diff
changeset
|
511 { |
d4dd741b2794
new octave_value functions for formatting output
John W. Eaton <jwe@octave.org>
parents:
24667
diff
changeset
|
512 octave_print_internal (os, cell, pr_as_read_syntax, extra_indent, |
d4dd741b2794
new octave_value functions for formatting output
John W. Eaton <jwe@octave.org>
parents:
24667
diff
changeset
|
513 pr_as_string); |
d4dd741b2794
new octave_value functions for formatting output
John W. Eaton <jwe@octave.org>
parents:
24667
diff
changeset
|
514 } |
d4dd741b2794
new octave_value functions for formatting output
John W. Eaton <jwe@octave.org>
parents:
24667
diff
changeset
|
515 |
17866
ea0ecbe2eaf5
display matrix values in GUI workspace viewer (bug #40499)
John W. Eaton <jwe@octave.org>
parents:
17744
diff
changeset
|
516 extern OCTINTERP_API void |
ea0ecbe2eaf5
display matrix values in GUI workspace viewer (bug #40499)
John W. Eaton <jwe@octave.org>
parents:
17744
diff
changeset
|
517 octave_print_internal (std::ostream& os, const octave_value& ov, |
ea0ecbe2eaf5
display matrix values in GUI workspace viewer (bug #40499)
John W. Eaton <jwe@octave.org>
parents:
17744
diff
changeset
|
518 bool pr_as_read_syntax = false); |
ea0ecbe2eaf5
display matrix values in GUI workspace viewer (bug #40499)
John W. Eaton <jwe@octave.org>
parents:
17744
diff
changeset
|
519 |
24770
39186eac5a05
preparing for a brave new future, use templates in some pr-output functions
John W. Eaton <jwe@octave.org>
parents:
24760
diff
changeset
|
520 template <typename T> |
24667
56f889d66b7c
move float_format container to setparate file
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
521 class |
56f889d66b7c
move float_format container to setparate file
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
522 pr_engineering_float |
56f889d66b7c
move float_format container to setparate file
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
523 { |
56f889d66b7c
move float_format container to setparate file
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
524 public: |
56f889d66b7c
move float_format container to setparate file
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
525 |
56f889d66b7c
move float_format container to setparate file
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
526 const float_format m_ff; |
56f889d66b7c
move float_format container to setparate file
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
527 |
24770
39186eac5a05
preparing for a brave new future, use templates in some pr-output functions
John W. Eaton <jwe@octave.org>
parents:
24760
diff
changeset
|
528 T m_val; |
24667
56f889d66b7c
move float_format container to setparate file
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
529 |
56f889d66b7c
move float_format container to setparate file
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
530 int exponent (void) const; |
56f889d66b7c
move float_format container to setparate file
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
531 |
24770
39186eac5a05
preparing for a brave new future, use templates in some pr-output functions
John W. Eaton <jwe@octave.org>
parents:
24760
diff
changeset
|
532 T mantissa (void) const; |
24667
56f889d66b7c
move float_format container to setparate file
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
533 |
24770
39186eac5a05
preparing for a brave new future, use templates in some pr-output functions
John W. Eaton <jwe@octave.org>
parents:
24760
diff
changeset
|
534 pr_engineering_float (const float_format& ff, T val) |
24667
56f889d66b7c
move float_format container to setparate file
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
535 : m_ff (ff), m_val (val) { } |
56f889d66b7c
move float_format container to setparate file
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
536 |
24770
39186eac5a05
preparing for a brave new future, use templates in some pr-output functions
John W. Eaton <jwe@octave.org>
parents:
24760
diff
changeset
|
537 pr_engineering_float (const float_display_format& fdf, T val) |
24667
56f889d66b7c
move float_format container to setparate file
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
538 : m_ff (fdf.real_format ()), m_val (val) { } |
56f889d66b7c
move float_format container to setparate file
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
539 }; |
56f889d66b7c
move float_format container to setparate file
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
540 |
24770
39186eac5a05
preparing for a brave new future, use templates in some pr-output functions
John W. Eaton <jwe@octave.org>
parents:
24760
diff
changeset
|
541 template <typename T> |
24667
56f889d66b7c
move float_format container to setparate file
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
542 class |
56f889d66b7c
move float_format container to setparate file
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
543 pr_formatted_float |
56f889d66b7c
move float_format container to setparate file
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
544 { |
56f889d66b7c
move float_format container to setparate file
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
545 public: |
56f889d66b7c
move float_format container to setparate file
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
546 |
56f889d66b7c
move float_format container to setparate file
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
547 const float_format m_ff; |
56f889d66b7c
move float_format container to setparate file
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
548 |
24770
39186eac5a05
preparing for a brave new future, use templates in some pr-output functions
John W. Eaton <jwe@octave.org>
parents:
24760
diff
changeset
|
549 T m_val; |
24667
56f889d66b7c
move float_format container to setparate file
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
550 |
24770
39186eac5a05
preparing for a brave new future, use templates in some pr-output functions
John W. Eaton <jwe@octave.org>
parents:
24760
diff
changeset
|
551 pr_formatted_float (const float_format& ff, T val) |
24667
56f889d66b7c
move float_format container to setparate file
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
552 : m_ff (ff), m_val (val) { } |
56f889d66b7c
move float_format container to setparate file
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
553 |
24770
39186eac5a05
preparing for a brave new future, use templates in some pr-output functions
John W. Eaton <jwe@octave.org>
parents:
24760
diff
changeset
|
554 pr_formatted_float (const float_display_format& fdf, T val) |
24667
56f889d66b7c
move float_format container to setparate file
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
555 : m_ff (fdf.real_format ()), m_val (val) { } |
56f889d66b7c
move float_format container to setparate file
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
556 }; |
56f889d66b7c
move float_format container to setparate file
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
557 |
24770
39186eac5a05
preparing for a brave new future, use templates in some pr-output functions
John W. Eaton <jwe@octave.org>
parents:
24760
diff
changeset
|
558 template <typename T> |
24667
56f889d66b7c
move float_format container to setparate file
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
559 class |
56f889d66b7c
move float_format container to setparate file
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
560 pr_rational_float |
56f889d66b7c
move float_format container to setparate file
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
561 { |
56f889d66b7c
move float_format container to setparate file
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
562 public: |
56f889d66b7c
move float_format container to setparate file
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
563 |
56f889d66b7c
move float_format container to setparate file
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
564 const float_format m_ff; |
56f889d66b7c
move float_format container to setparate file
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
565 |
24770
39186eac5a05
preparing for a brave new future, use templates in some pr-output functions
John W. Eaton <jwe@octave.org>
parents:
24760
diff
changeset
|
566 T m_val; |
24667
56f889d66b7c
move float_format container to setparate file
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
567 |
24770
39186eac5a05
preparing for a brave new future, use templates in some pr-output functions
John W. Eaton <jwe@octave.org>
parents:
24760
diff
changeset
|
568 pr_rational_float (const float_format& ff, T val) |
24667
56f889d66b7c
move float_format container to setparate file
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
569 : m_ff (ff), m_val (val) { } |
56f889d66b7c
move float_format container to setparate file
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
570 |
24770
39186eac5a05
preparing for a brave new future, use templates in some pr-output functions
John W. Eaton <jwe@octave.org>
parents:
24760
diff
changeset
|
571 pr_rational_float (const float_display_format& fdf, T val) |
24667
56f889d66b7c
move float_format container to setparate file
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
572 : m_ff (fdf.real_format ()), m_val (val) { } |
56f889d66b7c
move float_format container to setparate file
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
573 }; |
56f889d66b7c
move float_format container to setparate file
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
574 |
24770
39186eac5a05
preparing for a brave new future, use templates in some pr-output functions
John W. Eaton <jwe@octave.org>
parents:
24760
diff
changeset
|
575 template <typename T> |
24667
56f889d66b7c
move float_format container to setparate file
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
576 extern std::ostream& |
24770
39186eac5a05
preparing for a brave new future, use templates in some pr-output functions
John W. Eaton <jwe@octave.org>
parents:
24760
diff
changeset
|
577 operator << (std::ostream& os, const pr_engineering_float<T>& pef); |
24667
56f889d66b7c
move float_format container to setparate file
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
578 |
24770
39186eac5a05
preparing for a brave new future, use templates in some pr-output functions
John W. Eaton <jwe@octave.org>
parents:
24760
diff
changeset
|
579 template <typename T> |
24667
56f889d66b7c
move float_format container to setparate file
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
580 extern std::ostream& |
24770
39186eac5a05
preparing for a brave new future, use templates in some pr-output functions
John W. Eaton <jwe@octave.org>
parents:
24760
diff
changeset
|
581 operator << (std::ostream& os, const pr_formatted_float<T>& pff); |
24667
56f889d66b7c
move float_format container to setparate file
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
582 |
24770
39186eac5a05
preparing for a brave new future, use templates in some pr-output functions
John W. Eaton <jwe@octave.org>
parents:
24760
diff
changeset
|
583 template <typename T> |
24667
56f889d66b7c
move float_format container to setparate file
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
584 extern std::ostream& |
24770
39186eac5a05
preparing for a brave new future, use templates in some pr-output functions
John W. Eaton <jwe@octave.org>
parents:
24760
diff
changeset
|
585 operator << (std::ostream& os, const pr_rational_float<T>& prf); |
24667
56f889d66b7c
move float_format container to setparate file
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
586 |
5360 | 587 // TRUE means that the dimensions of empty objects should be printed |
588 // like this: x = [](2x0). | |
589 extern bool Vprint_empty_dimensions; | |
590 | |
13112
969ed305dde5
Remove all blank lines with "format compact"
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
11523
diff
changeset
|
591 // TRUE means don't put empty lines in output |
969ed305dde5
Remove all blank lines with "format compact"
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
11523
diff
changeset
|
592 extern bool Vcompact_format; |
969ed305dde5
Remove all blank lines with "format compact"
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
11523
diff
changeset
|
593 |
1 | 594 #endif |