Defines | Functions
core/vnl/vnl_matops.cxx File Reference
#include "vnl_matops.h"
#include <vcl_cassert.h>

Go to the source code of this file.

Defines

#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.


Define Documentation

#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;                                               \
}                                                           \

Definition at line 66 of file vnl_matops.cxx.


Function Documentation

implement_converters ( double  ,
float   
)