RTOpPack_print_sub_vector.hpp File Reference
Include dependency graph for RTOpPack_print_sub_vector.hpp:
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
|std::ostream & ||output (std::ostream &o, const SubVector &v, bool print_dim, bool newline)|
| ||Print an |
|std::ostream & RTOpPack::output
||const SubVector &
The indexes used for the output elements are exactly as is explained in the specification for
|o ||[in/out] Stream that output is sent to. On value of |
o.width() on input is used to set the width for the columns that the vector elements are printed into. However, no matter what the width argument is at least one space is guarantteed between vector elements Of course, the other stream properties will be used also (i.e. precision, scientific etc.) when printing the elements.
|v ||[in] sub-vector object who's elements are printed. |
|print_dim ||[in] If |
true, then the dimension of the sub-vector will be printed before the vector elements on the following line (see below).
|newline ||[in] If |
true, then a newline will be printed after the last vector elements is printed.
RTOp_SubVector. Each of the vector elements are printed in sparse format (even if the vector is dense) with the value followed by a
: followed by the index. For example, suppose a sparse sub-vector is printed with
global_offset == 5,
sub_dim == 8 and
sub_nz == 4. With
o.precision() == 4 and
o.width() == 16,
print_dim == true and
newline == true, the output sent to
o would look something like:
-1.3457e+01:6 8.352e-01:8 -5.9245e-03:9 -3.658e+02:11
print_dim == false, then the sub-vector dimension
"8" and the
"\\n" after it would not have been printed. Also, if
newline == false , then the newline
-3.658e+02:11<> would not have been printed. ToDo: Finish documentation!
Definition at line 32 of file RTOpPack_print_sub_vector.cpp.
Generated on Thu Sep 18 12:36:04 2008 for MOOCHO (Single Doxygen Collection) by 188.8.131.52