Macros | Functions
vnl_matops.cxx File Reference
#include "vnl_matops.h"
#include <cassert>

Go to the source code of this file.

Macros

#define implement_converters(U, V)
 

Functions

 implement_converters (double, float) implement_converters(float
 

Detailed Description

Author
Andrew W. Fitzgibbon, Oxford RRG
Date
05 Aug 96

Definition in file vnl_matops.cxx.

Macro Definition Documentation

◆ implement_converters

#define implement_converters (   U,
 
)
Value:
vnl_matrix<U> make_matrix_ ## U(vnl_matrix<V> const& M) \
{ \
unsigned m = M.rows(); \
unsigned n = M.columns(); \
vnl_matrix<U> ret(m, n); \
for (unsigned i = 0; i < m; ++i) \
for (unsigned j = 0; j < n; ++j) \
ret(i,j) = static_cast<U>(M(i,j)); \
return ret; \
} \
\
vnl_vector<U> make_vector_ ## U(vnl_vector<V> const& v) \
{ \
unsigned n = v.size(); \
vnl_vector<U> ret(n); \
for (unsigned i = 0; i < n; ++i) \
ret[i] = static_cast<U>(v[i]); \
return ret; \
} \
#define m
Definition: vnl_vector.h:43
#define v
Definition: vnl_vector.h:42
An ordinary mathematical matrix.
Definition: vnl_adjugate.h:22
Mathematical vector class, templated by type of element.
Definition: vnl_fwd.h:16

Definition at line 63 of file vnl_matops.cxx.

Function Documentation

◆ implement_converters()

implement_converters ( double  ,
float   
)