Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | Private Member Functions | Related Functions | List of all members
vnl_vector_fixed< T, n > Class Template Reference

Fixed length stack-stored, space-efficient vector. More...

#include <vnl_fwd.h>

Inheritance diagram for vnl_vector_fixed< T, n >:
Inheritance graph
[legend]

Public Types

enum  { SIZE = n }
 
typedef vnl_vector_fixed< T, n > self
 
typedef size_t size_type
 
typedef T element_type
 Type defs for iterators. More...
 
typedef T * iterator
 Type defs for iterators. More...
 
typedef T const * const_iterator
 Const iterator type. More...
 
typedef vnl_c_vector< T >::abs_t abs_t
 

Public Member Functions

 vnl_vector_fixed ()=default
 Construct an uninitialized n-vector. More...
 
 vnl_vector_fixed (const vnl_vector_fixed< T, n > &rhs)=default
 Copy constructor. More...
 
 vnl_vector_fixed (vnl_vector_fixed< T, n > &&rhs)=default
 
vnl_vector_fixed< T, n > & operator= (const vnl_vector_fixed< T, n > &rhs)=default
 Copy operator. More...
 
vnl_vector_fixed< T, n > & operator= (vnl_vector_fixed< T, n > &&rhs)=default
 
 vnl_vector_fixed (const vnl_vector< T > &rhs)
 Construct a fixed-n-vector copy of rhs. More...
 
 vnl_vector_fixed (const T &v)
 Constructs n-vector with all elements initialised to v. More...
 
 vnl_vector_fixed (const T *datablck)
 Construct a fixed-n-vector initialized from datablck. More...
 
 vnl_vector_fixed (const T &x0, const T &x1)
 Convenience constructor for 2-D vectors. More...
 
 vnl_vector_fixed (const T &x0, const T &x1, const T &x2)
 Convenience constructor for 3-D vectors. More...
 
 vnl_vector_fixed (const T &x0, const T &x1, const T &x2, const T &x3)
 Convenience constructor for 4-D vectors. More...
 
vnl_vector_fixed< T, n > & operator= (const vnl_vector< T > &rhs)
 Copy data from a dynamic vector. More...
 
unsigned int size () const
 Length of the vector. More...
 
void put (unsigned int i, T const &v)
 Put value at given position in vector. More...
 
get (unsigned int i) const
 Get value at element i. More...
 
vnl_vector_fixedfill (T const &v)
 Set all values to v. More...
 
vnl_vector_fixedcopy_in (T const *ptr)
 Sets elements to ptr[i]. More...
 
void copy_out (T *ptr) const
 Copy elements to ptr[i]. More...
 
vnl_vector_fixedset (T const *ptr)
 Sets elements to ptr[i]. More...
 
T & operator() (unsigned int i)
 Return reference to the element at specified index. More...
 
T const & operator() (unsigned int i) const
 Return reference to the element at specified index. More...
 
T & operator[] (const size_t i)
 Return the i-th element. More...
 
const T & operator[] (const size_t i) const
 Return the i-th element. More...
 
T const * data_block () const
 Access the contiguous block storing the elements in the vector. More...
 
T * data_block ()
 Access the contiguous block storing the elements in the vector. More...
 
vnl_vector_ref< T > as_ref ()
 Explicit conversion to a vnl_vector_ref. More...
 
const vnl_vector_ref< T > as_ref () const
 Explicit conversion to a vnl_vector_ref. More...
 
 operator const vnl_vector_ref< T > () const
 Cheap conversion to vnl_vector_ref. More...
 
iterator begin ()
 Iterator pointing to start of data. More...
 
iterator end ()
 Iterator pointing to element beyond end of data. More...
 
const_iterator begin () const
 Iterator pointing to start of data. More...
 
const_iterator end () const
 Iterator pointing to element beyond end of data. More...
 
vnl_vector_fixed< T, n > apply (T(*f)(T))
 Apply f to each element. More...
 
vnl_vector_fixed< T, n > apply (T(*f)(const T &))
 Apply f to each element. More...
 
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). More...
 
vnl_vector< T > as_vector () const
 Convert to a vnl_vector. More...
 
vnl_vector_fixedupdate (vnl_vector< T > const &, unsigned int start=0)
 Replaces elements with index beginning at start, by values of v. O(n). More...
 
abs_t squared_magnitude () const
 Return sum of squares of elements. More...
 
abs_t magnitude () const
 Return magnitude (length) of vector. More...
 
abs_t one_norm () const
 Return sum of absolute values of the elements. More...
 
abs_t two_norm () const
 Return sqrt of sum of squares of values of elements. More...
 
abs_t inf_norm () const
 Return largest absolute element value. More...
 
vnl_vector_fixed< T, n > & normalize ()
 Normalise by dividing through by the magnitude. More...
 
abs_t rms () const
 Root Mean Squares of values. More...
 
min_value () const
 Smallest value. More...
 
max_value () const
 Largest value. More...
 
unsigned arg_min () const
 Location of smallest value. More...
 
unsigned arg_max () const
 Location of largest value. More...
 
mean () const
 Mean of values in vector. More...
 
sum () const
 Sum of values in a vector. More...
 
vnl_vector_fixedflip ()
 Reverse the order of the elements. More...
 
void assert_size (unsigned sz) const
 Check that size()==sz if not, abort();. More...
 
void assert_finite () const
 Check that this is finite if not, abort();. More...
 
bool is_finite () const
 Return true if it's finite. More...
 
bool is_zero () const
 Return true iff all the entries are zero. More...
 
bool empty () const
 Return true iff the size is zero. More...
 
bool operator_eq (vnl_vector_fixed< T, n > const &v) const
 Return true if *this == v. More...
 
bool operator_eq (vnl_vector< T > const &v) const
 Return true if *this == v. More...
 
bool read_ascii (std::istream &s)
 Read from text stream. More...
 
void print (std::ostream &s) const
 Display the vector. More...
 

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

data_ [n]
 

Private Member Functions

void assert_finite_internal () const
 See assert_finite(). More...
 

Related Functions

(Note that these are not member functions.)

template<class T , unsigned n>
void vsl_b_write (vsl_b_ostream &os, const vnl_vector_fixed< T, n > &v)
 Binary save vnl_vector_fixed to stream. More...
 
template<class T , unsigned n>
void vsl_b_read (vsl_b_istream &is, vnl_vector_fixed< T, n > &v)
 Binary load vnl_vector_fixed from stream. More...
 
template<class T , unsigned n>
void vsl_print_summary (std::ostream &os, const vnl_vector_fixed< T, n > &b)
 Print human readable summary of object to a stream. More...
 
template<class T , unsigned int n>
vnl_vector_fixed< std::complex< T >, n > vnl_complexify (vnl_vector_fixed< T, n > const &R)
 Return complexified version of real fixed vector R. More...
 
template<class T , unsigned int n>
vnl_vector_fixed< std::complex< T >, n > vnl_complexify (vnl_vector_fixed< T, n > const &R, vnl_vector_fixed< T, n > const &I)
 Return complex fixed vector R+j*I from two real fixed vectors R and I. More...
 
