Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

vnl_vector< T > Class Template Reference

#include <vnl_vector.h>

Inheritance diagram for vnl_vector:

Inheritance graph
[legend]
Collaboration diagram for vnl_vector< T >:

Collaboration graph
[legend]
List of all members.

Public Types

typedef T element_type
typedef T * iterator
typedef T const * const_iterator
typedef vnl_c_vector< T
>::abs_t 
abs_t

Public Methods

 vnl_vector ()
 vnl_vector (unsigned len)
 vnl_vector (unsigned len, T const &v0)
 vnl_vector (unsigned len, int n, T const values[])
 vnl_vector (T const &, T const &, T const &)
 vnl_vector (T const *data_block, unsigned int n)
 vnl_vector (vnl_vector< T > const &)
 vnl_vector (vnl_vector< T > &that, vnl_tag_grab)
 vnl_vector (vnl_vector< T > const &, vnl_vector< T > const &, const vnl_tag_add &)
 vnl_vector (vnl_vector< T > const &, vnl_vector< T > const &, const vnl_tag_sub &)
 vnl_vector (vnl_vector< T > const &, T, const vnl_tag_mul &)
 vnl_vector (vnl_vector< T > const &, T, const vnl_tag_div &)
 vnl_vector (vnl_vector< T > const &, T, const vnl_tag_add &)
 vnl_vector (vnl_vector< T > const &, T, const vnl_tag_sub &)
 vnl_vector (vnl_matrix< T > const &, vnl_vector< T > const &, const vnl_tag_mul &)
 vnl_vector (vnl_vector< T > const &, vnl_matrix< T > const &, const vnl_tag_mul &)
 ~vnl_vector ()
unsigned size () const
void put (unsigned int i, T const &)
get (unsigned int i) const
void fill (T const &v)
void copy_in (T const *ptr)
void copy_out (T *) const
void set (T const *ptr)
T & operator() (unsigned int i)
T const & operator() (unsigned int i) const
T & operator[] (unsigned int i)
T const & operator[] (unsigned int i) const
vnl_vector< T > & operator= (T const &v)
vnl_vector< T > & operator= (vnl_vector< T > const &rhs)
vnl_vector< T > & operator+= (T)
vnl_vector< T > & operator-= (T value)
vnl_vector< T > & operator *= (T)
vnl_vector< T > & operator/= (T)
vnl_vector< T > & operator+= (vnl_vector< T > const &rhs)
vnl_vector< T > & operator-= (vnl_vector< T > const &rhs)
vnl_vector< T > & pre_multiply (vnl_matrix< T > const &M)
vnl_vector< T > & post_multiply (vnl_matrix< T > const &M)
vnl_vector< T > & operator *= (vnl_matrix< T > const &m)
vnl_vector< T > operator+ () const
vnl_vector< T > operator- () const
vnl_vector< T > operator+ (T v) const
vnl_vector< T > operator- (T v) const
vnl_vector< T > operator * (T v) const
vnl_vector< T > operator/ (T v) const
vnl_vector< T > operator+ (vnl_vector< T > const &v) const
vnl_vector< T > operator- (vnl_vector< T > const &v) const
vnl_vector< T > operator * (vnl_matrix< T > const &M) const
T const * data_block () const
T * data_block ()
iterator begin ()
iterator end ()
const_iterator begin () const
const_iterator end () const
vnl_vector< T > apply (T(*f)(T)) const
vnl_vector< T > apply (T(*f)(T const &)) const
vnl_vector< T > extract (unsigned int len, unsigned int start=0) const
vnl_vector< T > & update (vnl_vector< T > const &, unsigned int start=0)
abs_t squared_magnitude () const
abs_t magnitude () const
abs_t one_norm () const
abs_t two_norm () const
abs_t inf_norm () const
abs_t rms () const
min_value () const
max_value () const
mean () const
vnl_vector< T > & normalize ()
void flip ()
void swap (vnl_vector< T > &that)
T & x () const
T & y () const
T & z () const
T & t () const
void set_x (T const &xx)
void set_y (T const &yy)
void set_z (T const &zz)
void set_t (T const &tt)
void assert_size (unsigned sz) const
void assert_finite () const
bool is_finite () const
bool operator_eq (vnl_vector< T > const &v) const
bool operator== (vnl_vector< T > const &that) const
bool operator!= (vnl_vector< T > const &that) const
bool resize (unsigned n)
void clear ()
bool read_ascii (vcl_istream &s)

