]>
Dogcows Code - chaz/yoink/blob - cml/matrix/matrix_print.h
1 /* -*- C++ -*- ------------------------------------------------------------
3 Copyright (c) 2007 Jesse Anders and Demian Nave http://cmldev.net/
5 The Configurable Math Library (CML) is distributed under the terms of the
6 Boost Software License, v1.0 (see cml/LICENSE for details).
8 *-----------------------------------------------------------------------*/
13 #ifndef matrix_print_h
14 #define matrix_print_h
20 /** Output a matrix to a std::ostream. */
21 template<typename E
, class AT
, typename BO
, class L
> inline std::ostream
&
22 operator<<(std::ostream
& os
, const matrix
<E
,AT
,BO
,L
>& m
)
24 for(size_t i
= 0; i
< m
.rows(); ++i
) {
26 for(size_t j
= 0; j
< m
.cols(); ++j
) {
30 if (i
!= m
.rows()-1) {
37 /** Output a matrix expression to a std::ostream. */
38 template< class XprT
> inline std::ostream
&
39 operator<<(std::ostream
& os
, const et::MatrixXpr
<XprT
>& m
)
41 for(size_t i
= 0; i
< m
.rows(); ++i
) {
43 for(size_t j
= 0; j
< m
.cols(); ++j
) {
47 if (i
!= m
.rows()-1) {
58 // -------------------------------------------------------------------------
This page took 0.036313 seconds and 4 git commands to generate.