template<class T >
vnl_cross_2d (const vnl_vector_fixed< T, 2 > &v1, const vnl_vector_fixed< T, 2 > &v2)
 Compute the 2-D cross product. More...
 
template<class T >
vnl_cross_2d (vnl_vector_fixed< T, 2 > const &v1, vnl_vector< T > const &v2)
 Compute the 2-D cross product. More...
 
template<class T >
vnl_cross_2d (vnl_vector< T > const &v1, vnl_vector_fixed< T, 2 > const &v2)
 Compute the 2-D cross product. More...
 
template<class T >
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. More...
 
template<class T , unsigned int n>
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. More...
 
template<class T , unsigned int n>
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. More...
 
template<class T , unsigned int N>
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. More...
 
template<class T , unsigned int N>
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. More...
 
double vnl_cross_2d (vnl_double_2 const &v1, vnl_double_2 const &v2)
 Cross product of two 2-vectors. More...
 
vnl_double_3 vnl_cross_3d (vnl_double_3 const &v1, vnl_double_3 const &v2)
 Cross product of two 3-vectors. More...
 
float vnl_cross_2d (vnl_float_2 const &v1, vnl_float_2 const &v2)
 Cross product of two 2-vectors. More...
 
vnl_float_3 vnl_cross_3d (vnl_float_3 const &v1, vnl_float_3 const &v2)
 Cross product of two 3-vectors. More...
 
template<class T , unsigned int N>
vnl_vector_fixed< T, N > vnl_imag (vnl_vector_fixed< std::complex< T >, N > const &C)
 Vector of imaginary parts of vnl_vector_fixed<std::complex<T>, N >. More...
 
vnl_double_3 operator+ (const vnl_double_3 &a, const vnl_double_3 &b)
 The binary addition operator. More...
 
template<class T , unsigned int n>
VNL_EXPORT std::ostream & vnl_matlab_print (std::ostream &, vnl_vector_fixed< T, n > const &, char const *variable_name=nullptr, vnl_matlab_print_format=vnl_matlab_print_format_default)
 print a vnl_vector_fixed<T>. More...
 
template<class T , unsigned m, unsigned n>
VNL_EXPORT vnl_matrix_fixed< T, m, n > outer_product (vnl_vector_fixed< T, m > const &a, vnl_vector_fixed< T, n > const &b)
 
template<class T , unsigned int n>
VNL_EXPORT bool operator< (vnl_vector_fixed< T, n > const &lhs, vnl_vector_fixed< T, n > const &rhs)
 Define a complete ordering on vnl_vector_fixed. More...
 
template<class T , unsigned int N>
vnl_vector_fixed< T, N > vnl_real (vnl_vector_fixed< std::complex< T >, N > const &C)
 Vector of real parts of vnl_vector_fixed<std::complex<T>, N >. More...
 
template<class T , unsigned int n>
vnl_vector_fixed< T, n > operator+ (const vnl_vector_fixed< T, n > &v, T s)
 
template<class T , unsigned int n>
vnl_vector_fixed< T, n > operator+ (const T &s, const vnl_vector_fixed< T, n > &v)
 
template<class T , unsigned int n>
vnl_vector_fixed< T, n > operator- (const vnl_vector_fixed< T, n > &v, T s)
 
template<class T , unsigned int n>
vnl_vector_fixed< T, n > operator- (const T &s, const vnl_vector_fixed< T, n > &v)
 
template<class T , unsigned int n>
vnl_vector_fixed< T, n > operator * (const vnl_vector_fixed< T, n > &v, T s)
 
template<class T , unsigned int n>
vnl_vector_fixed< T, n > operator * (const T &s, const vnl_vector_fixed< T, n > &v)
 
template<class T , unsigned int n>
vnl_vector_fixed< T, n > operator/ (const vnl_vector_fixed< T, n > &v, T s)
 
template<class T , unsigned int n>
vnl_vector_fixed< T, n > operator+ (const vnl_vector_fixed< T, n > &a, const vnl_vector_fixed< T, n > &b)
 
template<class T , unsigned int n>
vnl_vector< T > operator+ (const vnl_vector_fixed< T, n > &a, const vnl_vector< T > &b)
 
template<class T , unsigned int n>
vnl_vector< T > operator+ (const vnl_vector< T > &a, const vnl_vector_fixed< T, n > &b)
 
template<class T , unsigned int n>
vnl_vector_fixed< T, n > operator- (const vnl_vector_fixed< T, n > &a, const vnl_vector_fixed< T, n > &b)
 
template<class T , unsigned int n>
vnl_vector< T > operator- (const vnl_vector_fixed< T, n > &a, const vnl_vector< T > &b)
 
template<class T , unsigned int n>
vnl_vector< T > operator- (const vnl_vector< T > &a, const vnl_vector_fixed< T, n > &b)
 
template<class T , unsigned int n>
vnl_vector_fixed< T, n > element_product (const vnl_vector_fixed< T, n > &a, const vnl_vector_fixed< T, n > &b)
 
template<class T , unsigned int n>
vnl_vector< T > element_product (const vnl_vector_fixed< T, n > &a, const vnl_vector< T > &b)
 
template<class T , unsigned int n>
vnl_vector< T > element_product (const vnl_vector< T > &a, const vnl_vector_fixed< T, n > &b)
 
template<class T , unsigned int n>
vnl_vector_fixed< T, n > element_quotient (const vnl_vector_fixed< T, n > &a, const vnl_vector_fixed< T, n > &b)
 
template<class T , unsigned int n>
vnl_vector< T > element_quotient (const vnl_vector_fixed< T, n > &a, const vnl_vector< T > &b)
 
template<class T , unsigned int n>
vnl_vector< T > element_quotient (const vnl_vector< T > &a, const vnl_vector_fixed< T, n > &b)
 
template<class T , unsigned n>
dot_product (const vnl_vector_fixed< T, n > &a, const vnl_vector_fixed< T, n > &b)
 
template<class T , unsigned n>
dot_product (const vnl_vector_fixed< T, n > &a, const vnl_vector< T > &b)
 
template<class T , unsigned n>
dot_product (const vnl_vector< T > &a, const vnl_vector_fixed< T, n > &b)
 
template<class T , unsigned int n>
vnl_matrix< T > outer_product (const vnl_vector< T > &a, const vnl_vector_fixed< T, n > &b)
 
template<class T , unsigned int n>
vnl_matrix< T > outer_product (const vnl_vector_fixed< T, n > &a, const vnl_vector< T > &b)
 
template<class T , unsigned n>
angle (const vnl_vector_fixed< T, n > &a, const vnl_vector_fixed< T, n > &b)
 
template<class T , unsigned n>
angle (const vnl_vector_fixed< T, n > &a, const vnl_vector< T > &b)
 
template<class T , unsigned n>
angle (const vnl_vector< T > &a, const vnl_vector_fixed< T, n > &b)
 
template<class T , unsigned n>
vnl_vector_ssd (const vnl_vector_fixed< T, n > &a, const vnl_vector_fixed< T, n > &b)
 