Static Public Methods

vnl_vector< T > read (vcl_istream &s)

Protected Methods

void destroy ()

Static Protected Methods

void inline_function_tickler ()

Protected Attributes

unsigned num_elmts
T * data

Friends

class vnl_matrix< T >

Detailed Description

template<class T>
class vnl_vector< T >

Mathematical vector class, templated by type of element. The vnl_vector<T> class implements one-dimensional arithmetic vectors to be used with the vnl_matrix<T> class. vnl_vector<T> has size fixed by constructor time or changed by assignment operator. For faster, non-mallocing vectors with size known at compile time, use vnl_vector_fixed* or vnl_T_n (e.g. vnl_double_3).

NOTE: Vectors are indexed from zero! Thus valid elements are [0,size()-1].

Definition at line 57 of file vnl_vector.h.


Member Typedef Documentation

template<class T>
typedef vnl_c_vector<T>::abs_t vnl_vector< T >::abs_t
 

Definition at line 282 of file vnl_vector.h.

template<class T>
typedef T const* vnl_vector< T >::const_iterator
 

Const iterator type.

Definition at line 258 of file vnl_vector.h.

template<class T>
typedef T vnl_vector< T >::element_type
 

Type defs for iterators.

Definition at line 244 of file vnl_vector.h.

template<class T>
typedef T* vnl_vector< T >::iterator
 

Type defs for iterators.

Definition at line 247 of file vnl_vector.h.

Referenced by vnl_vector< TVector >::operator *=(), and vnl_vector< TVector >::operator+().


Constructor & Destructor Documentation

template<class T>
vnl_vector< T >::vnl_vector   [inline]
 

Creates an empty vector.\ O(1).

Definition at line 63 of file vnl_vector.h.

template<class T>
vnl_vector< T >::vnl_vector unsigned    len
 

Creates vector containing n elements. Elements are not initialized

template<class T>
vnl_vector< T >::vnl_vector unsigned    len,
T const &    v0
 

Creates vector of len elements, all sest to v0.

template<class T>
vnl_vector< T >::vnl_vector unsigned    len,
int    n,
T const    values[]
 

Creates a vector of specified length and initialize first n elements with values.\ O(n).

template<class T>
vnl_vector< T >::vnl_vector T const &   ,
T const &   ,
T const &   
 

Creates a vector of length 3 and initializes with the arguments, x,y,z.

template<class T>
vnl_vector< T >::vnl_vector T const *    data_block,
unsigned int    n
 

Create n element vector and copy data from data_block.

template<class T>
vnl_vector< T >::vnl_vector vnl_vector< T > const &   
 

Copy constructor.

template<class T>
vnl_vector< T >::vnl_vector vnl_vector< T > &    that,
vnl_tag_grab   
[inline]
 

Takes responsibility for data in vector that. that is emptied, this now uses that's data

Definition at line 93 of file vnl_vector.h.

template<class T>
vnl_vector< T >::vnl_vector vnl_vector< T > const &   ,
vnl_vector< T > const &   ,
const vnl_tag_add  
 

template<class T>
vnl_vector< T >::vnl_vector vnl_vector< T > const &   ,
vnl_vector< T > const &   ,
const vnl_tag_sub  
 

template<class T>
vnl_vector< T >::vnl_vector vnl_vector< T > const &   ,
 ,
const vnl_tag_mul  
 

template<class T>
vnl_vector< T >::vnl_vector vnl_vector< T > const &   ,
 ,
const vnl_tag_div  
 

template<class T>
vnl_vector< T >::vnl_vector vnl_vector< T > const &   ,
 ,
