Functions
core/vpdl/vpdt/vpdt_access.h File Reference

Overloaded functions to allow uniform API access to various field types. More...

#include <vnl/vnl_vector.h>
#include <vnl/vnl_matrix.h>
#include <vnl/vnl_vector_fixed.h>
#include <vnl/vnl_matrix_fixed.h>
#include <vpdl/vpdt/vpdt_eigen_sym_matrix.h>
#include <vcl_cassert.h>

Go to the source code of this file.

Functions

template<class T >
unsigned int vpdt_size (const vnl_vector< T > &v)
 Access the size of a vnl_vector.
template<class T >
unsigned int vpdt_size (const vnl_matrix< T > &m)
 Access the size of a square vnl_matrix.
template<class T , unsigned int n>
unsigned int vpdt_size (const vnl_vector_fixed< T, n > &)
 Access the size of a vnl_vector_fixed.
template<class T , unsigned int n>
unsigned int vpdt_size (const vnl_matrix_fixed< T, n, n > &)
 Access the size of a square vnl_matrix_fixed.
unsigned int vpdt_size (float)
 Access the size of a scalar.
unsigned int vpdt_size (double)
template<class T >
void vpdt_set_size (vnl_vector< T > &v, unsigned int s)
 Set the size of a vnl_vector.
template<class T >
void vpdt_set_size (vnl_matrix< T > &m, unsigned int s)
 Set the size of a square vnl_matrix.
template<class T >
void vpdt_set_size (T &, unsigned int)
 Default case, do nothing.
template<class T >
void vpdt_fill (vnl_vector< T > &v, const T &val)
 Fill a vnl_vector.
template<class T >
void vpdt_fill (vnl_matrix< T > &m, const T &val)
 Fill a square vnl_matrix.
template<class T , unsigned int n>
void vpdt_fill (vnl_vector_fixed< T, n > &v, const T &val)
 Fill a vnl_vector_fixed.
template<class T , unsigned int n>
void vpdt_fill (vnl_matrix_fixed< T, n, n > &m, const T &val)
 Fill a square vnl_matrix_fixed.
template<class T >
void vpdt_fill (T &v, const T &val)
 Default case, assignment.
template<class T >
T & vpdt_index (vnl_vector< T > &v, unsigned int i)
 Index into a vnl_vector.
template<class T >
const T & vpdt_index (const vnl_vector< T > &v, unsigned int i)
 Index into a vnl_vector (const).
template<class T , unsigned int n>
T & vpdt_index (vnl_vector_fixed< T, n > &v, unsigned int i)
 Index into a vnl_vector_fixed.
template<class T , unsigned int n>
const T & vpdt_index (const vnl_vector_fixed< T, n > &v, unsigned int i)
 Index into a vnl_vector_fixed (const).
template<class T >
T & vpdt_index (T &v, unsigned int)
 Index into a scalar.
template<class T >
const T & vpdt_index (const T &v, unsigned int)
 Index into a scalar (const).
template<class T >
T & vpdt_index (vnl_matrix< T > &v, unsigned int i, unsigned int j)
 Index into a vnl_matrix.
template<class T >
const T & vpdt_index (const vnl_matrix< T > &v, unsigned int i, unsigned int j)
 Index into a vnl_matrix (const).
template<class T , unsigned int n>
T & vpdt_index (vnl_matrix_fixed< T, n, n > &v, unsigned int i, unsigned int j)
 Index into a vnl_matrix_fixed.
template<class T , unsigned int n>
const T & vpdt_index (const vnl_matrix_fixed< T, n, n > &v, unsigned int i, unsigned int j)
 Index into a vnl_matrix_fixed (const).
template<class T >
T & vpdt_index (T &v, unsigned int, unsigned int)
 Index into a scalar.
template<class T >
const T & vpdt_index (const T &v, unsigned int, unsigned int)
 Index into a scalar (const).
float outer_product (const float &v1, const float &v2)
 vnl defines outer_product for vectors but not scalars.
double outer_product (const double &v1, const double &v2)

Detailed Description

Overloaded functions to allow uniform API access to various field types.

Author:
Matthew Leotta
Date:
March 5, 2009

Since the same template code may apply to both scalars and vectors, we need a standard set of functions to treat scalars as a 1-d vector. Likewise, we need uniform access to variable and fixed size vectors. This includes functions to access dimension, set dimension, access elements, and more.

    Modifications
     <None yet>
   

Definition in file vpdt_access.h.


Function Documentation

float outer_product ( const float &  v1,
const float &  v2 
) [inline]

vnl defines outer_product for vectors but not scalars.

Definition at line 146 of file vpdt_access.h.

double outer_product ( const double &  v1,
const double &  v2 
) [inline]

Definition at line 147 of file vpdt_access.h.

template<class T >
void vpdt_fill ( vnl_vector< T > &  v,
const T &  val 
) [inline]

Fill a vnl_vector.

Definition at line 75 of file vpdt_access.h.

template<class T >
void vpdt_fill ( vnl_matrix< T > &  m,
const T &  val 
) [inline]