template<class T , unsigned n>
vnl_vector_ssd (const vnl_vector_fixed< T, n > &a, const vnl_vector< T > &b)
 
template<class T , unsigned n>
vnl_vector_ssd (const vnl_vector< T > &a, const vnl_vector_fixed< T, n > &b)
 
template<class T , unsigned int n>
bool operator== (const vnl_vector_fixed< T, n > &a, const vnl_vector_fixed< T, n > &b)
 
template<class T , unsigned int n>
bool operator== (vnl_vector_fixed< T, n > const &a, vnl_vector< T > const &b)
 
template<class T , unsigned int n>
bool operator== (vnl_vector< T > const &a, vnl_vector_fixed< T, n > const &b)
 
template<class T , unsigned int n>
bool operator!= (const vnl_vector_fixed< T, n > &a, const vnl_vector_fixed< T, n > &b)
 
template<class T , unsigned int n>
bool operator!= (vnl_vector_fixed< T, n > const &a, vnl_vector< T > const &b)
 
template<class T , unsigned int n>
bool operator!= (vnl_vector< T > const &a, vnl_vector_fixed< T, n > const &b)
 
template<class T , unsigned int n>
std::ostream & operator<< (std::ostream &ostr, const vnl_vector_fixed< T, n > &v)
 
template<class T , unsigned int n>
std::istream & operator>> (std::istream &ostr, vnl_vector_fixed< T, n > &v)
 
template<class T , unsigned int n>
vnl_vector_fixed< T, n > operator+ (const vnl_vector_fixed_ref_const< T, n > &v, T s)
 
template<class T , unsigned int n>
vnl_vector_fixed< T, n > operator+ (T s, const vnl_vector_fixed_ref_const< T, n > &v)
 
template<class T , unsigned int n>
vnl_vector_fixed< T, n > operator- (const vnl_vector_fixed_ref_const< T, n > &v, T s)
 
template<class T , unsigned int n>
vnl_vector_fixed< T, n > operator- (T s, const vnl_vector_fixed_ref_const< T, n > &v)
 
template<class T , unsigned int n>
vnl_vector_fixed< T, n > operator * (const vnl_vector_fixed_ref_const< T, n > &v, T s)
 
template<class T , unsigned int n>
vnl_vector_fixed< T, n > operator * (T s, const vnl_vector_fixed_ref_const< T, n > &v)
 
template<class T , unsigned int n>
vnl_vector_fixed< T, n > operator/ (const vnl_vector_fixed_ref_const< T, n > &v, T s)
 
template<class T , unsigned int n>
vnl_vector_fixed< T, n > operator+ (const vnl_vector_fixed_ref_const< T, n > &a, const vnl_vector_fixed_ref_const< T, n > &b)
 
template<class T , unsigned int n>
vnl_vector_fixed< T, n > operator- (const vnl_vector_fixed_ref_const< T, n > &a, const vnl_vector_fixed_ref_const< T, n > &b)
 
template<class T , unsigned int n>
std::ostream & operator<< (std::ostream &o, const vnl_vector_fixed_ref_const< T, n > &v)
 
template<class T , unsigned int n>
std::istream & operator>> (std::istream &i, const vnl_vector_fixed_ref< T, n > &v)
 
template<class T , unsigned n>
void x_write (std::ostream &os, vnl_vector_fixed< T, n > const &v, std::string name="vnl_vector_fixed")
 XML save vnl_vector_fixed to stream. More...
 
template<class T , unsigned n>
void x_write_tree (std::ostream &os, vnl_vector_fixed< T, n > const &v, std::string name="vnl_vector_fixed")
 XML save vnl_vector_fixed as a 2-level tree to stream. More...
 

Detailed Description

template<class T, unsigned int n>
class vnl_vector_fixed< T, n >

Fixed length stack-stored, space-efficient vector.

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() );

If the mutator only accesses the data, all should be fine. If the mutator attempts to resize the vector, you are doomed.

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 22 of file vnl_fwd.h.

Member Typedef Documentation

◆ abs_t

template<class T, unsigned int n>
typedef vnl_c_vector<T>::abs_t vnl_vector_fixed< T, n >::abs_t

Definition at line 365 of file vnl_vector_fixed.h.

◆ const_iterator

template<class T, unsigned int n>
typedef T const* vnl_vector_fixed< T, n >::const_iterator

Const iterator type.

Definition at line 296 of file vnl_vector_fixed.h.

◆ element_type

template<class T, unsigned int n>
typedef T vnl_vector_fixed< T, n >::element_type

Type defs for iterators.

Definition at line 286 of file vnl_vector_fixed.h.

◆ iterator

template<class T, unsigned int n>
typedef T* vnl_vector_fixed< T, n >::iterator

Type defs for iterators.

Definition at line 288 of file vnl_vector_fixed.h.

◆ self

template<class T, unsigned int n>
typedef vnl_vector_fixed<T,n> vnl_vector_fixed< T, n >::self

Definition at line 93 of file vnl_vector_fixed.h.

◆ size_type

template<class T, unsigned int n>
typedef size_t vnl_vector_fixed< T, n >::size_type

Definition at line 94 of file vnl_vector_fixed.h.

Member Enumeration Documentation

◆ anonymous enum

template<class T, unsigned int n>
anonymous enum
Enumerator
SIZE 

Definition at line 96 of file vnl_vector_fixed.h.

Constructor & Destructor Documentation

◆ vnl_vector_fixed() [1/9]

template<class T, unsigned int n>
vnl_vector_fixed< T, n >::vnl_vector_fixed ( )
default

Construct an uninitialized n-vector.

◆ vnl_vector_fixed() [2/9]

template<class T, unsigned int n>
vnl_vector_fixed< T, n >::vnl_vector_fixed ( const vnl_vector_fixed< T, n > &  rhs)
default

Copy constructor.

The dimensions must match.

◆ vnl_vector_fixed() [3/9]

template<class T, unsigned int n>
vnl_vector_fixed< T, n >::vnl_vector_fixed ( vnl_vector_fixed< T, n > &&  rhs)
default

◆ vnl_vector_fixed() [4/9]

template<class T, unsigned int n>
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 116 of file vnl_vector_fixed.h.

◆ vnl_vector_fixed() [5/9]

template<class T, unsigned int n>
vnl_vector_fixed< T, n >::vnl_vector_fixed ( const T &  v)
inlineexplicit

Constructs n-vector with all elements initialised to v.

Definition at line 123 of file vnl_vector_fixed.h.

◆ vnl_vector_fixed() [6/9]

template<class T, unsigned int n>
vnl_vector_fixed< T, n >::vnl_vector_fixed ( const T *  datablck)
inlineexplicit

Construct a fixed-n-vector initialized from datablck.

The data must have enough data. No checks performed.

Definition at line 127 of file vnl_vector_fixed.h.

◆ vnl_vector_fixed() [7/9]

template<class T, unsigned int n>
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 135 of file vnl_vector_fixed.h.

