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

Go to the source code of this file.

Macros

#define WANT_MATH
 
#define REPORT   {}
 
#define MONITOR(what, store, storage)   {}
 

Functions

Real DotProd (const MatrixRowCol &mrc1, const MatrixRowCol &mrc2)
 

Macro Definition Documentation

◆ MONITOR

#define MONITOR (   what,
  store,
  storage 
)    {}

Definition at line 26 of file newmat2.cpp.

◆ REPORT

#define REPORT   {}

◆ WANT_MATH

#define WANT_MATH

Definition at line 5 of file newmat2.cpp.

Function Documentation

◆ DotProd()

Real DotProd ( const MatrixRowCol mrc1,
const MatrixRowCol mrc2 
)

Definition at line 74 of file newmat2.cpp.

References MatrixRowCol::data, REPORT, MatrixRowCol::skip, and MatrixRowCol::storage.

75 {
76  REPORT // not accessed
77  int f = mrc1.skip; int f2 = mrc2.skip;
78  int l = f + mrc1.storage; int l2 = f2 + mrc2.storage;
79  if (f < f2) f = f2; if (l > l2) l = l2; l -= f;
80  if (l<=0) return 0.0;
81 
82  Real* el1=mrc1.data+(f-mrc1.skip); Real* el2=mrc2.data+(f-mrc2.skip);
83  Real sum = 0.0;
84  while (l--) sum += *el1++ * *el2++;
85  return sum;
86 }
double Real
Definition: include.h:57
#define REPORT
Definition: newmat2.cpp:21
Real * data
Definition: newmatrc.h:43
int storage
Definition: newmatrc.h:40