All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Matrix.h
Go to the documentation of this file.
1 //=================================================================================================
20 //=================================================================================================
21 
22 #ifndef _BLAZE_MATH_MATRIX_H_
23 #define _BLAZE_MATH_MATRIX_H_
24 
25 
26 //*************************************************************************************************
27 // Includes
28 //*************************************************************************************************
29 
30 #include <iomanip>
31 #include <ostream>
33 
34 
35 namespace blaze {
36 
37 //=================================================================================================
38 //
39 // GLOBAL OPERATORS
40 //
41 //=================================================================================================
42 
43 //*************************************************************************************************
46 template< typename MT, bool SO >
47 inline std::ostream& operator<<( std::ostream& os, const Matrix<MT,SO>& dv );
49 //*************************************************************************************************
50 
51 
52 //*************************************************************************************************
60 template< typename MT // Type of the matrix
61  , bool SO > // Storage order
62 inline std::ostream& operator<<( std::ostream& os, const Matrix<MT,SO>& m )
63 {
64  for( size_t i=0UL; i<(~m).rows(); ++i ) {
65  os << "( ";
66  for( size_t j=0UL; j<(~m).columns(); ++j ) {
67  os << std::setw(12) << (~m)(i,j) << " ";
68  }
69  os << ")\n";
70  }
71 
72  return os;
73 }
74 //*************************************************************************************************
75 
76 } // namespace blaze
77 
78 #endif