Macros
vnl_T_n.h File Reference
#include <vnl/vnl_vector_fixed.h>
#include "vnl/vnl_export.h"

Go to the source code of this file.

Macros

#define vnl_T_n_aux_1(T)   (T x) { data_[0] = x; }
 cpp traits!. More...
 
#define vnl_T_n_aux_2(T)   (T x, T y) { data_[0] = x; data_[1] = y; }
 
#define vnl_T_n_aux_3(T)   (T x, T y, T z) { data_[0] = x; data_[1] = y; data_[2] = z; }
 
#define vnl_T_n_aux_4(T)   (T x, T y, T z, T w) { data_[0] = x; data_[1] = y; data_[2] = z; data_[3] = w; }
 
#define vnl_T_n_aux_5(T)   (T x, T y, T z, T w, T u) { data_[0] = x; data_[1] = y; data_[2] = z; data_[3] = w; data_[4]= u; }
 
#define vnl_T_n_class_impl(T, n)
 this macro defines the class. More...
 
#define vnl_T_n_funcs_impl(T, n)   /* no need */
 
#define vnl_T_n_impl(T, n)
 clients use this. More...
 

Detailed Description

Author
fsm

Purpose: the vnl_vector_fixed<T,n> template class provides non-mallocing vectors of given size, but it has no constructor from n Ts. This macro declares a class vnl_T_n which is derived directly from vnl_vector_fixed<T,n> and has such a constructor.

Inspired by the numerous double-3, int-2 things lying around.

Definition in file vnl_T_n.h.

Macro Definition Documentation

◆ vnl_T_n_aux_1

#define vnl_T_n_aux_1 (   T)    (T x) { data_[0] = x; }

cpp traits!.

Definition at line 19 of file vnl_T_n.h.

◆ vnl_T_n_aux_2

#define vnl_T_n_aux_2 (   T)    (T x, T y) { data_[0] = x; data_[1] = y; }

Definition at line 20 of file vnl_T_n.h.

◆ vnl_T_n_aux_3

#define vnl_T_n_aux_3 (   T)    (T x, T y, T z) { data_[0] = x; data_[1] = y; data_[2] = z; }

Definition at line 21 of file vnl_T_n.h.

◆ vnl_T_n_aux_4

#define vnl_T_n_aux_4 (   T)    (T x, T y, T z, T w) { data_[0] = x; data_[1] = y; data_[2] = z; data_[3] = w; }

Definition at line 22 of file vnl_T_n.h.

◆ vnl_T_n_aux_5

#define vnl_T_n_aux_5 (   T)    (T x, T y, T z, T w, T u) { data_[0] = x; data_[1] = y; data_[2] = z; data_[3] = w; data_[4]= u; }

Definition at line 23 of file vnl_T_n.h.

◆ vnl_T_n_class_impl

#define vnl_T_n_class_impl (   T,
 
)
Value:
class vnl_##T##_##n : public vnl_vector_fixed<T ,n> \
{ \
public: \
vnl_##T##_##n() { } \
vnl_##T##_##n(vnl_vector<T > const & rhs) : vnl_vector_fixed<T ,n>(rhs) { } \
vnl_##T##_##n(vnl_vector_fixed<T ,n> const & rhs) : vnl_vector_fixed<T ,n>(rhs) { } \
vnl_##T##_##n vnl_T_n_aux_##n(T) \
};
Mathematical vector class, templated by type of element.
Definition: vnl_fwd.h:16
Fixed length stack-stored, space-efficient vector.
Definition: vnl_fwd.h:22

this macro defines the class.

e.g. use vnl_T_n_impl(int,2) to implement class vnl_int_2.

Definition at line 27 of file vnl_T_n.h.

◆ vnl_T_n_funcs_impl

#define vnl_T_n_funcs_impl (   T,
 
)    /* no need */

Definition at line 38 of file vnl_T_n.h.

◆ vnl_T_n_impl

#define vnl_T_n_impl (   T,
 
)
Value:
vnl_T_n_funcs_impl(T,n)
#define vnl_T_n_class_impl(T, n)
this macro defines the class.
Definition: vnl_T_n.h:27

clients use this.

Definition at line 41 of file vnl_T_n.h.