const vnl_tag_add  
 

template<class T>
vnl_vector< T >::vnl_vector vnl_vector< T > const &   ,
 ,
const vnl_tag_sub  
 

template<class T>
vnl_vector< T >::vnl_vector vnl_matrix< T > const &   ,
vnl_vector< T > const &   ,
const vnl_tag_mul  
 

template<class T>
vnl_vector< T >::vnl_vector vnl_vector< T > const &   ,
vnl_matrix< T > const &   ,
const vnl_tag_mul  
 

template<class T>
vnl_vector< T >::~vnl_vector   [inline]
 

Destructor.

Definition at line 114 of file vnl_vector.h.


Member Function Documentation

template<class T>
vnl_vector<T> vnl_vector< T >::apply T(*    f)(T const &) const
 

Applies function to elements.

template<class T>
vnl_vector<T> vnl_vector< T >::apply T(*    f)(T) const
 

Applies function to elements.

template<class T>
void vnl_vector< T >::assert_finite   const
 

Check that this is finite if not, abort();.

template<class T>
void vnl_vector< T >::assert_size unsigned    sz const
 

Check that size()==sz - if not, abort();.

template<class T>
const_iterator vnl_vector< T >::begin   const [inline]
 

Iterator pointing to start of data.

Definition at line 261 of file vnl_vector.h.

template<class T>
iterator vnl_vector< T >::begin   [inline]
 

Iterator pointing to start of data.

Definition at line 250 of file vnl_vector.h.

Referenced by vnl_vector< TVector >::begin(), vnl_vector< TVector >::data_block(), and vnl_vector< TVector >::end().

template<class T>
void vnl_vector< T >::clear  
 

Make the vector as if it had been default-constructed.

template<class T>
void vnl_vector< T >::copy_in T const *    ptr
 

Sets elements to ptr[i]. Note: ptr[i] must be valid for i=0..size()-1

template<class T>
void vnl_vector< T >::copy_out T *    const
 

Copy elements to ptr[i]. Note: ptr[i] must be valid for i=0..size()-1

template<class T>
T* vnl_vector< T >::data_block   [inline]
 

Access the contiguous block storing the elements in the vector.\ O(1). data_block()[0] is the first element of the vector

Definition at line 240 of file vnl_vector.h.

template<class T>
T const* vnl_vector< T >::data_block   const [inline]
 

Access the contiguous block storing the elements in the vector.\ O(1). data_block()[0] is the first element of the vector

Definition at line 235 of file vnl_vector.h.

Referenced by vnl_vector< TVector >::vnl_vector().

template<class T>
void vnl_vector< T >::destroy   [protected]
 

template<class T>
const_iterator vnl_vector< T >::end   const [inline]
 

Iterator pointing to element beyond end of data.

Definition at line 264 of file vnl_vector.h.

template<class T>
iterator vnl_vector< T >::end   [inline]
 

Iterator pointing to element beyond end of data.

Definition at line 254 of file vnl_vector.h.

template<class T>
vnl_vector<T> vnl_vector< T >::extract unsigned int    len,
unsigned int    start = 0
const
 

Returns a subvector specified by the start index and length.\ O(n).

Referenced by vnl_quaternion< T >::x().

template<class T>
void vnl_vector< T >::fill T const &    v
 

Set all values to v.

template<class T>
void vnl_vector< T >::flip  
 

Reverse the order of the elements. Element i swaps with element size()-1-i

template<class T>
T vnl_vector< T >::get unsigned int    i const [inline]
 

get value at element i.

Definition at line 444 of file vnl_vector.h.

Referenced by vnl_quaternion< T >::y().

template<class T>
abs_t vnl_vector< T >::inf_norm   const [inline]
 

Return largest absolute element value.

Definition at line 302 of file vnl_vector.h.

template<class T>
void vnl_vector< T >::inline_function_tickler   [static, protected]
 

template<class T>
bool vnl_vector< T >::is_finite   const
 

Return true if its finite.

template<class T>
abs_t vnl_vector< T >::magnitude   const [inline]
 

