#include <vnl_vector_fixed.h>
vnl_vector_fixed is a fixed-length, stack storage vector. It has the same storage size as a C-style array. It is not related via inheritance to vnl_vector. However, it can be converted cheaply to a vnl_vector_ref.
In most cases, a vnl_vector_fixed can be used where a vnl_vector is expected. There are some situations, however, when the automatic conversion cannot be applied. In those cases, you need to call the as_ref() method to perform an explicit conversion. This occurs most often when the called function is templated, since the user-defined conversion operators are then suppressed.
template<class T> void do_something( const vnl_vector<T>& v ); ... vnl_vector_fixed<double,4> my_vec; do_something( my_vec ); // Error: no do_something( vnl_vector_fixed<double,4> ) found do_something( my_vec.as_ref() ); // works
Since the conversion operator creates a temporary vnl_vector_ref object, the conversion cannot be used directly to a function that expects a non-const vnl_vector reference. Use vnl_vector_ref::non_const method for this (and only this).
void mutator( vnl_vector<double>& v ); ... vnl_vector_fixed<double,4> my_vec; mutator( my_vec.as_ref().non_const() );
vnl_vector_fixed defines most of the operators defined by vnl_vector, and does so efficiently. If you try to mix vnl_vector_fixed and vnl_vector, however, you will probably get a vnl_vector result, with the corresponding malloc cost.
Definition at line 84 of file vnl_vector_fixed.h.
Public Types | |
| enum | { SIZE = n } |
| typedef vnl_vector_fixed< T, n > | self |
| typedef unsigned int | size_type |
| typedef T | element_type |
| Type defs for iterators. | |
| typedef T * | iterator |
| Type defs for iterators. | |
| typedef T const * | const_iterator |
| Const iterator type. | |
| typedef vnl_c_vector< T >::abs_t | abs_t |
Public Member Functions | |
| vnl_vector_fixed () | |
| Construct an uninitialized n-vector. | |
| vnl_vector_fixed (const vnl_vector_fixed< T, n > &rhs) | |
| Copy constructor. | |
| vnl_vector_fixed (const vnl_vector< T > &rhs) | |
| Construct a fixed-n-vector copy of rhs. | |
| vnl_vector_fixed (const T &v) | |
| Constructs n-vector with all elements initialised to v. | |
| vnl_vector_fixed (const T *datablck) | |
| Construct an fixed-n-vector initialized from datablck. | |
| vnl_vector_fixed (const T &x0, const T &x1) | |
| Convenience constructor for 2-D vectors. | |
| vnl_vector_fixed (const T &x0, const T &x1, const T &x2) | |
| Convenience constructor for 3-D vectors. | |
| vnl_vector_fixed (const T &x0, const T &x1, const T &x2, const T &x3) | |
| Convenience constructor for 4-D vectors. | |
| vnl_vector_fixed< T, n > & | operator= (const vnl_vector_fixed< T, n > &rhs) |
| Copy operator. | |
| vnl_vector_fixed< T, n > & | operator= (const vnl_vector< T > &rhs) |
| Copy data from a dynamic vector. | |
| unsigned | size () const |
| Length of the vector. | |
| void | put (unsigned int i, T const &v) |
| Put value at given position in vector. | |
| T | get (unsigned int i) const |
| Get value at element i. | |
| void | fill (T const &v) |
| Set all values to v. | |
| void | copy_in (T const *ptr) |
| Sets elements to ptr[i]. | |
| void | copy_out (T *ptr) const |
| Copy elements to ptr[i]. | |
| void | set (T const *ptr) |
| Sets elements to ptr[i]. | |
| T & | operator() (unsigned int i) |
| Return reference to the element at specified index. | |
| T const & | operator() (unsigned int i) const |
| Return reference to the element at specified index. | |
| T & | operator[] (unsigned int i) |
| Return the i-th element. | |
| const T & | operator[] (unsigned int i) const |
| Return the i-th element. | |
| T const * | data_block () const |
| Access the contiguous block storing the elements in the vector. | |
| T * | data_block () |
| Access the contiguous block storing the elements in the vector. | |
| vnl_vector_ref< T > | as_ref () |
| Explicit conversion to a vnl_vector_ref. | |
| const vnl_vector_ref< T > | as_ref () const |
| Explicit conversion to a vnl_vector_ref. | |
| operator const vnl_vector_ref () const | |
| Cheap conversion to vnl_vector_ref. | |
| iterator | begin () |
| Iterator pointing to start of data. | |
| iterator | end () |
| Iterator pointing to element beyond end of data. | |
| const_iterator | begin () const |
| Iterator pointing to start of data. | |
| const_iterator | end () const |
| Iterator pointing to element beyond end of data. | |
| vnl_vector_fixed< T, n > | apply (T(*f)(T)) |
| Apply f to each element. | |
| vnl_vector_fixed< T, n > | apply (T(*f)(const T &)) |
| Apply f to each element. | |
| vnl_vector_fixed< T, n > & | operator+= (T s) |
| vnl_vector_fixed< T, n > & | operator-= (T s) |
| vnl_vector_fixed< T, n > & | operator *= (T s) |
| vnl_vector_fixed< T, n > & | operator/= (T s) |
| vnl_vector_fixed< T, n > & | operator+= (const vnl_vector_fixed< T, n > &v) |
| vnl_vector_fixed< T, n > & | operator-= (const vnl_vector_fixed< T, n > &v) |
| vnl_vector_fixed< T, n > & | operator+= (const vnl_vector< T > &v) |
| vnl_vector_fixed< T, n > & | operator-= (const vnl_vector< T > &v) |
| vnl_vector_fixed< T, n > | operator- () const |
| vnl_vector< T > | extract (unsigned int len, unsigned int start=0) const |
| Returns a subvector specified by the start index and length. O(n). | |
| vnl_vector< T > | as_vector () const |
| Convert to a vnl_vector. | |
| vnl_vector_fixed & | update (vnl_vector< T > const &, unsigned int start=0) |
| Replaces elements with index beginning at start, by values of v. O(n). | |
| abs_t | squared_magnitude () const |
| Return sum of squares of elements. | |
| abs_t | magnitude () const |
| Return magnitude (length) of vector. | |
| abs_t | one_norm () const |
| Return sum of absolute values of the elements. | |
| abs_t | two_norm () const |
| Return sqrt of sum of squares of values of elements. | |
| abs_t | inf_norm () const |
| Return largest absolute element value. | |
| vnl_vector_fixed< T, n > & | normalize () |
| Normalise by dividing through by the magnitude. | |
| abs_t | rms () const |
| Root Mean Squares of values. | |
| T | min_value () const |
| Smallest value. | |
| T | max_value () const |
| Largest value. | |
| unsigned | arg_min () const |
| Location of smallest value. | |
| unsigned | arg_max () const |
| Location of largest value. | |
| T | mean () const |
| Mean of values in vector. | |
| T | sum () const |
| Sum of values in a vector. | |
| void | flip () |
| Reverse the order of the elements. | |
| void | assert_size (unsigned sz) const |
| Check that size()==sz if not, abort();. | |
| void | assert_finite () const |
| Check that this is finite if not, abort();. | |
| bool | is_finite () const |
| Return true if its finite. | |
| bool | is_zero () const |
| Return true iff all the entries are zero. | |
| bool | empty () const |
| Return true iff the size is zero. | |
| bool | operator_eq (vnl_vector_fixed< T, n > const &v) const |
| Return true if *this == v. | |
| bool | operator_eq (vnl_vector< T > const &v) const |
| Return true if *this == v. | |
| bool | read_ascii (vcl_istream &s) |
| Read from text stream. | |
| void | print (vcl_ostream &s) const |
| Display the vector. | |
Static Public Member Functions | |
| static void | add (const T *a, const T *b, T *r) |
| static void | add (const T *a, T b, T *r) |
| static void | sub (const T *a, const T *b, T *r) |
| static void | sub (const T *a, T b, T *r) |
| static void | sub (T a, const T *b, T *r) |
| static void | mul (const T *a, const T *b, T *r) |
| static void | mul (const T *a, T b, T *r) |
| static void | div (const T *a, const T *b, T *r) |
| static void | div (const T *a, T b, T *r) |
Protected Attributes | |
| T | data_ [n] |
Private Member Functions | |
| void | assert_finite_internal () const |
| See assert_finite(). | |
Related Functions | |
| (Note that these are not member functions.) | |
| void | vsl_b_write (vsl_b_ostream &os, const vnl_vector_fixed< T, n > &v) |
| Binary save vnl_vector_fixed to stream. | |
| void | vsl_b_read (vsl_b_istream &is, vnl_vector_fixed< T, n > &v) |
| Binary load vnl_vector_fixed from stream. | |
| void | vsl_print_summary (vcl_ostream &os, const vnl_vector_fixed< T, n > &b) |
| Print human readable summary of object to a stream. | |
| T | vnl_cross_2d (const vnl_vector_fixed< T, 2 > &v1, const vnl_vector_fixed< T, 2 > &v2) |
| Compute the 2-D cross product. | |
| T | vnl_cross_2d (vnl_vector_fixed< T, 2 > const &v1, vnl_vector< T > const &v2) |
| Compute the 2-D cross product. | |
| T | vnl_cross_2d (vnl_vector< T > const &v1, vnl_vector_fixed< T, 2 > const &v2) |
| Compute the 2-D cross product. | |
| vnl_vector_fixed< T, 3 > | vnl_cross_3d (const vnl_vector_fixed< T, 3 > &v1, const vnl_vector_fixed< T, 3 > &v2) |
| Compute the 3-D cross product. | |
| vnl_vector_fixed< T, n > | vnl_cross_3d (const vnl_vector_fixed< T, n > &a, const vnl_vector< T > &b) |
| Compute the 3-D cross product. | |
| vnl_vector_fixed< T, n > | vnl_cross_3d (const vnl_vector< T > &a, const vnl_vector_fixed< T, n > &b) |
| Compute the 3-D cross product. | |
| vnl_vector_fixed< T, N > | operator * (vnl_diag_matrix_fixed< T, N > const &D, vnl_vector_fixed< T, N > const &A) |
| Multiply a vnl_diag_matrix_fixed by a vnl_vector_fixed. n flops. | |
| vnl_vector_fixed< T, N > | operator * (vnl_vector_fixed< T, N > const &A, vnl_diag_matrix_fixed< T, N > const &D) |
| Multiply a vnl_vector_fixed by a vnl_diag_matrix_fixed. n flops. | |
| double | vnl_cross_2d (vnl_double_2 const &v1, vnl_double_2 const &v2) |
| Cross product of two 2-vectors. | |
| vnl_double_3 | vnl_cross_3d (vnl_double_3 const &v1, vnl_double_3 const &v2) |
| Cross product of two 3-vectors. | |
| float | vnl_cross_2d (vnl_float_2 const &v1, vnl_float_2 const &v2) |
| Cross product of two 2-vectors. | |
| vnl_float_3 | vnl_cross_3d (vnl_float_3 const &v1, vnl_float_3 const &v2) |
| Cross product of two 3-vectors. | |
| vnl_double_3 | operator+ (const vnl_double_3 &a, const vnl_double_3 &b) |
| The binary addition operator. | |
| vcl_ostream & | vnl_matlab_print (vcl_ostream &, vnl_vector_fixed< T, n > const &, char const *variable_name=0, vnl_matlab_print_format=vnl_matlab_print_format_default) |
| print a vnl_vector_fixed<T>. | |
| vnl_matrix_fixed< T, m, n > | outer_product (vnl_vector_fixed< T, m > const &a, vnl_vector_fixed< T, n > const &b) |
| bool | operator< (vnl_vector_fixed< T, n > const &lhs, vnl_vector_fixed< T, n > const &rhs) |
| Define a complete ordering on vnl_vector_fixed. | |
| vnl_vector_fixed< T, n > | operator+ (const vnl_vector_fixed< T, n > &v, T s) |
| vnl_vector_fixed< T, n > | operator+ (const T &s, const vnl_vector_fixed< T, n > &v) |
| vnl_vector_fixed< T, n > | operator- (const vnl_vector_fixed< T, n > &v, T s) |
| vnl_vector_fixed< T, n > | operator- (const T &s, const vnl_vector_fixed< T, n > &v) |
| vnl_vector_fixed< T, n > | operator * (const vnl_vector_fixed< T, n > &v, T s) |
| vnl_vector_fixed< T, n > | operator * (const T &s, const vnl_vector_fixed< T, n > &v) |
| vnl_vector_fixed< T, n > | operator/ (const vnl_vector_fixed< T, n > &v, T s) |
| vnl_vector_fixed< T, n > | operator+ (const vnl_vector_fixed< T, n > &a, const vnl_vector_fixed< T, n > &b) |
| vnl_vector< T > | operator+ (const vnl_vector_fixed< T, n > &a, const vnl_vector< T > &b) |
| vnl_vector< T > | operator+ (const vnl_vector< T > &a, const vnl_vector_fixed< T, n > &b) |
| vnl_vector_fixed< T, n > | operator- (const vnl_vector_fixed< T, n > &a, const vnl_vector_fixed< T, n > &b) |
| vnl_vector< T > | operator- (const vnl_vector_fixed< T, n > &a, const vnl_vector< T > &b) |
| vnl_vector< T > | operator- (const vnl_vector< T > &a, const vnl_vector_fixed< T, n > &b) |
| vnl_vector_fixed< T, n > | element_product (const vnl_vector_fixed< T, n > &a, const vnl_vector_fixed< T, n > &b) |
| vnl_vector< T > | element_product (const vnl_vector_fixed< T, n > &a, const vnl_vector< T > &b) |
| vnl_vector< T > | element_product (const vnl_vector< T > &a, const vnl_vector_fixed< T, n > &b) |
| vnl_vector_fixed< T, n > | element_quotient (const vnl_vector_fixed< T, n > &a, const vnl_vector_fixed< T, n > &b) |
| vnl_vector< T > | element_quotient (const vnl_vector_fixed< T, n > &a, const vnl_vector< T > &b) |
| vnl_vector< T > | element_quotient (const vnl_vector< T > &a, const vnl_vector_fixed< T, n > &b) |
| T | dot_product (const vnl_vector_fixed< T, n > &a, const vnl_vector_fixed< T, n > &b) |
| T | dot_product (const vnl_vector_fixed< T, n > &a, const vnl_vector< T > &b) |
| T | dot_product (const vnl_vector< T > &a, const vnl_vector_fixed< T, n > &b) |
| vnl_matrix< T > | outer_product (const vnl_vector< T > &a, const vnl_vector_fixed< T, n > &b) |
| vnl_matrix< T > | outer_product (const vnl_vector_fixed< T, n > &a, const vnl_vector< T > &b) |
| T | angle (const vnl_vector_fixed< T, n > &a, const vnl_vector_fixed< T, n > &b) |
| T | angle (const vnl_vector_fixed< T, n > &a, const vnl_vector< T > &b) |
| T | angle (const vnl_vector< T > &a, const vnl_vector_fixed< T, n > &b) |
| T | vnl_vector_ssd (const vnl_vector_fixed< T, n > &a, const vnl_vector_fixed< T, n > &b) |
| T | vnl_vector_ssd (const vnl_vector_fixed< T, n > &a, const vnl_vector< T > &b) |
| T | vnl_vector_ssd (const vnl_vector< T > &a, const vnl_vector_fixed< T, n > &b) |
| bool | operator== (const vnl_vector_fixed< T, n > &a, const vnl_vector_fixed< T, n > &b) |
| bool | operator== (vnl_vector_fixed< T, n > const &a, vnl_vector< T > const &b) |
| bool | operator== (vnl_vector< T > const &a, vnl_vector_fixed< T, n > const &b) |
| bool | operator!= (const vnl_vector_fixed< T, n > &a, const vnl_vector_fixed< T, n > &b) |
| bool | operator!= (vnl_vector_fixed< T, n > const &a, vnl_vector< T > const &b) |
| bool | operator!= (vnl_vector< T > const &a, vnl_vector_fixed< T, n > const &b) |
| vcl_ostream & | operator<< (vcl_ostream &ostr, const vnl_vector_fixed< T, n > &v) |
| vcl_istream & | operator>> (vcl_istream &ostr, vnl_vector_fixed< T, n > &v) |
| vnl_vector_fixed< T, n > | operator+ (const vnl_vector_fixed_ref_const< T, n > &v, T s) |
| | |
| vnl_vector_fixed< T, n > | operator+ (T s, const vnl_vector_fixed_ref_const< T, n > &v) |
| | |
| vnl_vector_fixed< T, n > | operator- (const vnl_vector_fixed_ref_const< T, n > &v, T s) |
| | |
| vnl_vector_fixed< T, n > | operator- (T s, const vnl_vector_fixed_ref_const< T, n > &v) |
| | |
| vnl_vector_fixed< T, n > | operator * (const vnl_vector_fixed_ref_const< T, n > &v, T s) |
| | |
| vnl_vector_fixed< T, n > | operator * (T s, const vnl_vector_fixed_ref_const< T, n > &v) |
| | |
| vnl_vector_fixed< T, n > | operator/ (const vnl_vector_fixed_ref_const< T, n > &v, T s) |
| | |
| vnl_vector_fixed< T, n > | operator+ (const vnl_vector_fixed_ref_const< T, n > &a, const vnl_vector_fixed_ref_const< T, n > &b) |
| | |
| vnl_vector_fixed< T, n > | operator- (const vnl_vector_fixed_ref_const< T, n > &a, const vnl_vector_fixed_ref_const< T, n > &b) |
| | |
| vcl_ostream & | operator<< (vcl_ostream &o, const vnl_vector_fixed_ref_const< T, n > &v) |
| | |
| vcl_istream & | operator>> (vcl_istream &i, const vnl_vector_fixed_ref< T, n > &v) |
| | |
| void | x_write (vcl_ostream &os, const vnl_vector_fixed< T, n > &v, vcl_string name="vnl_vector_fixed") |
| XML save vnl_vector_fixed to stream. | |
| typedef vnl_vector_fixed<T,n> vnl_vector_fixed< T, n >::self |
Definition at line 87 of file vnl_vector_fixed.h.
| typedef unsigned int vnl_vector_fixed< T, n >::size_type |
Definition at line 88 of file vnl_vector_fixed.h.
| typedef T vnl_vector_fixed< T, n >::element_type |
| typedef T* vnl_vector_fixed< T, n >::iterator |
| typedef T const* vnl_vector_fixed< T, n >::const_iterator |
| typedef vnl_c_vector<T>::abs_t vnl_vector_fixed< T, n >::abs_t |
Definition at line 347 of file vnl_vector_fixed.h.
| anonymous enum |
| vnl_vector_fixed< T, n >::vnl_vector_fixed | ( | ) | [inline] |
| vnl_vector_fixed< T, n >::vnl_vector_fixed | ( | const vnl_vector_fixed< T, n > & | rhs | ) | [inline] |
| vnl_vector_fixed< T, n >::vnl_vector_fixed | ( | const vnl_vector< T > & | rhs | ) | [inline] |
Construct a fixed-n-vector copy of rhs.
The dimensions must match.
Definition at line 112 of file vnl_vector_fixed.h.
| vnl_vector_fixed< T, n >::vnl_vector_fixed | ( | const T & | v | ) | [inline, explicit] |
Constructs n-vector with all elements initialised to v.
Definition at line 119 of file vnl_vector_fixed.h.
| vnl_vector_fixed< T, n >::vnl_vector_fixed | ( | const T * | datablck | ) | [inline, explicit] |
Construct an fixed-n-vector initialized from datablck.
The data *must* have enough data. No checks performed.
Definition at line 123 of file vnl_vector_fixed.h.
| vnl_vector_fixed< T, n >::vnl_vector_fixed | ( | const T & | x0, | |
| const T & | x1 | |||
| ) | [inline] |
Convenience constructor for 2-D vectors.
While this constructor is sometimes useful, consider using vnl_double_2 or vnl_float_2 instead.
Definition at line 131 of file vnl_vector_fixed.h.
| vnl_vector_fixed< T, n >::vnl_vector_fixed | ( | const T & | x0, | |
| const T & | x1, | |||
| const T & | x2 | |||
| ) | [inline] |
Convenience constructor for 3-D vectors.
While this constructor is sometimes useful, consider using vnl_double_3 or vnl_float_3 instead.
Definition at line 140 of file vnl_vector_fixed.h.
| vnl_vector_fixed< T, n >::vnl_vector_fixed | ( | const T & | x0, | |
| const T & | x1, | |||
| const T & | x2, | |||
| const T & | x3 | |||
| ) | [inline] |
| vnl_vector_fixed<T,n>& vnl_vector_fixed< T, n >::operator= | ( | const vnl_vector_fixed< T, n > & | rhs | ) | [inline] |
| vnl_vector_fixed<T,n>& vnl_vector_fixed< T, n >::operator= | ( | const vnl_vector< T > & | rhs | ) | [inline] |
Copy data from a dynamic vector.
The dimensions must match.
Definition at line 161 of file vnl_vector_fixed.h.
| unsigned vnl_vector_fixed< T, n >::size | ( | ) | const [inline] |
| void vnl_vector_fixed< T, n >::put | ( | unsigned int | i, | |
| T const & | v | |||
| ) | [inline] |
| T vnl_vector_fixed< T, n >::get | ( | unsigned int | i | ) | const [inline] |
| void vnl_vector_fixed< T, n >::fill | ( | T const & | v | ) | [inline] |
| void vnl_vector_fixed< T, n >::copy_in | ( | T const * | ptr | ) | [inline] |
Sets elements to ptr[i].
Note: ptr[i] must be valid for i=0..size()-1
Definition at line 186 of file vnl_vector_fixed.h.
| void vnl_vector_fixed< T, n >::copy_out | ( | T * | ptr | ) | const [inline] |
Copy elements to ptr[i].
Note: ptr[i] must be valid for i=0..size()-1
Definition at line 194 of file vnl_vector_fixed.h.
| void vnl_vector_fixed< T, n >::set | ( | T const * | ptr | ) | [inline] |
Sets elements to ptr[i].
Note: ptr[i] must be valid for i=0..size()-1
Definition at line 202 of file vnl_vector_fixed.h.
| T& vnl_vector_fixed< T, n >::operator() | ( | unsigned int | i | ) | [inline] |
Return reference to the element at specified index.
There are assert style boundary checks - define NDEBUG to turn them off.
Definition at line 207 of file vnl_vector_fixed.h.
| T const& vnl_vector_fixed< T, n >::operator() | ( | unsigned int | i | ) | const [inline] |
Return reference to the element at specified index.
There are assert style boundary checks - define NDEBUG to turn them off.
Definition at line 217 of file vnl_vector_fixed.h.
| T& vnl_vector_fixed< T, n >::operator[] | ( | unsigned int | i | ) | [inline] |
| const T& vnl_vector_fixed< T, n >::operator[] | ( | unsigned int | i | ) | const [inline] |
| T const* vnl_vector_fixed< T, n >::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 234 of file vnl_vector_fixed.h.
| T* vnl_vector_fixed< T, n >::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 239 of file vnl_vector_fixed.h.
| vnl_vector_ref<T> vnl_vector_fixed< T, n >::as_ref | ( | ) | [inline] |
Explicit conversion to a vnl_vector_ref.
This is a cheap conversion for those functions that have an interface for vnl_vector but not for vnl_vector_fixed. There is also a conversion operator that should work most of the time.
Definition at line 254 of file vnl_vector_fixed.h.
| const vnl_vector_ref<T> vnl_vector_fixed< T, n >::as_ref | ( | ) | const [inline] |
Explicit conversion to a vnl_vector_ref.
This is a cheap conversion for those functions that have an interface for vnl_vector but not for vnl_vector_fixed. There is also a conversion operator that should work most of the time.
Definition at line 261 of file vnl_vector_fixed.h.
| vnl_vector_fixed< T, n >::operator const vnl_vector_ref | ( | ) | const [inline] |
Cheap conversion to vnl_vector_ref.
Sometimes, such as with templated functions, the compiler cannot use this user-defined conversion. For those cases, use the explicit as_ref() method instead.
Definition at line 267 of file vnl_vector_fixed.h.
| iterator vnl_vector_fixed< T, n >::begin | ( | ) | [inline] |
| iterator vnl_vector_fixed< T, n >::end | ( | ) | [inline] |
| const_iterator vnl_vector_fixed< T, n >::begin | ( | ) | const [inline] |
| const_iterator vnl_vector_fixed< T, n >::end | ( | ) | const [inline] |
| vnl_vector_fixed< T, n > vnl_vector_fixed< T, n >::apply | ( | T(*)(T) | f | ) |
Apply f to each element.
Returns a new vector with the result.
Definition at line 17 of file vnl_vector_fixed.txx.
| vnl_vector_fixed< T, n > vnl_vector_fixed< T, n >::apply | ( | T(*)(const T &) | f | ) |
Apply f to each element.
Returns a new vector with the result.
Definition at line 27 of file vnl_vector_fixed.txx.
| vnl_vector_fixed<T,n>& vnl_vector_fixed< T, n >::operator+= | ( | T | s | ) | [inline] |
Definition at line 298 of file vnl_vector_fixed.h.
| vnl_vector_fixed<T,n>& vnl_vector_fixed< T, n >::operator-= | ( | T | s | ) | [inline] |
Definition at line 301 of file vnl_vector_fixed.h.
| vnl_vector_fixed<T,n>& vnl_vector_fixed< T, n >::operator *= | ( | T | s | ) | [inline] |
Definition at line 304 of file vnl_vector_fixed.h.
| vnl_vector_fixed<T,n>& vnl_vector_fixed< T, n >::operator/= | ( | T | s | ) | [inline] |
Definition at line 307 of file vnl_vector_fixed.h.
| vnl_vector_fixed<T,n>& vnl_vector_fixed< T, n >::operator+= | ( | const vnl_vector_fixed< T, n > & | v | ) | [inline] |
Definition at line 310 of file vnl_vector_fixed.h.
| vnl_vector_fixed<T,n>& vnl_vector_fixed< T, n >::operator-= | ( | const vnl_vector_fixed< T, n > & | v | ) | [inline] |
Definition at line 313 of file vnl_vector_fixed.h.
| vnl_vector_fixed<T,n>& vnl_vector_fixed< T, n >::operator+= | ( | const vnl_vector< T > & | v | ) | [inline] |
Definition at line 316 of file vnl_vector_fixed.h.
| vnl_vector_fixed<T,n>& vnl_vector_fixed< T, n >::operator-= | ( | const vnl_vector< T > & | v | ) | [inline] |
Definition at line 323 of file vnl_vector_fixed.h.
| vnl_vector_fixed<T,n> vnl_vector_fixed< T, n >::operator- | ( | ) | const [inline] |
Definition at line 330 of file vnl_vector_fixed.h.
| vnl_vector< T > vnl_vector_fixed< T, n >::extract | ( | unsigned int | len, | |
| unsigned int | start = 0 | |||
| ) | const |
Returns a subvector specified by the start index and length. O(n).
Definition at line 38 of file vnl_vector_fixed.txx.
| vnl_vector<T> vnl_vector_fixed< T, n >::as_vector | ( | ) | const [inline] |
| vnl_vector_fixed< T, n > & vnl_vector_fixed< T, n >::update | ( | vnl_vector< T > const & | , | |
| unsigned int | start = 0 | |||
| ) |
Replaces elements with index beginning at start, by values of v. O(n).
Definition at line 46 of file vnl_vector_fixed.txx.
| abs_t vnl_vector_fixed< T, n >::squared_magnitude | ( | ) | const [inline] |
| abs_t vnl_vector_fixed< T, n >::magnitude | ( | ) | const [inline] |
| abs_t vnl_vector_fixed< T, n >::one_norm | ( | ) | const [inline] |
| abs_t vnl_vector_fixed< T, n >::two_norm | ( | ) | const [inline] |
Return sqrt of sum of squares of values of elements.
Definition at line 359 of file vnl_vector_fixed.h.
| abs_t vnl_vector_fixed< T, n >::inf_norm | ( | ) | const [inline] |
| vnl_vector_fixed<T,n>& vnl_vector_fixed< T, n >::normalize | ( | ) | [inline] |
| abs_t vnl_vector_fixed< T, n >::rms | ( | ) | const [inline] |
| T vnl_vector_fixed< T, n >::min_value | ( | ) | const [inline] |
| T vnl_vector_fixed< T, n >::max_value | ( | ) | const [inline] |
| unsigned vnl_vector_fixed< T, n >::arg_min | ( | ) | const [inline] |
| unsigned vnl_vector_fixed< T, n >::arg_max | ( | ) | const [inline] |
| T vnl_vector_fixed< T, n >::mean | ( | ) | const [inline] |
| T vnl_vector_fixed< T, n >::sum | ( | ) | const [inline] |
| void vnl_vector_fixed< T, n >::flip | ( | ) |
Reverse the order of the elements.
Element i swaps with element size()-1-i
Definition at line 57 of file vnl_vector_fixed.txx.
| void vnl_vector_fixed< T, n >::assert_size | ( | unsigned | sz | ) | const [inline] |
Check that size()==sz if not, abort();.
This function does or tests nothing if NDEBUG is defined
Definition at line 397 of file vnl_vector_fixed.h.
| void vnl_vector_fixed< T, n >::assert_finite | ( | ) | const [inline] |
Check that this is finite if not, abort();.
This function does or tests nothing if NDEBUG is defined
Definition at line 401 of file vnl_vector_fixed.h.
| bool vnl_vector_fixed< T, n >::is_finite | ( | ) | const |
| bool vnl_vector_fixed< T, n >::is_zero | ( | ) | const |
| bool vnl_vector_fixed< T, n >::empty | ( | ) | const [inline] |
| bool vnl_vector_fixed< T, n >::operator_eq | ( | vnl_vector_fixed< T, n > const & | v | ) | const [inline] |
| bool vnl_vector_fixed< T, n >::operator_eq | ( | vnl_vector< T > const & | v | ) | const [inline] |
| bool vnl_vector_fixed< T, n >::read_ascii | ( | vcl_istream & | s | ) |
| void vnl_vector_fixed< T, n >::print | ( | vcl_ostream & | s | ) | const |
Display the vector.
Output each element separated by a single space.
Definition at line 111 of file vnl_vector_fixed.txx.
| static void vnl_vector_fixed< T, n >::add | ( | const T * | a, | |
| const T * | b, | |||
| T * | r | |||
| ) | [inline, static] |
Definition at line 448 of file vnl_vector_fixed.h.
| static void vnl_vector_fixed< T, n >::add | ( | const T * | a, | |
| T | b, | |||
| T * | r | |||
| ) | [inline, static] |
Definition at line 454 of file vnl_vector_fixed.h.
| static void vnl_vector_fixed< T, n >::sub | ( | const T * | a, | |
| const T * | b, | |||
| T * | r | |||
| ) | [inline, static] |
Definition at line 460 of file vnl_vector_fixed.h.
| static void vnl_vector_fixed< T, n >::sub | ( | const T * | a, | |
| T | b, | |||
| T * | r | |||
| ) | [inline, static] |
Definition at line 466 of file vnl_vector_fixed.h.
| static void vnl_vector_fixed< T, n >::sub | ( | T | a, | |
| const T * | b, | |||
| T * | r | |||
| ) | [inline, static] |
Definition at line 472 of file vnl_vector_fixed.h.
| static void vnl_vector_fixed< T, n >::mul | ( | const T * | a, | |
| const T * | b, | |||
| T * | r | |||
| ) | [inline, static] |
Definition at line 478 of file vnl_vector_fixed.h.
| static void vnl_vector_fixed< T, n >::mul | ( | const T * | a, | |
| T | b, | |||
| T * | r | |||
| ) | [inline, static] |
Definition at line 484 of file vnl_vector_fixed.h.
| static void vnl_vector_fixed< T, n >::div | ( | const T * | a, | |
| const T * | b, | |||
| T * | r | |||
| ) | [inline, static] |
Definition at line 490 of file vnl_vector_fixed.h.
| static void vnl_vector_fixed< T, n >::div | ( | const T * | a, | |
| T | b, | |||
| T * | r | |||
| ) | [inline, static] |
Definition at line 496 of file vnl_vector_fixed.h.
| void vnl_vector_fixed< T, n >::assert_finite_internal | ( | ) | const [private] |
| void vsl_b_write | ( | vsl_b_ostream & | os, | |
| const vnl_vector_fixed< T, n > & | v | |||
| ) | [related] |
Binary save vnl_vector_fixed to stream.
| void vsl_b_read | ( | vsl_b_istream & | is, | |
| vnl_vector_fixed< T, n > & | v | |||
| ) | [related] |
Binary load vnl_vector_fixed from stream.
| void vsl_print_summary | ( | vcl_ostream & | os, | |
| const vnl_vector_fixed< T, n > & | b | |||
| ) | [related] |
Print human readable summary of object to a stream.
| T vnl_cross_2d | ( | const vnl_vector_fixed< T, 2 > & | v1, | |
| const vnl_vector_fixed< T, 2 > & | v2 | |||
| ) | [related] |
| T vnl_cross_2d | ( | vnl_vector_fixed< T, 2 > const & | v1, | |
| vnl_vector< T > const & | v2 | |||
| ) | [related] |
| T vnl_cross_2d | ( | vnl_vector< T > const & | v1, | |
| vnl_vector_fixed< T, 2 > const & | v2 | |||
| ) | [related] |
| vnl_vector_fixed< T, 3 > vnl_cross_3d | ( | const vnl_vector_fixed< T, 3 > & | v1, | |
| const vnl_vector_fixed< T, 3 > & | v2 | |||
| ) | [related] |
| vnl_vector_fixed< T, n > vnl_cross_3d | ( | const vnl_vector_fixed< T, n > & | a, | |
| const vnl_vector< T > & | b | |||
| ) | [related] |
| vnl_vector_fixed< T, n > vnl_cross_3d | ( | const vnl_vector< T > & | a, | |
| const vnl_vector_fixed< T, n > & | b | |||
| ) | [related] |
| vnl_vector_fixed< T, N > operator * | ( | vnl_diag_matrix_fixed< T, N > const & | D, | |
| vnl_vector_fixed< T, N > const & | A | |||
| ) | [related] |
Multiply a vnl_diag_matrix_fixed by a vnl_vector_fixed. n flops.
Definition at line 304 of file vnl_diag_matrix_fixed.h.
| vnl_vector_fixed< T, N > operator * | ( | vnl_vector_fixed< T, N > const & | A, | |
| vnl_diag_matrix_fixed< T, N > const & | D | |||
| ) | [related] |
Multiply a vnl_vector_fixed by a vnl_diag_matrix_fixed. n flops.
Definition at line 313 of file vnl_diag_matrix_fixed.h.
| double vnl_cross_2d | ( | vnl_double_2 const & | v1, | |
| vnl_double_2 const & | v2 | |||
| ) | [related] |
| vnl_double_3 vnl_cross_3d | ( | vnl_double_3 const & | v1, | |
| vnl_double_3 const & | v2 | |||
| ) | [related] |
| float vnl_cross_2d | ( | vnl_float_2 const & | v1, | |
| vnl_float_2 const & | v2 | |||
| ) | [related] |
| vnl_float_3 vnl_cross_3d | ( | vnl_float_3 const & | v1, | |
| vnl_float_3 const & | v2 | |||
| ) | [related] |
| vnl_double_3 operator+ | ( | const vnl_double_3 & | a, | |
| const vnl_double_3 & | b | |||
| ) | [related] |
| vcl_ostream & vnl_matlab_print | ( | vcl_ostream & | , | |
| vnl_vector_fixed< T, n > const & | , | |||
| char const * | variable_name = 0, |
|||
| vnl_matlab_print_format | = vnl_matlab_print_format_default | |||
| ) | [related] |
print a vnl_vector_fixed<T>.
| vnl_matrix_fixed< T, m, n > outer_product | ( | vnl_vector_fixed< T, m > const & | a, | |
| vnl_vector_fixed< T, n > const & | b | |||
| ) | [related] |
| bool operator< | ( | vnl_vector_fixed< T, n > const & | lhs, | |
| vnl_vector_fixed< T, n > const & | rhs | |||
| ) | [related] |
Define a complete ordering on vnl_vector_fixed.
This is useful to create a set, or map of vectors.
Definition at line 70 of file vnl_operators.h.
| vnl_vector_fixed< T, n > operator+ | ( | const vnl_vector_fixed< T, n > & | v, | |
| T | s | |||
| ) | [related] |
Definition at line 513 of file vnl_vector_fixed.h.
| vnl_vector_fixed< T, n > operator+ | ( | const T & | s, | |
| const vnl_vector_fixed< T, n > & | v | |||
| ) | [related] |
Definition at line 523 of file vnl_vector_fixed.h.
| vnl_vector_fixed< T, n > operator- | ( | const vnl_vector_fixed< T, n > & | v, | |
| T | s | |||
| ) | [related] |
Definition at line 534 of file vnl_vector_fixed.h.
| vnl_vector_fixed< T, n > operator- | ( | const T & | s, | |
| const vnl_vector_fixed< T, n > & | v | |||
| ) | [related] |
Definition at line 544 of file vnl_vector_fixed.h.
| vnl_vector_fixed< T, n > operator * | ( | const vnl_vector_fixed< T, n > & | v, | |
| T | s | |||
| ) | [related] |
Definition at line 555 of file vnl_vector_fixed.h.
| vnl_vector_fixed< T, n > operator * | ( | const T & | s, | |
| const vnl_vector_fixed< T, n > & | v | |||
| ) | [related] |
Definition at line 565 of file vnl_vector_fixed.h.
| vnl_vector_fixed< T, n > operator/ | ( | const vnl_vector_fixed< T, n > & | v, | |
| T | s | |||
| ) | [related] |
Definition at line 576 of file vnl_vector_fixed.h.
| vnl_vector_fixed< T, n > operator+ | ( | const vnl_vector_fixed< T, n > & | a, | |
| const vnl_vector_fixed< T, n > & | b | |||
| ) | [related] |
Definition at line 593 of file vnl_vector_fixed.h.
| vnl_vector< T > operator+ | ( | const vnl_vector_fixed< T, n > & | a, | |
| const vnl_vector< T > & | b | |||
| ) | [related] |
Definition at line 604 of file vnl_vector_fixed.h.
| vnl_vector< T > operator+ | ( | const vnl_vector< T > & | a, | |
| const vnl_vector_fixed< T, n > & | b | |||
| ) | [related] |
Definition at line 613 of file vnl_vector_fixed.h.
| vnl_vector_fixed< T, n > operator- | ( | const vnl_vector_fixed< T, n > & | a, | |
| const vnl_vector_fixed< T, n > & | b | |||
| ) | [related] |
Definition at line 621 of file vnl_vector_fixed.h.
| vnl_vector< T > operator- | ( | const vnl_vector_fixed< T, n > & | a, | |
| const vnl_vector< T > & | b | |||
| ) | [related] |
Definition at line 632 of file vnl_vector_fixed.h.
| vnl_vector< T > operator- | ( | const vnl_vector< T > & | a, | |
| const vnl_vector_fixed< T, n > & | b | |||
| ) | [related] |
Definition at line 641 of file vnl_vector_fixed.h.
| vnl_vector_fixed< T, n > element_product | ( | const vnl_vector_fixed< T, n > & | a, | |
| const vnl_vector_fixed< T, n > & | b | |||
| ) | [related] |
Definition at line 649 of file vnl_vector_fixed.h.
| vnl_vector< T > element_product | ( | const vnl_vector_fixed< T, n > & | a, | |
| const vnl_vector< T > & | b | |||
| ) | [related] |
Definition at line 660 of file vnl_vector_fixed.h.
| vnl_vector< T > element_product | ( | const vnl_vector< T > & | a, | |
| const vnl_vector_fixed< T, n > & | b | |||
| ) | [related] |
Definition at line 672 of file vnl_vector_fixed.h.
| vnl_vector_fixed< T, n > element_quotient | ( | const vnl_vector_fixed< T, n > & | a, | |
| const vnl_vector_fixed< T, n > & | b | |||
| ) | [related] |
Definition at line 683 of file vnl_vector_fixed.h.
| vnl_vector< T > element_quotient | ( | const vnl_vector_fixed< T, n > & | a, | |
| const vnl_vector< T > & | b | |||
| ) | [related] |
Definition at line 694 of file vnl_vector_fixed.h.
| vnl_vector< T > element_quotient | ( | const vnl_vector< T > & | a, | |
| const vnl_vector_fixed< T, n > & | b | |||
| ) | [related] |
Definition at line 706 of file vnl_vector_fixed.h.
| T dot_product | ( | const vnl_vector_fixed< T, n > & | a, | |
| const vnl_vector_fixed< T, n > & | b | |||
| ) | [related] |
Definition at line 717 of file vnl_vector_fixed.h.
| T dot_product | ( | const vnl_vector_fixed< T, n > & | a, | |
| const vnl_vector< T > & | b | |||
| ) | [related] |
Definition at line 726 of file vnl_vector_fixed.h.
| T dot_product | ( | const vnl_vector< T > & | a, | |
| const vnl_vector_fixed< T, n > & | b | |||
| ) | [related] |
Definition at line 735 of file vnl_vector_fixed.h.
| vnl_matrix< T > outer_product | ( | const vnl_vector< T > & | a, | |
| const vnl_vector_fixed< T, n > & | b | |||
| ) | [related] |
Definition at line 744 of file vnl_vector_fixed.h.
| vnl_matrix< T > outer_product | ( | const vnl_vector_fixed< T, n > & | a, | |
| const vnl_vector< T > & | b | |||
| ) | [related] |
Definition at line 753 of file vnl_vector_fixed.h.
| T angle | ( | const vnl_vector_fixed< T, n > & | a, | |
| const vnl_vector_fixed< T, n > & | b | |||
| ) | [related] |
Definition at line 761 of file vnl_vector_fixed.h.
| T angle | ( | const vnl_vector_fixed< T, n > & | a, | |
| const vnl_vector< T > & | b | |||
| ) | [related] |
Definition at line 770 of file vnl_vector_fixed.h.
| T angle | ( | const vnl_vector< T > & | a, | |
| const vnl_vector_fixed< T, n > & | b | |||
| ) | [related] |
Definition at line 779 of file vnl_vector_fixed.h.
| T vnl_vector_ssd | ( | const vnl_vector_fixed< T, n > & | a, | |
| const vnl_vector_fixed< T, n > & | b | |||
| ) | [related] |
Definition at line 788 of file vnl_vector_fixed.h.
| T vnl_vector_ssd | ( | const vnl_vector_fixed< T, n > & | a, | |
| const vnl_vector< T > & | b | |||
| ) | [related] |
Definition at line 797 of file vnl_vector_fixed.h.
| T vnl_vector_ssd | ( | const vnl_vector< T > & | a, | |
| const vnl_vector_fixed< T, n > & | b | |||
| ) | [related] |
Definition at line 806 of file vnl_vector_fixed.h.
| bool operator== | ( | const vnl_vector_fixed< T, n > & | a, | |
| const vnl_vector_fixed< T, n > & | b | |||
| ) | [related] |
Definition at line 815 of file vnl_vector_fixed.h.
| bool operator== | ( | vnl_vector_fixed< T, n > const & | a, | |
| vnl_vector< T > const & | b | |||
| ) | [related] |
Definition at line 824 of file vnl_vector_fixed.h.
| bool operator== | ( | vnl_vector< T > const & | a, | |
| vnl_vector_fixed< T, n > const & | b | |||
| ) | [related] |
Definition at line 833 of file vnl_vector_fixed.h.
| bool operator!= | ( | const vnl_vector_fixed< T, n > & | a, | |
| const vnl_vector_fixed< T, n > & | b | |||
| ) | [related] |
Definition at line 841 of file vnl_vector_fixed.h.
| bool operator!= | ( | vnl_vector_fixed< T, n > const & | a, | |
| vnl_vector< T > const & | b | |||
| ) | [related] |
Definition at line 850 of file vnl_vector_fixed.h.
| bool operator!= | ( | vnl_vector< T > const & | a, | |
| vnl_vector_fixed< T, n > const & | b | |||
| ) | [related] |
Definition at line 859 of file vnl_vector_fixed.h.
| vcl_ostream & operator<< | ( | vcl_ostream & | ostr, | |
| const vnl_vector_fixed< T, n > & | v | |||
| ) | [related] |
Definition at line 872 of file vnl_vector_fixed.h.
| vcl_istream & operator>> | ( | vcl_istream & | ostr, | |
| vnl_vector_fixed< T, n > & | v | |||
| ) | [related] |
Definition at line 882 of file vnl_vector_fixed.h.
| vnl_vector_fixed< T, n > operator+ | ( | const vnl_vector_fixed_ref_const< T, n > & | v, | |
| T | s | |||
| ) | [related] |
| vnl_vector_fixed< T, n > operator+ | ( | T | s, | |
| const vnl_vector_fixed_ref_const< T, n > & | v | |||
| ) | [related] |
| vnl_vector_fixed< T, n > operator- | ( | const vnl_vector_fixed_ref_const< T, n > & | v, | |
| T | s | |||
| ) | [related] |
| vnl_vector_fixed< T, n > operator- | ( | T | s, | |
| const vnl_vector_fixed_ref_const< T, n > & | v | |||
| ) | [related] |
| vnl_vector_fixed< T, n > operator * | ( | const vnl_vector_fixed_ref_const< T, n > & | v, | |
| T | s | |||
| ) | [related] |
| vnl_vector_fixed< T, n > operator * | ( | T | s, | |
| const vnl_vector_fixed_ref_const< T, n > & | v | |||
| ) | [related] |
| vnl_vector_fixed< T, n > operator/ | ( | const vnl_vector_fixed_ref_const< T, n > & | v, | |
| T | s | |||
| ) | [related] |
| vnl_vector_fixed< T, n > operator+ | ( | const vnl_vector_fixed_ref_const< T, n > & | a, | |
| const vnl_vector_fixed_ref_const< T, n > & | b | |||
| ) | [related] |
| vnl_vector_fixed< T, n > operator- | ( | const vnl_vector_fixed_ref_const< T, n > & | a, | |
| const vnl_vector_fixed_ref_const< T, n > & | b | |||
| ) | [related] |
| vcl_ostream & operator<< | ( | vcl_ostream & | o, | |
| const vnl_vector_fixed_ref_const< T, n > & | v | |||
| ) | [related] |
| vcl_istream & operator>> | ( | vcl_istream & | i, | |
| const vnl_vector_fixed_ref< T, n > & | v | |||
| ) | [related] |
| void x_write | ( | vcl_ostream & | os, | |
| const vnl_vector_fixed< T, n > & | v, | |||
| vcl_string | name = "vnl_vector_fixed< T, n >" | |||
| ) | [related] |
XML save vnl_vector_fixed to stream.
T vnl_vector_fixed< T, n >::data_[n] [protected] |
Definition at line 93 of file vnl_vector_fixed.h.
1.5.1