◆ vnl_vector_fixed() [8/9]

template<class T, unsigned int n>
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 151 of file vnl_vector_fixed.h.

◆ vnl_vector_fixed() [9/9]

template<class T, unsigned int n>
vnl_vector_fixed< T, n >::vnl_vector_fixed ( const T &  x0,
const T &  x1,
const T &  x2,
const T &  x3 
)
inline

Convenience constructor for 4-D vectors.

Definition at line 164 of file vnl_vector_fixed.h.

Member Function Documentation

◆ add() [1/2]

template<class T, unsigned int n>
static void vnl_vector_fixed< T, n >::add ( const T *  a,
const T *  b,
T *  r 
)
inlinestatic

Definition at line 466 of file vnl_vector_fixed.h.

◆ add() [2/2]

template<class T, unsigned int n>
static void vnl_vector_fixed< T, n >::add ( const T *  a,
b,
T *  r 
)
inlinestatic

Definition at line 472 of file vnl_vector_fixed.h.

◆ apply() [1/2]

template<class T, unsigned int n>
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 60 of file vnl_vector_fixed.hxx.

◆ apply() [2/2]

template<class T, unsigned int n>
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 70 of file vnl_vector_fixed.hxx.

◆ arg_max()

template<class T, unsigned int n>
unsigned vnl_vector_fixed< T, n >::arg_max ( ) const
inline

Location of largest value.

Definition at line 401 of file vnl_vector_fixed.h.

◆ arg_min()

template<class T, unsigned int n>
unsigned vnl_vector_fixed< T, n >::arg_min ( ) const
inline

Location of smallest value.

Definition at line 398 of file vnl_vector_fixed.h.

◆ as_ref() [1/2]

template<class T, unsigned int n>
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.

See also
vnl_vector_ref::non_const

Definition at line 268 of file vnl_vector_fixed.h.

◆ as_ref() [2/2]

template<class T, unsigned int n>
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.

See also
vnl_vector_ref::non_const

Definition at line 275 of file vnl_vector_fixed.h.

◆ as_vector()

template<class T, unsigned int n>
vnl_vector<T> vnl_vector_fixed< T, n >::as_vector ( ) const
inline

Convert to a vnl_vector.

Definition at line 359 of file vnl_vector_fixed.h.

◆ assert_finite()

template<class T, unsigned int n>
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 419 of file vnl_vector_fixed.h.

◆ assert_finite_internal()

template<class T , unsigned int n>
void vnl_vector_fixed< T, n >::assert_finite_internal ( ) const
private

See assert_finite().

Definition at line 135 of file vnl_vector_fixed.hxx.

◆ assert_size()

template<class T, unsigned int n>
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 415 of file vnl_vector_fixed.h.

◆ begin() [1/2]

template<class T, unsigned int n>
iterator vnl_vector_fixed< T, n >::begin ( )
inline

Iterator pointing to start of data.

Definition at line 290 of file vnl_vector_fixed.h.

◆ begin() [2/2]

template<class T, unsigned int n>
const_iterator vnl_vector_fixed< T, n >::begin ( ) const
inline

Iterator pointing to start of data.

Definition at line 298 of file vnl_vector_fixed.h.

◆ copy_in()

template<class T, unsigned int n>
vnl_vector_fixed& 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 211 of file vnl_vector_fixed.h.

◆ copy_out()

template<class T, unsigned int n>
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 220 of file vnl_vector_fixed.h.

◆ data_block() [1/2]

template<class T , unsigned int n>
T const * vnl_vector_fixed< T, n >::data_block ( ) const

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 50 of file vnl_vector_fixed.hxx.

◆ data_block() [2/2]

template<class T , unsigned int n>
T * vnl_vector_fixed< T, n >::data_block ( )

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 55 of file vnl_vector_fixed.hxx.

◆ div() [1/2]

template<class T, unsigned int n>
static void vnl_vector_fixed< T, n >::div ( const T *  a,
const T *  b,
T *  r 
)
inlinestatic

Definition at line 508 of file vnl_vector_fixed.h.

◆ div() [2/2]

template<class T, unsigned int n>
static void vnl_vector_fixed< T, n >::div ( const T *  a,
b,
T *  r 
)
inlinestatic

Definition at line 514 of file vnl_vector_fixed.h.

◆ empty()

template<class T, unsigned int n>
bool vnl_vector_fixed< T, n >::empty ( ) const
inline

Return true iff the size is zero.

Definition at line 433 of file vnl_vector_fixed.h.

◆ end() [1/2]

template<class T, unsigned int n>
iterator vnl_vector_fixed< T, n >::end ( )
inline

Iterator pointing to element beyond end of data.

Definition at line 293 of file vnl_vector_fixed.h.

◆ end() [2/2]

template<class T, unsigned int n>
const_iterator vnl_vector_fixed< T, n >::end ( ) const
inline

Iterator pointing to element beyond end of data.

Definition at line 300 of file vnl_vector_fixed.h.

◆ extract()

template<class T, unsigned int n>
vnl_vector<T> vnl_vector_fixed< T, n >::extract ( unsigned int  len,
unsigned int  start = 0 
) const
inline

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

Definition at line 352 of file vnl_vector_fixed.h.

◆ fill()

template<class T, unsigned int n>
vnl_vector_fixed& vnl_vector_fixed< T, n >::fill ( T const &  v)
inline

Set all values to v.

Definition at line 202 of file vnl_vector_fixed.h.

◆ flip()

template<class T , unsigned int n>
vnl_vector_fixed< T, n > & vnl_vector_fixed< T, n >::flip ( )

Reverse the order of the elements.

Element i swaps with element size()-1-i

Definition at line 91 of file vnl_vector_fixed.hxx.

◆ get()

template<class T , unsigned int n>
T vnl_vector_fixed< T, n >::get ( unsigned int  i) const

Get value at element i.

Definition at line 156 of file vnl_vector_fixed.hxx.

◆ inf_norm()

template<class T, unsigned int n>
abs_t vnl_vector_fixed< T, n >::inf_norm ( ) const
inline

Return largest absolute element value.

Definition at line 380 of file vnl_vector_fixed.h.

◆ is_finite()

template<class T , unsigned int n>
bool vnl_vector_fixed< T, n >::is_finite ( ) const

Return true if it's finite.

Definition at line 100 of file vnl_vector_fixed.hxx.

◆ is_zero()

template<class T , unsigned int n>
bool vnl_vector_fixed< T, n >::is_zero ( ) const

Return true iff all the entries are zero.

Definition at line 112 of file vnl_vector_fixed.hxx.

◆ magnitude()

template<class T, unsigned int n>
abs_t vnl_vector_fixed< T, n >::magnitude ( ) const
inline

Return magnitude (length) of vector.

Definition at line 371 of file vnl_vector_fixed.h.

◆ max_value()

template<class T, unsigned int n>
T vnl_vector_fixed< T, n >::max_value ( ) const
inline

Largest value.

Definition at line 395 of file vnl_vector_fixed.h.

◆ mean()