Return magnitude (length) of vector.

Definition at line 290 of file vnl_vector.h.

template<class T>
T vnl_vector< T >::max_value   const [inline]
 

Largest value.

Definition at line 314 of file vnl_vector.h.

template<class T>
T vnl_vector< T >::mean   const [inline]
 

Mean of values in vector.

Definition at line 318 of file vnl_vector.h.

template<class T>
T vnl_vector< T >::min_value   const [inline]
 

Smallest value.

Definition at line 310 of file vnl_vector.h.

template<class T>
vnl_vector<T>& vnl_vector< T >::normalize   [inline]
 

Normalise by dividing through by the magnitude.

Reimplemented in vnl_vector_fixed< T, n >, vnl_vector_fixed< T, 3 >, vnl_vector_fixed< T, VEstimatorDimension >, vnl_vector_fixed< TScalarType, NDimensions >, vnl_vector_fixed< double, NDimensions >, vnl_vector_fixed< TScalarType, 4 >, vnl_vector_fixed< TVector, TVectorDimension >, and vnl_vector_fixed< T, 4 >.

Definition at line 322 of file vnl_vector.h.

template<class T>
abs_t vnl_vector< T >::one_norm   const [inline]
 

Return sum of absolute values of the elements.

Definition at line 294 of file vnl_vector.h.

template<class T>
vnl_vector<T> vnl_vector< T >::operator * vnl_matrix< T > const &    M const [inline]
 

Definition at line 228 of file vnl_vector.h.

template<class T>
vnl_vector<T> vnl_vector< T >::operator *   v const [inline]
 

Reimplemented in vnl_vector_fixed< T, n >, vnl_vector_fixed< T, 3 >, vnl_vector_fixed< T, VEstimatorDimension >, vnl_vector_fixed< TScalarType, NDimensions >, vnl_vector_fixed< double, NDimensions >, vnl_vector_fixed< TScalarType, 4 >, vnl_vector_fixed< TVector, TVectorDimension >, and vnl_vector_fixed< T, 4 >.

Definition at line 223 of file vnl_vector.h.

template<class T>
vnl_vector<T>& vnl_vector< T >::operator *= vnl_matrix< T > const &    m [inline]
 

*this = (*this)*M where M is a suitable matrix. this is treated as a row vector

Reimplemented in vnl_vector_fixed< T, n >, vnl_vector_fixed< T, 3 >, vnl_vector_fixed< T, VEstimatorDimension >, vnl_vector_fixed< TScalarType, NDimensions >, vnl_vector_fixed< double, NDimensions >, vnl_vector_fixed< TScalarType, 4 >, vnl_vector_fixed< TVector, TVectorDimension >, and vnl_vector_fixed< T, 4 >.

Definition at line 207 of file vnl_vector.h.

template<class T>
vnl_vector<T>& vnl_vector< T >::operator *=  
 

Multiply all elements by scalar.

Reimplemented in vnl_vector_fixed< T, n >, vnl_vector_fixed< T, 3 >, vnl_vector_fixed< T, VEstimatorDimension >, vnl_vector_fixed< TScalarType, NDimensions >, vnl_vector_fixed< double, NDimensions >, vnl_vector_fixed< TScalarType, 4 >, vnl_vector_fixed< TVector, TVectorDimension >, and vnl_vector_fixed< T, 4 >.

template<class T>
bool vnl_vector< T >::operator!= vnl_vector< T > const &    that const [inline]
 

Inequality test.

Definition at line 382 of file vnl_vector.h.

template<class T>
T const& vnl_vector< T >::operator() unsigned int    i const [inline]
 

Return reference to the element at specified index.\ No range checking.

Definition at line 153 of file vnl_vector.h.

template<class T>
T& vnl_vector< T >::operator() unsigned int    i [inline]
 

Return reference to the element at specified index.\ No range checking.

Definition at line 150 of file vnl_vector.h.

