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>
45 #include <blaze/math/Aliases.h>
47 
48 
49 namespace blaze {
50 
51 //=================================================================================================
52 //
53 // GLOBAL OPERATORS
54 //
55 //=================================================================================================
56 
57 //*************************************************************************************************
60 template< typename MT, bool SO >
61 inline std::ostream& operator<<( std::ostream& os, const Matrix<MT,SO>& m );
63 //*************************************************************************************************
64 
65 
66 //*************************************************************************************************
74 template< typename MT // Type of the matrix
75  , bool SO > // Storage order
76 inline std::ostream& operator<<( std::ostream& os, const Matrix<MT,SO>& m )
77 {
78  CompositeType_<MT> tmp( ~m );
79 
80  for( size_t i=0UL; i<tmp.rows(); ++i ) {
81  os << "( ";
82  for( size_t j=0UL; j<tmp.columns(); ++j ) {
83  os << std::setw(12) << tmp(i,j) << " ";
84  }
85  os << ")\n";
86  }
87 
88  return os;
89 }
90 //*************************************************************************************************
91 
92 } // namespace blaze
93 
94 #endif
Header file for auxiliary alias declarations.
typename T::CompositeType CompositeType_
Alias declaration for nested CompositeType type definitions.The CompositeType_ alias declaration prov...
Definition: Aliases.h:83
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
Header file for the Matrix base class.