template<class T, unsigned int n>
T vnl_vector_fixed< T, n >::mean ( ) const
inline

Mean of values in vector.

Definition at line 404 of file vnl_vector_fixed.h.

◆ min_value()

template<class T, unsigned int n>
T vnl_vector_fixed< T, n >::min_value ( ) const
inline

Smallest value.

Definition at line 392 of file vnl_vector_fixed.h.

◆ mul() [1/2]

template<class T, unsigned int n>
static void vnl_vector_fixed< T, n >::mul ( const T *  a,
const T *  b,
T *  r 
)
inlinestatic

Definition at line 496 of file vnl_vector_fixed.h.

◆ mul() [2/2]

template<class T, unsigned int n>
static void vnl_vector_fixed< T, n >::mul ( const T *  a,
b,
T *  r 
)
inlinestatic

Definition at line 502 of file vnl_vector_fixed.h.

◆ normalize()

template<class T, unsigned int n>
vnl_vector_fixed<T,n>& vnl_vector_fixed< T, n >::normalize ( )
inline

Normalise by dividing through by the magnitude.

Definition at line 383 of file vnl_vector_fixed.h.

◆ one_norm()

template<class T, unsigned int n>
abs_t vnl_vector_fixed< T, n >::one_norm ( ) const
inline

Return sum of absolute values of the elements.

Definition at line 374 of file vnl_vector_fixed.h.

◆ operator *=()

template<class T, unsigned int n>
vnl_vector_fixed<T,n>& vnl_vector_fixed< T, n >::operator *= ( s)
inline

Definition at line 318 of file vnl_vector_fixed.h.

◆ operator const vnl_vector_ref< T >()

template<class T, unsigned int n>
vnl_vector_fixed< 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 281 of file vnl_vector_fixed.h.

◆ operator()() [1/2]

template<class T , unsigned int n>
T & vnl_vector_fixed< T, n >::operator() ( unsigned int  i)

Return reference to the element at specified index.

There are assert style boundary checks - #define NDEBUG to turn them off.

Definition at line 20 of file vnl_vector_fixed.hxx.

◆ operator()() [2/2]

template<class T , unsigned int n>
T const & vnl_vector_fixed< T, n >::operator() ( unsigned int  i) const

Return reference to the element at specified index.

There are assert style boundary checks - #define NDEBUG to turn them off.

Definition at line 30 of file vnl_vector_fixed.hxx.

◆ operator+=() [1/3]

template<class T, unsigned int n>
vnl_vector_fixed<T,n>& vnl_vector_fixed< T, n >::operator+= ( s)
inline

Definition at line 312 of file vnl_vector_fixed.h.

◆ operator+=() [2/3]

template<class T, unsigned int n>
vnl_vector_fixed<T,n>& vnl_vector_fixed< T, n >::operator+= ( const vnl_vector_fixed< T, n > &  v)
inline

Definition at line 324 of file vnl_vector_fixed.h.

◆ operator+=() [3/3]

template<class T, unsigned int n>
vnl_vector_fixed<T,n>& vnl_vector_fixed< T, n >::operator+= ( const vnl_vector< T > &  v)
inline

Definition at line 330 of file vnl_vector_fixed.h.

◆ operator-()

template<class T, unsigned int n>
vnl_vector_fixed<T,n> vnl_vector_fixed< T, n >::operator- ( ) const
inline

Definition at line 344 of file vnl_vector_fixed.h.

◆ operator-=() [1/3]

template<class T, unsigned int n>
vnl_vector_fixed<T,n>& vnl_vector_fixed< T, n >::operator-= ( s)
inline

Definition at line 315 of file vnl_vector_fixed.h.

◆ operator-=() [2/3]

template<class T, unsigned int n>
vnl_vector_fixed<T,n>& vnl_vector_fixed< T, n >::operator-= ( const vnl_vector_fixed< T, n > &  v)
inline

Definition at line 327 of file vnl_vector_fixed.h.

◆ operator-=() [3/3]

template<class T, unsigned int n>
vnl_vector_fixed<T,n>& vnl_vector_fixed< T, n >::operator-= ( const vnl_vector< T > &  v)
inline

Definition at line 337 of file vnl_vector_fixed.h.

◆ operator/=()

template<class T, unsigned int n>
vnl_vector_fixed<T,n>& vnl_vector_fixed< T, n >::operator/= ( s)
inline

Definition at line 321 of file vnl_vector_fixed.h.

◆ operator=() [1/3]

template<class T, unsigned int n>
vnl_vector_fixed<T,n>& vnl_vector_fixed< T, n >::operator= ( const vnl_vector_fixed< T, n > &  rhs)
default

Copy operator.

◆ operator=() [2/3]

template<class T, unsigned int n>
vnl_vector_fixed<T,n>& vnl_vector_fixed< T, n >::operator= ( vnl_vector_fixed< T, n > &&  rhs)
default

◆ operator=() [3/3]

template<class T, unsigned int n>
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 178 of file vnl_vector_fixed.h.

◆ operator[]() [1/2]

template<class T , unsigned int n>
T & vnl_vector_fixed< T, n >::operator[] ( const size_t  i)

Return the i-th element.

Definition at line 40 of file vnl_vector_fixed.hxx.

◆ operator[]() [2/2]

template<class T , unsigned int n>
const T & vnl_vector_fixed< T, n >::operator[] ( const size_t  i) const

Return the i-th element.

Definition at line 45 of file vnl_vector_fixed.hxx.

◆ operator_eq() [1/2]

template<class T, unsigned int n>
bool vnl_vector_fixed< T, n >::operator_eq ( vnl_vector_fixed< T, n > const &  v) const
inline

Return true if *this == v.

Definition at line 436 of file vnl_vector_fixed.h.

◆ operator_eq() [2/2]

template<class T, unsigned int n>
bool vnl_vector_fixed< T, n >::operator_eq ( vnl_vector< T > const &  v) const
inline

Return true if *this == v.

Definition at line 445 of file vnl_vector_fixed.h.

◆ print()

template<class T , unsigned int n>
void vnl_vector_fixed< T, n >::print ( std::ostream &  s) const

Display the vector.

Output each element separated by a single space.

Definition at line 146 of file vnl_vector_fixed.hxx.

◆ put()

template<class T, unsigned int n>
void vnl_vector_fixed< T, n >::put ( unsigned int  i,
T const &  v 
)
inline

Put value at given position in vector.

Definition at line 189 of file vnl_vector_fixed.h.

◆ read_ascii()

template<class T , unsigned int n>
bool vnl_vector_fixed< T, n >::read_ascii ( std::istream &  s)

Read from text stream.

Definition at line 125 of file vnl_vector_fixed.hxx.

◆ rms()

template<class T, unsigned int n>
abs_t vnl_vector_fixed< T, n >::rms ( ) const
inline

Root Mean Squares of values.

Definition at line 389 of file vnl_vector_fixed.h.

◆ set()

template<class T, unsigned int n>
vnl_vector_fixed& 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 228 of file vnl_vector_fixed.h.

◆ size()