Fill a square vnl_matrix.

Definition at line 79 of file vpdt_access.h.

template<class T , unsigned int n>
void vpdt_fill ( vnl_vector_fixed< T, n > &  v,
const T &  val 
) [inline]

Fill a vnl_vector_fixed.

Definition at line 83 of file vpdt_access.h.

template<class T , unsigned int n>
void vpdt_fill ( vnl_matrix_fixed< T, n, n > &  m,
const T &  val 
) [inline]

Fill a square vnl_matrix_fixed.

Definition at line 87 of file vpdt_access.h.

template<class T >
void vpdt_fill ( T &  v,
const T &  val 
) [inline]

Default case, assignment.

Definition at line 91 of file vpdt_access.h.

template<class T >
T& vpdt_index ( vnl_vector< T > &  v,
unsigned int  i 
) [inline]

Index into a vnl_vector.

Definition at line 98 of file vpdt_access.h.

template<class T >
const T& vpdt_index ( const vnl_vector< T > &  v,
unsigned int  i 
) [inline]

Index into a vnl_vector (const).

Definition at line 101 of file vpdt_access.h.

template<class T , unsigned int n>
T& vpdt_index ( vnl_vector_fixed< T, n > &  v,
unsigned int  i 
) [inline]

Index into a vnl_vector_fixed.

Definition at line 105 of file vpdt_access.h.

template<class T , unsigned int n>
const T& vpdt_index ( const vnl_vector_fixed< T, n > &  v,
unsigned int  i 
) [inline]

Index into a vnl_vector_fixed (const).

Definition at line 108 of file vpdt_access.h.

template<class T >
T& vpdt_index ( T &  v,
unsigned  int 
) [inline]

Index into a scalar.

Definition at line 112 of file vpdt_access.h.

template<class T >
const T& vpdt_index ( const T &  v,
unsigned  int 
) [inline]

Index into a scalar (const).

Definition at line 115 of file vpdt_access.h.

template<class T >
T& vpdt_index ( vnl_matrix< T > &  v,
unsigned int  i,
unsigned int  j 
) [inline]

Index into a vnl_matrix.

Definition at line 122 of file vpdt_access.h.

template<class T >
const T& vpdt_index ( const vnl_matrix< T > &  v,
unsigned int  i,
unsigned int  j 
) [inline]

Index into a vnl_matrix (const).

Definition at line 125 of file vpdt_access.h.

template<class T , unsigned int n>
T& vpdt_index ( vnl_matrix_fixed< T, n, n > &  v,
unsigned int  i,
unsigned int  j 
) [inline]

Index into a vnl_matrix_fixed.

Definition at line 129 of file vpdt_access.h.

template<class T , unsigned int n>
const T& vpdt_index ( const vnl_matrix_fixed< T, n, n > &  v,
unsigned int  i,
unsigned int  j 
) [inline]

Index into a vnl_matrix_fixed (const).

Definition at line 132 of file vpdt_access.h.

template<class T >
T& vpdt_index ( T &  v,
unsigned  int,
unsigned  int 
) [inline]

Index into a scalar.

Definition at line 136 of file vpdt_access.h.

template<class T >
const T& vpdt_index ( const T &  v,
unsigned  int,
unsigned  int 
) [inline]

Index into a scalar (const).

Definition at line 139 of file vpdt_access.h.

template<class T >
void vpdt_set_size ( vnl_vector< T > &  v,
unsigned int  s 
) [inline]

Set the size of a vnl_vector.

Definition at line 60 of file vpdt_access.h.

template<class T >
void vpdt_set_size ( vnl_matrix< T > &  m,
unsigned int  s 
) [inline]

Set the size of a square vnl_matrix.

Definition at line 64 of file vpdt_access.h.

template<class T >
void vpdt_set_size ( T &  ,
unsigned  int 
) [inline]

Default case, do nothing.

Definition at line 68 of file vpdt_access.h.

template<class T >
unsigned int vpdt_size ( const vnl_vector< T > &  v) [inline]

Access the size of a vnl_vector.

Definition at line 33 of file vpdt_access.h.

template<class T >
unsigned int vpdt_size ( const vnl_matrix< T > &  m) [inline]

Access the size of a square vnl_matrix.

Definition at line 37 of file vpdt_access.h.

template<class T , unsigned int n>
unsigned int vpdt_size ( const vnl_vector_fixed< T, n > &  ) [inline]

Access the size of a vnl_vector_fixed.

Definition at line 45 of file vpdt_access.h.

template<class T , unsigned int n>
unsigned int vpdt_size ( const vnl_matrix_fixed< T, n, n > &  ) [inline]

Access the size of a square vnl_matrix_fixed.

Definition at line 49 of file vpdt_access.h.

unsigned int vpdt_size ( float  ) [inline]

Access the size of a scalar.

Definition at line 52 of file vpdt_access.h.

unsigned int vpdt_size ( double  ) [inline]

Definition at line 53 of file vpdt_access.h.