All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Matrix.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_MATRIX_H_
36 #define _BLAZE_MATH_MATRIX_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
43 #include <iomanip>
44 #include <ostream>
46 
47 
48 namespace blaze {
49 
50 //=================================================================================================
51 //
52 // GLOBAL OPERATORS
53 //
54 //=================================================================================================
55 
56 //*************************************************************************************************
59 template< typename MT, bool SO >
60 inline std::ostream& operator<<( std::ostream& os, const Matrix<MT,SO>& dv );
62 //*************************************************************************************************
63 
64 
65 //*************************************************************************************************
73 template< typename MT // Type of the matrix
74  , bool SO > // Storage order
75 inline std::ostream& operator<<( std::ostream& os, const Matrix<MT,SO>& m )
76 {
77  for( size_t i=0UL; i<(~m).rows(); ++i ) {
78  os << "( ";
79  for( size_t j=0UL; j<(~m).columns(); ++j ) {
80  os << std::setw(12) << (~m)(i,j) << " ";
81  }
82  os << ")\n";
83  }
84 
85  return os;
86 }
87 //*************************************************************************************************
88 
89 } // namespace blaze
90 
91 #endif
Header file for the Matrix base class.
size_t columns(const Matrix< MT, SO > &m)
Returns the current number of columns of the matrix.
Definition: Matrix.h:170
size_t rows(const Matrix< MT, SO > &m)
Returns the current number of rows of the matrix.
Definition: Matrix.h:154