template<class T, unsigned int n>
unsigned int vnl_vector_fixed< T, n >::size ( ) const
inline

Length of the vector.

This is always n.

Definition at line 186 of file vnl_vector_fixed.h.

◆ squared_magnitude()

template<class T, unsigned int n>
abs_t vnl_vector_fixed< T, n >::squared_magnitude ( ) const
inline

Return sum of squares of elements.

Definition at line 368 of file vnl_vector_fixed.h.

◆ sub() [1/3]

template<class T, unsigned int n>
static void vnl_vector_fixed< T, n >::sub ( const T *  a,
const T *  b,
T *  r 
)
inlinestatic

Definition at line 478 of file vnl_vector_fixed.h.

◆ sub() [2/3]

template<class T, unsigned int n>
static void vnl_vector_fixed< T, n >::sub ( const T *  a,
b,
T *  r 
)
inlinestatic

Definition at line 484 of file vnl_vector_fixed.h.

◆ sub() [3/3]

template<class T, unsigned int n>
static void vnl_vector_fixed< T, n >::sub ( a,
const T *  b,
T *  r 
)
inlinestatic

Definition at line 490 of file vnl_vector_fixed.h.

◆ sum()

template<class T, unsigned int n>
T vnl_vector_fixed< T, n >::sum ( ) const
inline

Sum of values in a vector.

Definition at line 407 of file vnl_vector_fixed.h.

◆ two_norm()

template<class T, unsigned int n>
abs_t vnl_vector_fixed< T, n >::two_norm ( ) const
inline

Return sqrt of sum of squares of values of elements.

Definition at line 377 of file vnl_vector_fixed.h.

◆ update()

template<class T, unsigned int n>
vnl_vector_fixed< T, n > & vnl_vector_fixed< T, n >::update ( vnl_vector< T > const &  v,
unsigned int  start = 0 
)

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

Definition at line 80 of file vnl_vector_fixed.hxx.

Friends And Related Function Documentation

◆ angle() [1/3]

template<class T , unsigned n>
T angle ( const vnl_vector_fixed< T, n > &  a,
const vnl_vector_fixed< T, n > &  b 
)
related

Definition at line 779 of file vnl_vector_fixed.h.

◆ angle() [2/3]

template<class T , unsigned n>
T angle ( const vnl_vector_fixed< T, n > &  a,
const vnl_vector< T > &  b 
)
related

Definition at line 788 of file vnl_vector_fixed.h.

◆ angle() [3/3]

template<class T , unsigned n>
T angle ( const vnl_vector< T > &  a,
const vnl_vector_fixed< T, n > &  b 
)
related

Definition at line 797 of file vnl_vector_fixed.h.

◆ dot_product() [1/3]

template<class T , unsigned n>
T dot_product ( const vnl_vector_fixed< T, n > &  a,
const vnl_vector_fixed< T, n > &  b 
)
related

Definition at line 735 of file vnl_vector_fixed.h.

◆ dot_product() [2/3]

template<class T , unsigned n>
T dot_product ( const vnl_vector_fixed< T, n > &  a,
const vnl_vector< T > &  b 
)
related

Definition at line 744 of file vnl_vector_fixed.h.

◆ dot_product() [3/3]

template<class T , unsigned n>
T dot_product ( const vnl_vector< T > &  a,
const vnl_vector_fixed< T, n > &  b 
)
related

Definition at line 753 of file vnl_vector_fixed.h.

◆ element_product() [1/3]

template<class T , unsigned int n>
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 667 of file vnl_vector_fixed.h.

◆ element_product() [2/3]

template<class T , unsigned int n>
vnl_vector< T > element_product ( const vnl_vector_fixed< T, n > &  a,
const vnl_vector< T > &  b 
)
related

Definition at line 678 of file vnl_vector_fixed.h.

◆ element_product() [3/3]

template<class T , unsigned int n>
vnl_vector< T > element_product ( const vnl_vector< T > &  a,
const vnl_vector_fixed< T, n > &  b 
)
related

Definition at line 690 of file vnl_vector_fixed.h.

◆ element_quotient() [1/3]

template<class T , unsigned int n>
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 701 of file vnl_vector_fixed.h.

◆ element_quotient() [2/3]

template<class T , unsigned int n>
vnl_vector< T > element_quotient ( const vnl_vector_fixed< T, n > &  a,
const vnl_vector< T > &  b 
)
related

Definition at line 712 of file vnl_vector_fixed.h.

◆ element_quotient() [3/3]

template<class T , unsigned int n>
vnl_vector< T > element_quotient ( const vnl_vector< T > &  a,
const vnl_vector_fixed< T, n > &  b 
)
related

Definition at line 724 of file vnl_vector_fixed.h.

◆ operator *() [1/6]

template<class T , unsigned int N>
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 337 of file vnl_diag_matrix_fixed.h.

◆ operator *() [2/6]

template<class T , unsigned int N>
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 346 of file vnl_diag_matrix_fixed.h.

◆ operator *() [3/6]

template<class T , unsigned int n>
vnl_vector_fixed< T, n > operator * ( const vnl_vector_fixed_ref_const< T, n > &  v,
s 
)
related

Definition at line 479 of file vnl_vector_fixed_ref.h.

◆ operator *() [4/6]

template<class T , unsigned int n>
vnl_vector_fixed< T, n > operator * ( s,
const vnl_vector_fixed_ref_const< T, n > &  v 
)
related

Definition at line 488 of file vnl_vector_fixed_ref.h.

◆ operator *() [5/6]

template<class T , unsigned int n>
vnl_vector_fixed< T, n > operator * ( const vnl_vector_fixed< T, n > &  v,
s 
)
related

Definition at line 573 of file vnl_vector_fixed.h.

◆ operator *() [6/6]

template<class T , unsigned int n>
vnl_vector_fixed< T, n > operator * ( const T &  s,
const vnl_vector_fixed< T, n > &  v 
)
related

Definition at line 583 of file vnl_vector_fixed.h.

◆ operator!=() [1/3]

template<class T , unsigned int n>
bool operator!= ( const vnl_vector_fixed< T, n > &  a,
const vnl_vector_fixed< T, n > &  b 
)
related

Definition at line 859 of file vnl_vector_fixed.h.

◆ operator!=() [2/3]

template<class T , unsigned int n>
bool operator!= ( vnl_vector_fixed< T, n > const &  a,
vnl_vector< T > const &  b 
)
related

Definition at line 868 of file vnl_vector_fixed.h.

◆ operator!=() [3/3]

template<class T , unsigned int n>
bool operator!= ( vnl_vector< T > const &  a,
vnl_vector_fixed< T, n > const &  b 
)
related

Definition at line 877 of file vnl_vector_fixed.h.

◆ operator+() [1/9]

template<class T, unsigned int n>
vnl_double_3 operator+ ( const vnl_double_3 &  a,
const vnl_double_3 &  b 
)
related

The binary addition operator.

Definition at line 37 of file vnl_linear_operators_3.h.

◆ operator+() [2/9]

