Classes | Macros | Functions
vnl_vector.h File Reference
#include <iosfwd>
#include <vnl/vnl_error.h>
#include <vcl_compiler.h>
#include <vnl/vnl_tag.h>
#include <vnl/vnl_c_vector.h>
#include <vnl/vnl_config.h>
#include "vnl/vnl_export.h"

Go to the source code of this file.

Classes

class  vnl_vector< T >
 Mathematical vector class, templated by type of element. More...
 
class  vnl_matrix< T >
 An ordinary mathematical matrix. More...
 
class  vnl_vector< T >
 Mathematical vector class, templated by type of element. More...
 

Macros

#define v   vnl_vector<T>
 
#define m   vnl_matrix<T>
 

Functions

template<class T >
VNL_EXPORT T dot_product (v const &, v const &)
 
template<class T >
VNL_EXPORT T inner_product (v const &, v const &)
 
template<class T >
VNL_EXPORT T bracket (v const &, m const &, v const &)
 
template<class T >
VNL_EXPORT T cos_angle (v const &, v const &)
 
template<class T >
VNL_EXPORT double angle (v const &, v const &)
 
template<class T >
VNL_EXPORT m outer_product (v const &, v const &)
 
template<class T >
VNL_EXPORT v operator+ (T, v const &)
 
template<class T >
VNL_EXPORT v operator- (T, v const &)
 
template<class T >
VNL_EXPORT v operator * (T, v const &)
 
template<class T >
VNL_EXPORT v operator * (v const &, m const &)
 
template<class T >
VNL_EXPORT v element_product (v const &, v const &)
 
template<class T >
VNL_EXPORT v element_quotient (v const &, v const &)
 
template<class T >
VNL_EXPORT T vnl_vector_ssd (v const &, v const &)
 
template<class T >
VNL_EXPORT void swap (v &, v &)
 
template<class T >
vnl_vector< T > operator * (vnl_matrix< T > const &m, vnl_vector< T > const &v)
 multiply matrix and (column) vector. O(m*n). More...
 
template<class T >
vnl_vector< T > operator+ (T s, vnl_vector< T > const &v)
 add scalar and vector. O(n). More...
 
template<class T >
vnl_vector< T > operator- (T s, vnl_vector< T > const &v)
 subtract vector from scalar. O(n). More...
 
template<class T >
vnl_vector< T > operator * (T s, vnl_vector< T > const &v)
 multiply scalar and vector. O(n). More...
 
template<class T >
void swap (vnl_vector< T > &a, vnl_vector< T > &b)
 Interchange the two vectors. More...
 
template<class T >
vnl_vector_ssd (vnl_vector< T > const &v1, vnl_vector< T > const &v2)
 Euclidean Distance between two vectors. More...
 
template<class T >
VNL_EXPORT std::ostream & operator<< (std::ostream &, vnl_vector< T > const &)
 Write vector to a std::ostream. More...
 
template<class T >
VNL_EXPORT std::istream & operator>> (std::istream &, vnl_vector< T > &)
 Read vector from a std::istream. More...
 

Detailed Description

Author
Andrew W. Fitzgibbon
 Modifications
 Comments re-written by Tim Cootes, for his sins.
   Feb.2002 - Peter Vanroose - brief doxygen comment placed on single line
   Mar.2009 - Peter Vanroose - added arg_min() and arg_max()
   Oct.2010 - Peter Vanroose - mutators and setters now return *this

Definition in file vnl_vector.h.

Macro Definition Documentation

◆ m

#define m   vnl_matrix<T>

Definition at line 43 of file vnl_vector.h.

◆ v

#define v   vnl_vector<T>

Definition at line 42 of file vnl_vector.h.

Function Documentation

◆ angle()

template<class T >
VNL_EXPORT double angle ( v const &  ,
v const &   
)

◆ bracket()

template<class T >
VNL_EXPORT T bracket ( v const &  ,
m const &  ,
v const &   
)

◆ cos_angle()

template<class T >
VNL_EXPORT T cos_angle ( v const &  ,
v const &   
)

◆ dot_product()

template<class T >
VNL_EXPORT T dot_product ( v const &  ,
v const &   
)

◆ element_product()

template<class T >
VNL_EXPORT v element_product ( v const &  ,
v const &   
)

◆ element_quotient()

template<class T >
VNL_EXPORT v element_quotient ( v const &  ,
v const &   
)

◆ inner_product()

template<class T >
VNL_EXPORT T inner_product ( v const &  ,
v const &   
)

◆ operator *() [1/4]

template<class T >
VNL_EXPORT v operator * ( ,
v const &   
)

◆ operator *() [2/4]

template<class T >
VNL_EXPORT v operator * ( v const &  ,
m const &   
)

◆ operator *() [3/4]

template<class T >
vnl_vector< T > operator * ( vnl_matrix< T > const &  m,
vnl_vector< T > const &  v 
)
inline

multiply matrix and (column) vector. O(m*n).

Definition at line 442 of file vnl_vector.h.

◆ operator *() [4/4]

template<class T >
vnl_vector< T > operator * ( s,
vnl_vector< T > const &  v 
)
inline

multiply scalar and vector. O(n).

Definition at line 466 of file vnl_vector.h.

◆ operator+() [1/2]

template<class T >
VNL_EXPORT v operator+ ( ,
v const &   
)

◆ operator+() [2/2]

template<class T >
vnl_vector< T > operator+ ( s,
vnl_vector< T > const &  v 
)
inline

add scalar and vector. O(n).

Definition at line 450 of file vnl_vector.h.

◆ operator-() [1/2]

template<class T >
VNL_EXPORT v operator- ( ,
v const &   
)

◆ operator-() [2/2]

template<class T >
vnl_vector< T > operator- ( s,
vnl_vector< T > const &  v 
)
inline

subtract vector from scalar. O(n).

Definition at line 458 of file vnl_vector.h.

◆ operator<<()

template<class T >
VNL_EXPORT std::ostream & operator<< ( std::ostream &  s,
vnl_vector< T > const &  v 
)

Write vector to a std::ostream.

Write vector to a std::ostream.

Definition at line 802 of file vnl_vector.hxx.

◆ operator>>()

template<class T >
VNL_EXPORT std::istream & operator>> ( std::istream &  s,
vnl_vector< T > &  M 
)

Read vector from a std::istream.

Read vector from a std::istream.

If the vector has nonzero size on input, read that many values. Otherwise, read to EOF.

Definition at line 814 of file vnl_vector.hxx.

◆ outer_product()

template<class T >
VNL_EXPORT m outer_product ( v const &  ,
v const &   
)

◆ swap() [1/2]

template<class T >
VNL_EXPORT void swap ( v ,
v  
)

◆ swap() [2/2]

template<class T >
void swap ( vnl_vector< T > &  a,
vnl_vector< T > &  b 
)
inline

Interchange the two vectors.

Definition at line 474 of file vnl_vector.h.

◆ vnl_vector_ssd() [1/2]

template<class T >
VNL_EXPORT T vnl_vector_ssd ( v const &  ,
v const &   
)

◆ vnl_vector_ssd() [2/2]

template<class T >
T vnl_vector_ssd ( vnl_vector< T > const &  v1,
vnl_vector< T > const &  v2 
)
inline

Euclidean Distance between two vectors.

Sum of Differences squared.

Definition at line 480 of file vnl_vector.h.