#include <vnl_vector.h>
Inheritance diagram for vnl_vector:
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 &) |
T | 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 |
T | min_value () const |
T | max_value () const |
T | 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 > |
NOTE: Vectors are indexed from zero! Thus valid elements are [0,size()-1].
Definition at line 57 of file vnl_vector.h.
|
Definition at line 282 of file vnl_vector.h. |
|
Const iterator type. Definition at line 258 of file vnl_vector.h. |
|
Type defs for iterators. Definition at line 244 of file vnl_vector.h. |
|
Type defs for iterators. Definition at line 247 of file vnl_vector.h. Referenced by vnl_vector< TVector >::operator *=(), and vnl_vector< TVector >::operator+(). |
|
Creates an empty vector.\ O(1). Definition at line 63 of file vnl_vector.h. |
|
Creates vector containing n elements. Elements are not initialized |
|
Creates vector of len elements, all sest to v0. |
|
Creates a vector of specified length and initialize first n elements with values.\ O(n). |
|
Creates a vector of length 3 and initializes with the arguments, x,y,z. |
|
Create n element vector and copy data from data_block. |
|
Copy constructor. |
|
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. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Destructor. Definition at line 114 of file vnl_vector.h. |
|
Applies function to elements. |
|
Applies function to elements. |
|
Check that this is finite if not, abort();. |
|
Check that size()==sz - if not, abort();. |
|
Iterator pointing to start of data. Definition at line 261 of file vnl_vector.h. |
|
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(). |
|
Make the vector as if it had been default-constructed. |
|
Sets elements to ptr[i]. Note: ptr[i] must be valid for i=0..size()-1 |
|
Copy elements to ptr[i]. Note: ptr[i] must be valid for i=0..size()-1 |
|
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. |
|
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(). |
|
|
|
Iterator pointing to element beyond end of data. Definition at line 264 of file vnl_vector.h. |
|
Iterator pointing to element beyond end of data. Definition at line 254 of file vnl_vector.h. |
|
Returns a subvector specified by the start index and length.\ O(n). Referenced by vnl_quaternion< T >::x(). |
|
Set all values to v. |
|
Reverse the order of the elements. Element i swaps with element size()-1-i |
|
get value at element i. Definition at line 444 of file vnl_vector.h. Referenced by vnl_quaternion< T >::y(). |
|
Return largest absolute element value. Definition at line 302 of file vnl_vector.h. |
|
|
|
Return true if its finite. |
|
Return magnitude (length) of vector. Definition at line 290 of file vnl_vector.h. |
|
Largest value. Definition at line 314 of file vnl_vector.h. |
|
Mean of values in vector. Definition at line 318 of file vnl_vector.h. |
|
Smallest value. Definition at line 310 of file vnl_vector.h. |
|
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. |
|
Return sum of absolute values of the elements. Definition at line 294 of file vnl_vector.h. |
|
Definition at line 228 of file vnl_vector.h. |
|
|
*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. |
|
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 >. |
|
Inequality test. Definition at line 382 of file vnl_vector.h. |
|
Return reference to the element at specified index.\ No range checking. Definition at line 153 of file vnl_vector.h. |
|
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(). |
|
|
|
Unary plus operator. Return new vector = (*this) Definition at line 213 of file vnl_vector.h. |
|
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 >. |
|
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=(). |
|
|
|
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 >. |
|
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 >. |
|
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-=(). |
|
|
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=(). |
|
|
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. |
|
Equality test. Definition at line 378 of file vnl_vector.h. |
|
Return reference to the element at specified index.\ No range checking. Definition at line 160 of file vnl_vector.h. |
|
Return reference to the element at specified index.\ No range checking. Definition at line 157 of file vnl_vector.h. |
|
Return true if *this == v. Referenced by vnl_vector< TVector >::inf_norm(), and vnl_vector< TVector >::rms(). |
|
*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 >. |
|
*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 >. |
|
put value at given position in vector. Definition at line 457 of file vnl_vector.h. |
|
Read from text stream. |
|
Read from text stream. |
|
Resize to n elements. Checks early and does nothing if already size n, otherwise old data is discarded. Returns true if size change successful. |
|
Root Mean Squares of values. Definition at line 306 of file vnl_vector.h. |
|
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. |
|
Set the fourth element (with bound checking). Definition at line 358 of file vnl_vector.h. |
|
Set the first element (with bound checking). Definition at line 349 of file vnl_vector.h. |
|
Set the second element (with bound checking). Definition at line 352 of file vnl_vector.h. |
|
Set the third element (with bound checking). Definition at line 355 of file vnl_vector.h. |
|
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(). |
|
Return sum of squares of elements. Definition at line 286 of file vnl_vector.h. |
|
Set this to that and that to this. |
|
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=(). |
|
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(). |
|
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(). |
|
Return first element of vector. Reimplemented in vnl_quaternion< T >, and vnl_quaternion< TScalarType >. Definition at line 335 of file vnl_vector.h. |
|
Return second element of vector. Reimplemented in vnl_quaternion< T >, and vnl_quaternion< TScalarType >. Definition at line 338 of file vnl_vector.h. |
|
Return third element of vector. Reimplemented in vnl_quaternion< T >, and vnl_quaternion< TScalarType >. Definition at line 341 of file vnl_vector.h. |
|
Definition at line 59 of file vnl_vector.h. |
|
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(). |
|
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(). |