Referenced by vnl_quaternion< T >::r(), vnl_quaternion< T >::vnl_quaternion(), vnl_quaternion< T >::x(), and vnl_quaternion< T >::y().

template<class T>
vnl_vector<T> vnl_vector< T >::operator+ vnl_vector< T > const &    v const [inline]
 

Reimplemented in vnl_vector_fixed< T, n >, vnl_vector_fixed< T, 3 >, vnl_vector_fixed< T, VEstimatorDimension >, vnl_vector_fixed< TScalarType, NDimensions >, vnl_vector_fixed< double, NDimensions >, vnl_vector_fixed< TScalarType, 4 >, vnl_vector_fixed< TVector, TVectorDimension >, and vnl_vector_fixed< T, 4 >.

Definition at line 226 of file vnl_vector.h.

template<class T>
vnl_vector<T> vnl_vector< T >::operator+   v const [inline]
 

Reimplemented in vnl_vector_fixed< T, n >, vnl_vector_fixed< T, 3 >, vnl_vector_fixed< T, VEstimatorDimension >, vnl_vector_fixed< TScalarType, NDimensions >, vnl_vector_fixed< double, NDimensions >, vnl_vector_fixed< TScalarType, 4 >, vnl_vector_fixed< TVector, TVectorDimension >, and vnl_vector_fixed< T, 4 >.

Definition at line 221 of file vnl_vector.h.

template<class T>
vnl_vector<T> vnl_vector< T >::operator+   const [inline]
 

Unary plus operator. Return new vector = (*this)

Definition at line 213 of file vnl_vector.h.

template<class T>
vnl_vector<T>& vnl_vector< T >::operator+= vnl_vector< T > const &    rhs
 

Add rhs to this and return *this.

Reimplemented in vnl_vector_fixed< T, n >, vnl_vector_fixed< T, 3 >, vnl_vector_fixed< T, VEstimatorDimension >, vnl_vector_fixed< TScalarType, NDimensions >, vnl_vector_fixed< double, NDimensions >, vnl_vector_fixed< TScalarType, 4 >, vnl_vector_fixed< TVector, TVectorDimension >, and vnl_vector_fixed< T, 4 >.

template<class T>
vnl_vector<T>& vnl_vector< T >::operator+=  
 

Add scalar value to all elements.

Reimplemented in vnl_vector_fixed< T, n >, vnl_vector_fixed< T, 3 >, vnl_vector_fixed< T, VEstimatorDimension >, vnl_vector_fixed< TScalarType, NDimensions >, vnl_vector_fixed< double, NDimensions >, vnl_vector_fixed< TScalarType, 4 >, vnl_vector_fixed< TVector, TVectorDimension >, and vnl_vector_fixed< T, 4 >.

Referenced by vnl_vector_fixed< T, 4 >::operator+=(), and vnl_vector_fixed< T, 4 >::operator=().

template<class T>
vnl_vector<T> vnl_vector< T >::operator- vnl_vector< T > const &    v const [inline]
 

Reimplemented in vnl_vector_fixed< T, n >, vnl_vector_fixed< T, 3 >, vnl_vector_fixed< T, VEstimatorDimension >, vnl_vector_fixed< TScalarType, NDimensions >, vnl_vector_fixed< double, NDimensions >, vnl_vector_fixed< TScalarType, 4 >, vnl_vector_fixed< TVector, TVectorDimension >, and vnl_vector_fixed< T, 4 >.

Definition at line 227 of file vnl_vector.h.

template<class T>
vnl_vector<T> vnl_vector< T >::operator-   v const [inline]
 

Reimplemented in vnl_vector_fixed< T, n >, vnl_vector_fixed< T, 3 >, vnl_vector_fixed< T, VEstimatorDimension >, vnl_vector_fixed< TScalarType, NDimensions >, vnl_vector_fixed< double, NDimensions >, vnl_vector_fixed< TScalarType, 4 >, vnl_vector_fixed< TVector, TVectorDimension >, and vnl_vector_fixed< T, 4 >.

Definition at line 222 of file vnl_vector.h.

template<class T>
vnl_vector<T> vnl_vector< T >::operator-   const
 

Unary mnus operator. Return new vector = -1*(*this)

Reimplemented in vnl_vector_fixed< T, n >, vnl_vector_fixed< T, 3 >, vnl_vector_fixed< T, VEstimatorDimension >, vnl_vector_fixed< TScalarType, NDimensions >, vnl_vector_fixed< double, NDimensions >, vnl_vector_fixed< TScalarType, 4 >, vnl_vector_fixed< TVector, TVectorDimension >, and vnl_vector_fixed< T, 4 >.

template<class T>
vnl_vector<T>& vnl_vector< T >::operator-= vnl_vector< T > const &    rhs
 

Subtract rhs from this and return *this.

Reimplemented in vnl_vector_fixed< T, n >, vnl_vector_fixed< T, 3 >, vnl_vector_fixed< T, VEstimatorDimension >, vnl_vector_fixed< TScalarType, NDimensions >, vnl_vector_fixed< double, NDimensions >, vnl_vector_fixed< TScalarType, 4 >, vnl_vector_fixed< TVector, TVectorDimension >, and vnl_vector_fixed< T, 4 >.

template<class T>
vnl_vector<T>& vnl_vector< T >::operator-=   value [inline]
 

Subtract scalar value from all elements.

Reimplemented in vnl_vector_fixed< T, n >, vnl_vector_fixed< T, 3 >, vnl_vector_fixed< T, VEstimatorDimension >, vnl_vector_fixed< TScalarType, NDimensions >, vnl_vector_fixed< double, NDimensions >, vnl_vector_fixed< TScalarType, 4 >, vnl_vector_fixed< TVector, TVectorDimension >, and vnl_vector_fixed< T, 4 >.

Definition at line 176 of file vnl_vector.h.

Referenced by vnl_vector_fixed< T, 4 >::operator-=().

template<class T>
vnl_vector<T> vnl_vector< T >::operator/   v const [inline]
 

Reimplemented in vnl_vector_fixed< T, n >, vnl_vector_fixed< T, 3 >, vnl_vector_fixed< T, VEstimatorDimension >, vnl_vector_fixed< TScalarType, NDimensions >, vnl_vector_fixed< double, NDimensions >, vnl_vector_fixed< TScalarType, 4 >, vnl_vector_fixed< TVector, TVectorDimension >, and vnl_vector_fixed< T, 4 >.

Definition at line 224 of file vnl_vector.h.

template<class T>
vnl_vector<T>& vnl_vector< T >::operator/=  
 

Divide all elements by scalar.

Reimplemented in vnl_vector_fixed< T, n >, vnl_vector_fixed< T, 3 >, vnl_vector_fixed< T, VEstimatorDimension >, vnl_vector_fixed< TScalarType, NDimensions >, vnl_vector_fixed< double, NDimensions >, vnl_vector_fixed< TScalarType, 4 >, vnl_vector_fixed< TVector, TVectorDimension >, and vnl_vector_fixed< T, 4 >.

Referenced by vnl_vector_fixed< T, 4 >::operator=().

template<class T>
vnl_vector<T>& vnl_vector< T >::operator= vnl_vector< T > const &    rhs
 

Copy operator.

Reimplemented in vnl_vector_fixed< T, n >, vnl_vector_fixed< T, 3 >, vnl_vector_fixed< T, VEstimatorDimension >, vnl_vector_fixed< TScalarType, NDimensions >, vnl_vector_fixed< double, NDimensions >, vnl_vector_fixed< TScalarType, 4 >, vnl_vector_fixed< TVector, TVectorDimension >, and vnl_vector_fixed< T, 4 >.

template<class T>
vnl_vector<T>& vnl_vector< T >::operator= T const &    v [inline]
 

Set all elements to value v.

Reimplemented in vnl_vector_fixed< T, n >, vnl_vector_fixed< T, 3 >, vnl_vector_fixed< T, VEstimatorDimension >, vnl_vector_fixed< TScalarType, NDimensions >, vnl_vector_fixed< double, NDimensions >, vnl_vector_fixed< TScalarType, 4 >, vnl_vector_fixed< TVector, TVectorDimension >, and vnl_vector_fixed< T, 4 >.

