#include <vnl_vector_fixed_ref.h>
Public Types | |
typedef unsigned int | size_type |
typedef T | element_type |
Type defs for iterators. | |
typedef T const * | 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_ref_const (vnl_vector_fixed< T, n > const &rhs) | |
vnl_vector_fixed_ref_const (const T *dataptr) | |
vnl_vector_fixed_ref_const (const vnl_vector_fixed_ref_const< T, n > &rhs) | |
const T * | data_block () const |
unsigned | size () const |
Length of the vector. | |
T | get (unsigned int i) const |
Get value at element i. | |
void | copy_out (T *ptr) const |
Copy elements to ptr[i]. | |
T const & | operator() (unsigned int i) const |
Return reference to the element at specified index. | |
const T & | operator[] (unsigned int i) const |
Return the i-th element. | |
const vnl_vector_ref< T > | as_ref () const |
Explicit conversion to a vnl_vector_ref. | |
operator const vnl_vector_ref< T > () const | |
Cheap conversion to vnl_vector_ref. | |
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)) const |
Apply f to each element. | |
vnl_vector_fixed< T, n > | apply (T(*f)(const T &)) const |
Apply f to each element. | |
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. | |
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. | |
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 | 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 it's 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_ref_const< T, n > const &v) const |
Return true if *this == v. | |
bool | operator_eq (vnl_vector< T > const &v) const |
Return true if *this == v. | |
void | print (vcl_ostream &s) const |
Display the vector. | |
bool | operator== (vnl_vector_fixed_ref_const< T, n > const &that) const |
Equality operator. | |
bool | operator!= (vnl_vector_fixed_ref_const< T, n > const &that) const |
Inequality operator. | |
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 | |
const T * | data_ |
Private Member Functions | |
const vnl_vector_fixed_ref_const< T, n > & | operator= (const vnl_vector_fixed< T, n > &) const |
See assert_finite(). | |
const vnl_vector_fixed_ref_const< T, n > & | operator= (const vnl_vector_fixed_ref_const< T, n > &) const |
void | assert_finite_internal () const |
Definition at line 29 of file vnl_vector_fixed_ref.h.
typedef vnl_c_vector<T>::abs_t vnl_vector_fixed_ref_const< T, n >::abs_t |
Definition at line 139 of file vnl_vector_fixed_ref.h.
typedef T const* vnl_vector_fixed_ref_const< T, n >::const_iterator |
Const iterator type.
Definition at line 109 of file vnl_vector_fixed_ref.h.
typedef T vnl_vector_fixed_ref_const< T, n >::element_type |
Type defs for iterators.
Definition at line 104 of file vnl_vector_fixed_ref.h.
typedef T const* vnl_vector_fixed_ref_const< T, n >::iterator |
Type defs for iterators.
Reimplemented in vnl_vector_fixed_ref< T, n >.
Definition at line 106 of file vnl_vector_fixed_ref.h.
typedef unsigned int vnl_vector_fixed_ref_const< T, n >::size_type |
Reimplemented in vnl_vector_fixed_ref< T, n >.
Definition at line 35 of file vnl_vector_fixed_ref.h.
vnl_vector_fixed_ref_const< T, n >::vnl_vector_fixed_ref_const | ( | vnl_vector_fixed< T, n > const & | rhs | ) | [inline] |
Definition at line 37 of file vnl_vector_fixed_ref.h.
vnl_vector_fixed_ref_const< T, n >::vnl_vector_fixed_ref_const | ( | const T * | dataptr | ) | [inline, explicit] |
Definition at line 39 of file vnl_vector_fixed_ref.h.
vnl_vector_fixed_ref_const< T, n >::vnl_vector_fixed_ref_const | ( | const vnl_vector_fixed_ref_const< T, n > & | rhs | ) | [inline] |
Definition at line 41 of file vnl_vector_fixed_ref.h.
static void vnl_vector_fixed_ref_const< T, n >::add | ( | const T * | a, |
const T * | b, | ||
T * | r | ||
) | [inline, static] |
Definition at line 229 of file vnl_vector_fixed_ref.h.
static void vnl_vector_fixed_ref_const< T, n >::add | ( | const T * | a, |
T | b, | ||
T * | r | ||
) | [inline, static] |
Definition at line 234 of file vnl_vector_fixed_ref.h.
vnl_vector_fixed< T, n > vnl_vector_fixed_ref_const< T, n >::apply | ( | T(*)(T) | f | ) | const |
Apply f to each element.
Returns a new vector with the result.
Definition at line 19 of file vnl_vector_fixed_ref.txx.
vnl_vector_fixed< T, n > vnl_vector_fixed_ref_const< T, n >::apply | ( | T(*)(const T &) | f | ) | const |
Apply f to each element.
Returns a new vector with the result.
Definition at line 29 of file vnl_vector_fixed_ref.txx.
unsigned vnl_vector_fixed_ref_const< T, n >::arg_max | ( | ) | const [inline] |
Location of largest value.
Definition at line 173 of file vnl_vector_fixed_ref.h.
unsigned vnl_vector_fixed_ref_const< T, n >::arg_min | ( | ) | const [inline] |
Location of smallest value.
Definition at line 170 of file vnl_vector_fixed_ref.h.
const vnl_vector_ref<T> vnl_vector_fixed_ref_const< 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_ref but not for vnl_vector_fixed_ref. There is also a conversion operator that should work most of the time.
Definition at line 93 of file vnl_vector_fixed_ref.h.
vnl_vector<T> vnl_vector_fixed_ref_const< T, n >::as_vector | ( | ) | const [inline] |
Convert to a vnl_vector.
Definition at line 135 of file vnl_vector_fixed_ref.h.
void vnl_vector_fixed_ref_const< 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 188 of file vnl_vector_fixed_ref.h.
void vnl_vector_fixed_ref_const< T, n >::assert_finite_internal | ( | ) | const [private] |
Definition at line 103 of file vnl_vector_fixed_ref.txx.
void vnl_vector_fixed_ref_const< 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 184 of file vnl_vector_fixed_ref.h.
const_iterator vnl_vector_fixed_ref_const< T, n >::begin | ( | ) | const [inline] |
Iterator pointing to start of data.
Reimplemented in vnl_vector_fixed_ref< T, n >.
Definition at line 111 of file vnl_vector_fixed_ref.h.
void vnl_vector_fixed_ref_const< 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 59 of file vnl_vector_fixed_ref.h.
const T* vnl_vector_fixed_ref_const< T, n >::data_block | ( | ) | const [inline] |
Reimplemented in vnl_vector_fixed_ref< T, n >.
Definition at line 43 of file vnl_vector_fixed_ref.h.
static void vnl_vector_fixed_ref_const< T, n >::div | ( | const T * | a, |
const T * | b, | ||
T * | r | ||
) | [inline, static] |
Definition at line 264 of file vnl_vector_fixed_ref.h.
static void vnl_vector_fixed_ref_const< T, n >::div | ( | const T * | a, |
T | b, | ||
T * | r | ||
) | [inline, static] |
Definition at line 269 of file vnl_vector_fixed_ref.h.
bool vnl_vector_fixed_ref_const< T, n >::empty | ( | ) | const [inline] |
Return true iff the size is zero.
Definition at line 201 of file vnl_vector_fixed_ref.h.
const_iterator vnl_vector_fixed_ref_const< T, n >::end | ( | ) | const [inline] |
Iterator pointing to element beyond end of data.
Reimplemented in vnl_vector_fixed_ref< T, n >.
Definition at line 113 of file vnl_vector_fixed_ref.h.
vnl_vector< T > vnl_vector_fixed_ref_const< 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 40 of file vnl_vector_fixed_ref.txx.
T vnl_vector_fixed_ref_const< T, n >::get | ( | unsigned int | i | ) | const [inline] |
Get value at element i.
Definition at line 55 of file vnl_vector_fixed_ref.h.
abs_t vnl_vector_fixed_ref_const< T, n >::inf_norm | ( | ) | const [inline] |
Return largest absolute element value.
Definition at line 154 of file vnl_vector_fixed_ref.h.
bool vnl_vector_fixed_ref_const< T, n >::is_finite | ( | ) | const |
Return true if it's finite.
Definition at line 68 of file vnl_vector_fixed_ref.txx.
bool vnl_vector_fixed_ref_const< T, n >::is_zero | ( | ) | const |
Return true iff all the entries are zero.
Definition at line 80 of file vnl_vector_fixed_ref.txx.
abs_t vnl_vector_fixed_ref_const< T, n >::magnitude | ( | ) | const [inline] |
Return magnitude (length) of vector.
Definition at line 145 of file vnl_vector_fixed_ref.h.
T vnl_vector_fixed_ref_const< T, n >::max_value | ( | ) | const [inline] |
Largest value.
Definition at line 167 of file vnl_vector_fixed_ref.h.
T vnl_vector_fixed_ref_const< T, n >::mean | ( | ) | const [inline] |
Mean of values in vector.
Definition at line 176 of file vnl_vector_fixed_ref.h.
T vnl_vector_fixed_ref_const< T, n >::min_value | ( | ) | const [inline] |
Smallest value.
Definition at line 164 of file vnl_vector_fixed_ref.h.
static void vnl_vector_fixed_ref_const< T, n >::mul | ( | const T * | a, |
const T * | b, | ||
T * | r | ||
) | [inline, static] |
Definition at line 254 of file vnl_vector_fixed_ref.h.
static void vnl_vector_fixed_ref_const< T, n >::mul | ( | const T * | a, |
T | b, | ||
T * | r | ||
) | [inline, static] |
Definition at line 259 of file vnl_vector_fixed_ref.h.
abs_t vnl_vector_fixed_ref_const< T, n >::one_norm | ( | ) | const [inline] |
Return sum of absolute values of the elements.
Definition at line 148 of file vnl_vector_fixed_ref.h.
vnl_vector_fixed_ref_const< T, n >::operator const vnl_vector_ref< T > | ( | ) | 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 99 of file vnl_vector_fixed_ref.h.
bool vnl_vector_fixed_ref_const< T, n >::operator!= | ( | vnl_vector_fixed_ref_const< T, n > const & | that | ) | const [inline] |
Inequality operator.
Definition at line 279 of file vnl_vector_fixed_ref.h.
T const& vnl_vector_fixed_ref_const< 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.
Reimplemented in vnl_vector_fixed_ref< T, n >.
Definition at line 67 of file vnl_vector_fixed_ref.h.
vnl_vector_fixed<T,n> vnl_vector_fixed_ref_const< T, n >::operator- | ( | ) | const [inline] |
Definition at line 125 of file vnl_vector_fixed_ref.h.
const vnl_vector_fixed_ref_const<T,n>& vnl_vector_fixed_ref_const< T, n >::operator= | ( | const vnl_vector_fixed< T, n > & | ) | const [inline, private] |
See assert_finite().
Reimplemented in vnl_vector_fixed_ref< T, n >.
Definition at line 283 of file vnl_vector_fixed_ref.h.
const vnl_vector_fixed_ref_const<T,n>& vnl_vector_fixed_ref_const< T, n >::operator= | ( | const vnl_vector_fixed_ref_const< T, n > & | ) | const [inline, private] |
Reimplemented in vnl_vector_fixed_ref< T, n >.
Definition at line 288 of file vnl_vector_fixed_ref.h.
bool vnl_vector_fixed_ref_const< T, n >::operator== | ( | vnl_vector_fixed_ref_const< T, n > const & | that | ) | const [inline] |
Equality operator.
Definition at line 276 of file vnl_vector_fixed_ref.h.
const T& vnl_vector_fixed_ref_const< T, n >::operator[] | ( | unsigned int | i | ) | const [inline] |
Return the i-th element.
Reimplemented in vnl_vector_fixed_ref< T, n >.
Definition at line 77 of file vnl_vector_fixed_ref.h.
bool vnl_vector_fixed_ref_const< T, n >::operator_eq | ( | vnl_vector_fixed_ref_const< T, n > const & | v | ) | const [inline] |
Return true if *this == v.
Definition at line 204 of file vnl_vector_fixed_ref.h.
bool vnl_vector_fixed_ref_const< T, n >::operator_eq | ( | vnl_vector< T > const & | v | ) | const [inline] |
Return true if *this == v.
Definition at line 212 of file vnl_vector_fixed_ref.h.
void vnl_vector_fixed_ref_const< T, n >::print | ( | vcl_ostream & | s | ) | const |
Display the vector.
Output each element separated by a single space.
Definition at line 114 of file vnl_vector_fixed_ref.txx.
abs_t vnl_vector_fixed_ref_const< T, n >::rms | ( | ) | const [inline] |
Root Mean Squares of values.
Definition at line 161 of file vnl_vector_fixed_ref.h.
unsigned vnl_vector_fixed_ref_const< T, n >::size | ( | ) | const [inline] |
abs_t vnl_vector_fixed_ref_const< T, n >::squared_magnitude | ( | ) | const [inline] |
Return sum of squares of elements.
Definition at line 142 of file vnl_vector_fixed_ref.h.
static void vnl_vector_fixed_ref_const< T, n >::sub | ( | const T * | a, |
const T * | b, | ||
T * | r | ||
) | [inline, static] |
Definition at line 239 of file vnl_vector_fixed_ref.h.
static void vnl_vector_fixed_ref_const< T, n >::sub | ( | const T * | a, |
T | b, | ||
T * | r | ||
) | [inline, static] |
Definition at line 244 of file vnl_vector_fixed_ref.h.
static void vnl_vector_fixed_ref_const< T, n >::sub | ( | T | a, |
const T * | b, | ||
T * | r | ||
) | [inline, static] |
Definition at line 249 of file vnl_vector_fixed_ref.h.
T vnl_vector_fixed_ref_const< T, n >::sum | ( | ) | const [inline] |
Sum of values in a vector.
Definition at line 179 of file vnl_vector_fixed_ref.h.
abs_t vnl_vector_fixed_ref_const< T, n >::two_norm | ( | ) | const [inline] |
Return sqrt of sum of squares of values of elements.
Definition at line 151 of file vnl_vector_fixed_ref.h.
const T* vnl_vector_fixed_ref_const< T, n >::data_ [protected] |
Definition at line 32 of file vnl_vector_fixed_ref.h.