template<class T , unsigned int n>
vnl_vector_fixed< T, n > operator+ ( const vnl_vector_fixed_ref_const< T, n > &  v,
s 
)
related

Definition at line 443 of file vnl_vector_fixed_ref.h.

◆ operator+() [3/9]

template<class T , unsigned int n>
vnl_vector_fixed< T, n > operator+ ( s,
const vnl_vector_fixed_ref_const< T, n > &  v 
)
related

Definition at line 452 of file vnl_vector_fixed_ref.h.

◆ operator+() [4/9]

template<class T , unsigned int n>
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

Definition at line 510 of file vnl_vector_fixed_ref.h.

◆ operator+() [5/9]

template<class T , unsigned int n>
vnl_vector_fixed< T, n > operator+ ( const vnl_vector_fixed< T, n > &  v,
s 
)
related

Definition at line 531 of file vnl_vector_fixed.h.

◆ operator+() [6/9]

template<class T , unsigned int n>
vnl_vector_fixed< T, n > operator+ ( const T &  s,
const vnl_vector_fixed< T, n > &  v 
)
related

Definition at line 541 of file vnl_vector_fixed.h.

◆ operator+() [7/9]

template<class T , unsigned int n>
vnl_vector_fixed< T, n > operator+ ( const vnl_vector_fixed< T, n > &  a,
const vnl_vector_fixed< T, n > &  b 
)
related

Definition at line 611 of file vnl_vector_fixed.h.

◆ operator+() [8/9]

template<class T , unsigned int n>
vnl_vector< T > operator+ ( const vnl_vector_fixed< T, n > &  a,
const vnl_vector< T > &  b 
)
related

Definition at line 622 of file vnl_vector_fixed.h.

◆ operator+() [9/9]

template<class T , unsigned int n>
vnl_vector< T > operator+ ( const vnl_vector< T > &  a,
const vnl_vector_fixed< T, n > &  b 
)
related

Definition at line 631 of file vnl_vector_fixed.h.

◆ operator-() [1/8]

template<class T , unsigned int n>
vnl_vector_fixed< T, n > operator- ( const vnl_vector_fixed_ref_const< T, n > &  v,
s 
)
related

Definition at line 461 of file vnl_vector_fixed_ref.h.

◆ operator-() [2/8]

template<class T , unsigned int n>
vnl_vector_fixed< T, n > operator- ( s,
const vnl_vector_fixed_ref_const< T, n > &  v 
)
related

Definition at line 470 of file vnl_vector_fixed_ref.h.

◆ operator-() [3/8]

template<class T , unsigned int n>
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

Definition at line 519 of file vnl_vector_fixed_ref.h.

◆ operator-() [4/8]

template<class T , unsigned int n>
vnl_vector_fixed< T, n > operator- ( const vnl_vector_fixed< T, n > &  v,
s 
)
related

Definition at line 552 of file vnl_vector_fixed.h.

◆ operator-() [5/8]

template<class T , unsigned int n>
vnl_vector_fixed< T, n > operator- ( const T &  s,
const vnl_vector_fixed< T, n > &  v 
)
related

Definition at line 562 of file vnl_vector_fixed.h.

◆ operator-() [6/8]

template<class T , unsigned int n>
vnl_vector_fixed< T, n > operator- ( const vnl_vector_fixed< T, n > &  a,
const vnl_vector_fixed< T, n > &  b 
)
related

Definition at line 639 of file vnl_vector_fixed.h.

◆ operator-() [7/8]

template<class T , unsigned int n>
vnl_vector< T > operator- ( const vnl_vector_fixed< T, n > &  a,
const vnl_vector< T > &  b 
)
related

Definition at line 650 of file vnl_vector_fixed.h.

◆ operator-() [8/8]

template<class T , unsigned int n>
vnl_vector< T > operator- ( const vnl_vector< T > &  a,
const vnl_vector_fixed< T, n > &  b 
)
related

Definition at line 659 of file vnl_vector_fixed.h.

◆ operator/() [1/2]

template<class T , unsigned int n>
vnl_vector_fixed< T, n > operator/ ( const vnl_vector_fixed_ref_const< T, n > &  v,
s 
)
related

Definition at line 497 of file vnl_vector_fixed_ref.h.

◆ operator/() [2/2]

template<class T , unsigned int n>
vnl_vector_fixed< T, n > operator/ ( const vnl_vector_fixed< T, n > &  v,
s 
)
related

Definition at line 594 of file vnl_vector_fixed.h.

◆ operator<()

template<class T , unsigned int n>
VNL_EXPORT 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 71 of file vnl_operators.h.

◆ operator<<() [1/2]

template<class T , unsigned int n>
std::ostream & operator<< ( std::ostream &  o,
const vnl_vector_fixed_ref_const< T, n > &  v 
)
related

Definition at line 676 of file vnl_vector_fixed_ref.h.

◆ operator<<() [2/2]

template<class T , unsigned int n>
std::ostream & operator<< ( std::ostream &  ostr,
const vnl_vector_fixed< T, n > &  v 
)
related

Definition at line 890 of file vnl_vector_fixed.h.

◆ operator==() [1/3]

template<class T , unsigned int n>
bool operator== ( const vnl_vector_fixed< T, n > &  a,
const vnl_vector_fixed< T, n > &  b 
)
related

Definition at line 833 of file vnl_vector_fixed.h.

◆ operator==() [2/3]

template<class T , unsigned int n>
bool operator== ( vnl_vector_fixed< T, n > const &  a,
vnl_vector< T > const &  b 
)
related

Definition at line 842 of file vnl_vector_fixed.h.

◆ operator==() [3/3]

template<class T , unsigned int n>
bool operator== ( vnl_vector< T > const &  a,
vnl_vector_fixed< T, n > const &  b 
)
related

Definition at line 851 of file vnl_vector_fixed.h.

◆ operator>>() [1/2]

template<class T , unsigned int n>
std::istream & operator>> ( std::istream &  i,
const vnl_vector_fixed_ref< T, n > &  v 
)
related

Definition at line 685 of file vnl_vector_fixed_ref.h.

◆ operator>>() [2/2]

template<class T , unsigned int n>
std::istream & operator>> ( std::istream &  ostr,
vnl_vector_fixed< T, n > &  v 
)
related

Definition at line 900 of file vnl_vector_fixed.h.

◆ outer_product() [1/3]

template<class T , unsigned int n>
vnl_matrix< T > outer_product ( const vnl_vector< T > &  a,
const vnl_vector_fixed< T, n > &  b 
)
related

Definition at line 762 of file vnl_vector_fixed.h.

◆ outer_product() [2/3]

template<class T , unsigned int n>
vnl_matrix< T > outer_product ( const vnl_vector_fixed< T, n > &  a,
const vnl_vector< T > &  b 
)
related

Definition at line 771 of file vnl_vector_fixed.h.

◆ outer_product() [3/3]

template<class T , unsigned m, unsigned n>
VNL_EXPORT vnl_matrix_fixed< T, m, n > outer_product ( vnl_vector_fixed< T, m > const &  a,
vnl_vector_fixed< T, n > const &  b 
)
related

