#include "../units/scalar_unit.hpp"
#include <iostream>
#include <sstream>
#include <vector>
Go to the source code of this file.
|
namespace | scifir |
| The namespace scifir contains all scifir-units, excepting the string literals, which are outside.
|
|
|
template<typename T , int M, int N> |
bool | operator== (const scifir::matrix< T, M, N > &x, const scifir::matrix< T, M, N > &y) |
|
template<typename T , int M, int N> |
bool | operator!= (const scifir::matrix< T, M, N > &x, const scifir::matrix< T, M, N > &y) |
|
template<typename T , int M, int N> |
ostream & | operator<< (ostream &os, const scifir::matrix< T, M, N > &x) |
|
◆ operator!=()
template<typename T , int M, int N>
Definition at line 275 of file matrix.hpp.
276{
277 return !(x == y);
278}
◆ operator<<()
template<typename T , int M, int N>
ostream & operator<< |
( |
ostream & |
os, |
|
|
const scifir::matrix< T, M, N > & |
x |
|
) |
| |
Definition at line 281 of file matrix.hpp.
282{
283 ostringstream output;
284 output << "[";
285 for(int i = 1; i <= x.row_size(); i++)
286 {
287 for(int j = 1; j <= x.column_size(); j++)
288 {
289 output << x(i, j);
290 if(j < x.column_size())
291 {
292 output << ", ";
293 }
294 }
295 if(i < x.row_size())
296 {
297 output << endl;
298 }
299 }
300 output << "]";
301 return os << output.str();
302}
◆ operator==()
template<typename T , int M, int N>
Definition at line 259 of file matrix.hpp.
260{
261 for(int i = 0; i < x.row_size(); i++)
262 {
263 for(int j = 0; j < x.column_size(); j++)
264 {
265 if (x(i,j) != y(i,j))
266 {
267 return false;
268 }
269 }
270 }
271 return true;
272}