Definition at line 164 of file vnl_vector.h.

template<class T>
bool vnl_vector< T >::operator== vnl_vector< T > const &    that const [inline]
 

Equality test.

Definition at line 378 of file vnl_vector.h.

template<class T>
T const& vnl_vector< T >::operator[] unsigned int    i const [inline]
 

Return reference to the element at specified index.\ No range checking.

Definition at line 160 of file vnl_vector.h.

template<class T>
T& vnl_vector< T >::operator[] unsigned int    i [inline]
 

Return reference to the element at specified index.\ No range checking.

Definition at line 157 of file vnl_vector.h.

template<class T>
bool vnl_vector< T >::operator_eq vnl_vector< T > const &    v const
 

Return true if *this == v.

Referenced by vnl_vector< TVector >::inf_norm(), and vnl_vector< TVector >::rms().

template<class T>
vnl_vector<T>& vnl_vector< T >::post_multiply vnl_matrix< T > const &    M
 

*this = (*this)*M where M is a suitable matrix. this is treated as a row vector

Reimplemented in vnl_vector_fixed< T, n >, vnl_vector_fixed< T, 3 >, vnl_vector_fixed< T, VEstimatorDimension >, vnl_vector_fixed< TScalarType, NDimensions >, vnl_vector_fixed< double, NDimensions >, vnl_vector_fixed< TScalarType, 4 >, vnl_vector_fixed< TVector, TVectorDimension >, and vnl_vector_fixed< T, 4 >.

template<class T>
vnl_vector<T>& vnl_vector< T >::pre_multiply vnl_matrix< T > const &    M
 

*this = M*(*this) where M is a suitable matrix. this is treated as a column vector

Reimplemented in vnl_vector_fixed< T, n >, vnl_vector_fixed< T, 3 >, vnl_vector_fixed< T, VEstimatorDimension >, vnl_vector_fixed< TScalarType, NDimensions >, vnl_vector_fixed< double, NDimensions >, vnl_vector_fixed< TScalarType, 4 >, vnl_vector_fixed< TVector, TVectorDimension >, and vnl_vector_fixed< T, 4 >.

template<class T>
void vnl_vector< T >::put unsigned int    i,
T const &   
[inline]
 

put value at given position in vector.

Definition at line 457 of file vnl_vector.h.

template<class T>
vnl_vector<T> vnl_vector< T >::read vcl_istream &    s [static]
 

Read from text stream.

template<class T>
bool vnl_vector< T >::read_ascii vcl_istream &    s
 

Read from text stream.

template<class T>
bool vnl_vector< T >::resize unsigned    n
 

Resize to n elements. Checks early and does nothing if already size n, otherwise old data is discarded. Returns true if size change successful.

template<class T>
abs_t vnl_vector< T >::rms   const [inline]
 

Root Mean Squares of values.

Definition at line 306 of file vnl_vector.h.

template<class T>
void vnl_vector< T >::set T const *    ptr [inline]
 

Sets elements to ptr[i]. Note: ptr[i] must be valid for i=0..size()-1

Definition at line 146 of file vnl_vector.h.

template<class T>
void vnl_vector< T >::set_t T const &    tt [inline]
 

Set the fourth element (with bound checking).

Definition at line 358 of file vnl_vector.h.

template<class T>
void vnl_vector< T >::set_x T const &    xx [inline]
 

Set the first element (with bound checking).

Definition at line 349 of file vnl_vector.h.

template<class T>
void vnl_vector< T >::set_y T const &    yy [inline]
 

Set the second element (with bound checking).

Definition at line 352 of file vnl_vector.h.

template<class T>
void vnl_vector< T >::set_z T const &    zz [inline]
 

Set the third element (with bound checking).

Definition at line 355 of file vnl_vector.h.

template<class T>
unsigned vnl_vector< T >::size void    const [inline]
 