◆ vnl_complexify() [1/2]

template<class T , unsigned int n>
vnl_vector_fixed< std::complex< T >, n > vnl_complexify ( vnl_vector_fixed< T, n > const &  R)
related

Return complexified version of real fixed vector R.

Definition at line 60 of file vnl_complexify.h.

◆ vnl_complexify() [2/2]

template<class T , unsigned int n>
vnl_vector_fixed< std::complex< T >, n > vnl_complexify ( vnl_vector_fixed< T, n > const &  R,
vnl_vector_fixed< T, n > const &  I 
)
related

Return complex fixed vector R+j*I from two real fixed vectors R and I.

Definition at line 132 of file vnl_complexify.h.

◆ vnl_cross_2d() [1/5]

template<class T, unsigned int n>
float vnl_cross_2d ( vnl_float_2 const &  v1,
vnl_float_2 const &  v2 
)
related

Cross product of two 2-vectors.

Definition at line 25 of file vnl_float_2.h.

◆ vnl_cross_2d() [2/5]

template<class T, unsigned int n>
double vnl_cross_2d ( vnl_double_2 const &  v1,
vnl_double_2 const &  v2 
)
related

Cross product of two 2-vectors.

Definition at line 25 of file vnl_double_2.h.

◆ vnl_cross_2d() [3/5]

template<class T >
T vnl_cross_2d ( const vnl_vector_fixed< T, 2 > &  v1,
const vnl_vector_fixed< T, 2 > &  v2 
)
related

Compute the 2-D cross product.

Definition at line 34 of file vnl_cross.h.

◆ vnl_cross_2d() [4/5]

template<class T >
T vnl_cross_2d ( vnl_vector_fixed< T, 2 > const &  v1,
vnl_vector< T > const &  v2 
)
related

Compute the 2-D cross product.

Definition at line 44 of file vnl_cross.h.

◆ vnl_cross_2d() [5/5]

template<class T >
T vnl_cross_2d ( vnl_vector< T > const &  v1,
vnl_vector_fixed< T, 2 > const &  v2 
)
related

Compute the 2-D cross product.

Definition at line 55 of file vnl_cross.h.

◆ vnl_cross_3d() [1/5]

template<class T, unsigned int n>
vnl_float_3 vnl_cross_3d ( vnl_float_3 const &  v1,
vnl_float_3 const &  v2 
)
related

Cross product of two 3-vectors.

Definition at line 25 of file vnl_float_3.h.

◆ vnl_cross_3d() [2/5]

template<class T, unsigned int n>
vnl_double_3 vnl_cross_3d ( vnl_double_3 const &  v1,
vnl_double_3 const &  v2 
)
related

Cross product of two 3-vectors.

Definition at line 25 of file vnl_double_3.h.

◆ vnl_cross_3d() [3/5]

template<class T >
vnl_vector_fixed< T, 3 > vnl_cross_3d ( const vnl_vector_fixed< T, 3 > &  v1,
const vnl_vector_fixed< T, 3 > &  v2 
)
related

Compute the 3-D cross product.

Definition at line 79 of file vnl_cross.h.

◆ vnl_cross_3d() [4/5]

template<class T , unsigned int n>
vnl_vector_fixed< T, n > vnl_cross_3d ( const vnl_vector_fixed< T, n > &  a,
const vnl_vector< T > &  b 
)
related

Compute the 3-D cross product.

Definition at line 93 of file vnl_cross.h.

◆ vnl_cross_3d() [5/5]

template<class T , unsigned int n>
vnl_vector_fixed< T, n > vnl_cross_3d ( const vnl_vector< T > &  a,
const vnl_vector_fixed< T, n > &  b 
)
related

Compute the 3-D cross product.

Definition at line 103 of file vnl_cross.h.

◆ vnl_imag()

template<class T , unsigned int N>
vnl_vector_fixed< T, N > vnl_imag ( vnl_vector_fixed< std::complex< T >, N > const &  C)
related

Vector of imaginary parts of vnl_vector_fixed<std::complex<T>, N >.

Definition at line 49 of file vnl_imag.h.

◆ vnl_matlab_print()

template<class T , unsigned int n>
VNL_EXPORT std::ostream & vnl_matlab_print ( std::ostream &  ,
vnl_vector_fixed< T, n > const &  ,
char const *  variable_name = nullptr,
vnl_matlab_print_format  = vnl_matlab_print_format_default 
)
related

print a vnl_vector_fixed<T>.

◆ vnl_real()

template<class T , unsigned int N>
vnl_vector_fixed< T, N > vnl_real ( vnl_vector_fixed< std::complex< T >, N > const &  C)
related

Vector of real parts of vnl_vector_fixed<std::complex<T>, N >.

Definition at line 49 of file vnl_real.h.

◆ vnl_vector_ssd() [1/3]

template<class T , unsigned n>
T vnl_vector_ssd ( const vnl_vector_fixed< T, n > &  a,
const vnl_vector_fixed< T, n > &  b 
)
related

Definition at line 806 of file vnl_vector_fixed.h.

◆ vnl_vector_ssd() [2/3]

template<class T , unsigned n>
T vnl_vector_ssd ( const vnl_vector_fixed< T, n > &  a,
const vnl_vector< T > &  b 
)
related

Definition at line 815 of file vnl_vector_fixed.h.

◆ vnl_vector_ssd() [3/3]

template<class T , unsigned n>
T vnl_vector_ssd ( const vnl_vector< T > &  a,
const vnl_vector_fixed< T, n > &  b 
)
related

Definition at line 824 of file vnl_vector_fixed.h.

◆ vsl_b_read()

template<class T , unsigned n>
void vsl_b_read ( vsl_b_istream &  is,
vnl_vector_fixed< T, n > &  v 
)
related

Binary load vnl_vector_fixed from stream.

◆ vsl_b_write()

template<class T , unsigned n>
void vsl_b_write ( vsl_b_ostream &  os,
const vnl_vector_fixed< T, n > &  v 
)
related

Binary save vnl_vector_fixed to stream.

◆ vsl_print_summary()

template<class T , unsigned n>
void vsl_print_summary ( std::ostream &  os,
const vnl_vector_fixed< T, n > &  b 
)
related

Print human readable summary of object to a stream.

◆ x_write()

template<class T , unsigned n>
void x_write ( std::ostream &  os,
vnl_vector_fixed< T, n > const &  v,
std::string  name = "vnl_vector_fixed< T, n >" 
)
related

XML save vnl_vector_fixed to stream.

◆ x_write_tree()

template<class T , unsigned n>
void x_write_tree ( std::ostream &  os,
vnl_vector_fixed< T, n > const &  v,
std::string  name = "vnl_vector_fixed< T, n >" 
)
related

XML save vnl_vector_fixed as a 2-level tree to stream.

Member Data Documentation

◆ data_

template<class T, unsigned int n>
T vnl_vector_fixed< T, n >::data_[n]
protected

Definition at line 90 of file vnl_vector_fixed.h.


The documentation for this class was generated from the following files: