OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
Macros | Functions
newmat9.cpp File Reference
#include <ossim/matrix/include.h>
#include <ossim/matrix/newmat.h>
#include <ossim/matrix/newmatio.h>
#include <ossim/matrix/newmatrc.h>

Go to the source code of this file.

Macros

#define WANT_STREAM
 
#define REPORT   {}
 
#define ios_format_flags   long
 

Functions

ostream & operator<< (ostream &s, const BaseMatrix &X)
 
ostream & operator<< (ostream &s, const GeneralMatrix &X)
 

Macro Definition Documentation

◆ ios_format_flags

#define ios_format_flags   long

Definition at line 28 of file newmat9.cpp.

◆ REPORT

#define REPORT   {}

Definition at line 23 of file newmat9.cpp.

◆ WANT_STREAM

#define WANT_STREAM

Definition at line 6 of file newmat9.cpp.

Function Documentation

◆ operator<<() [1/2]

ostream& operator<< ( ostream &  s,
const BaseMatrix X 
)

Definition at line 31 of file newmat9.cpp.

References GeneralMatrix::Evaluate(), and GeneralMatrix::tDelete().

32 {
33  GeneralMatrix* gm = ((BaseMatrix&)X).Evaluate(); operator<<(s, *gm);
34  gm->tDelete(); return s;
35 }
void tDelete()
Definition: newmat4.cpp:535
ostream & operator<<(ostream &s, const BaseMatrix &X)
Definition: newmat9.cpp:31
GeneralMatrix * Evaluate(MatrixType mt=MatrixTypeUnSp)
Definition: newmat5.cpp:79

◆ operator<<() [2/2]

ostream& operator<< ( ostream &  s,
const GeneralMatrix X 
)

Definition at line 38 of file newmat9.cpp.

References MatrixRowCol::data, LoadOnEntry, MatrixRow::Next(), GeneralMatrix::Nrows(), MatrixRowCol::skip, and MatrixRowCol::storage.

39 {
41  int w = s.width(); int nr = X.Nrows();
42  std::ios_base::fmtflags f = s.flags();
43  s.setf(ios::fixed, ios::floatfield);
44  for (int i=1; i<=nr; i++)
45  {
46  int skip = mr.skip; int storage = mr.storage;
47  Real* store = mr.data; skip *= w+1;
48  while (skip--) s << " ";
49  while (storage--) { s.width(w); s << *store++ << " "; }
50 // while (storage--) s << setw(w) << *store++ << " ";
51  mr.Next(); s << "\n";
52  }
53  s << flush; s.flags(f);
54  return s;
55 }
double Real
Definition: include.h:57
int Nrows() const
Definition: newmat.h:430