Function vector_out (o2scl)¶
-
template<class vec_t>
void o2scl::vector_out(std::ostream &os, size_t n, const vec_t &v, bool endline = false)¶ Output the first
nelements of a vector to a stream,os.No trailing space is output after the last element, and an endline is output only if
endlineis set totrue. If the parameternis zero, this function silently does nothing.This works with any class
vec_twhich has an operator[] which returns either the value of or a reference to the ith element and the element type has its own output operator which has been defined.
-
template<class vec_t>
void o2scl::vector_out(std::ostream &os, const vec_t &v, bool endline = false)¶ Output a vector to a stream.
No trailing space is output after the last element, and an endline is output only if
endlineis set totrue. If the parameternis zero, this function silently does nothing.This works with any class
vec_twhich has an operator[] which returns either the value of or a reference to the ith element and the element type has its own output operator which has been defined.