Return the length, number of elements, dimension of this vector.

Definition at line 118 of file vnl_vector.h.

Referenced by vnl_vector< TVector >::begin(), vnl_vector< TVector >::data_block(), vnl_vector< TVector >::end(), vnl_vector< TVector >::magnitude(), and vnl_vector< TVector >::squared_magnitude().

template<class T>
abs_t vnl_vector< T >::squared_magnitude   const [inline]
 

Return sum of squares of elements.

Definition at line 286 of file vnl_vector.h.

template<class T>
void vnl_vector< T >::swap vnl_vector< T > &    that
 

Set this to that and that to this.

template<class T>
T& vnl_vector< T >::t   const [inline]
 

Return fourth element of vector.

Definition at line 344 of file vnl_vector.h.

Referenced by vnl_vector_fixed< T, 4 >::operator+=(), vnl_vector_fixed< T, 4 >::operator-(), vnl_vector_fixed< T, 4 >::operator-=(), and vnl_vector_fixed< T, 4 >::operator=().

template<class T>
abs_t vnl_vector< T >::two_norm   const [inline]
 

Return sqrt of sum of squares of values of elements.

Definition at line 298 of file vnl_vector.h.

Referenced by vnl_vector< TVector >::data_block().

template<class T>
vnl_vector<T>& vnl_vector< T >::update vnl_vector< T > const &   ,
unsigned int    start = 0
 

Replaces elements with index begining at start, by values of v.\ O(n).

Reimplemented in vnl_vector_fixed< T, n >, vnl_vector_fixed< T, 3 >, vnl_vector_fixed< T, VEstimatorDimension >, vnl_vector_fixed< TScalarType, NDimensions >, vnl_vector_fixed< double, NDimensions >, vnl_vector_fixed< TScalarType, 4 >, vnl_vector_fixed< TVector, TVectorDimension >, and vnl_vector_fixed< T, 4 >.

Referenced by vnl_vector_fixed< T, 4 >::apply().

template<class T>
T& vnl_vector< T >::x   const [inline]
 

Return first element of vector.

Reimplemented in vnl_quaternion< T >, and vnl_quaternion< TScalarType >.

Definition at line 335 of file vnl_vector.h.

template<class T>
T& vnl_vector< T >::y   const [inline]
 

Return second element of vector.

Reimplemented in vnl_quaternion< T >, and vnl_quaternion< TScalarType >.

Definition at line 338 of file vnl_vector.h.

template<class T>
T& vnl_vector< T >::z   const [inline]
 

Return third element of vector.

Reimplemented in vnl_quaternion< T >, and vnl_quaternion< TScalarType >.

Definition at line 341 of file vnl_vector.h.


Friends And Related Function Documentation

template<class T>
friend class vnl_matrix< T > [friend]
 

Definition at line 59 of file vnl_vector.h.


Member Data Documentation

template<class T>
T* vnl_vector< T >::data [protected]
 

Definition at line 406 of file vnl_vector.h.

Referenced by vnl_vector< TVector >::magnitude(), vnl_vector< TVector >::normalize(), vnl_vector< TVector >::operator *=(), vnl_vector< TVector >::operator!=(), vnl_vector< TVector >::operator+(), vnl_vector< TVector >::set_t(), vnl_vector< TVector >::squared_magnitude(), vnl_vector< TVector >::vnl_vector(), and vnl_vector_fixed< T, 4 >::vnl_vector_fixed().

template<class T>
unsigned vnl_vector< T >::num_elmts [protected]
 

Definition at line 405 of file vnl_vector.h.

Referenced by vnl_vector< TVector >::normalize(), vnl_vector< TVector >::operator+(), vnl_vector_fixed< T, 4 >::operator-(), vnl_vector_fixed< T, 4 >::operator/(), vnl_vector< TVector >::operator==(), vnl_vector< TVector >::set_t(), and vnl_vector< TVector >::vnl_vector().


The documentation for this class was generated from the following file:
Generated at Fri May 21 01:17:38 2004 for ITK by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2000