I've just committed a bunch of changes to vnl that pulls
vnl_vector_fixed and vnl_matrix_fixed out of the vnl_vector and
vnl_matrix hierarchies. I've made changes to the vxl tree so that
everything compiles (should compile...). Surprising few changes were
required; most were to oxl/mvl, which made some assumptions on what
the internal layout of a vnl_matrix_fixed was.
Client code using the fixed classes may require fixes. In most cases,
the fixes are straight forward. I'll list the types that I came
1. Automated conversions don't fire because of templated
functions. This could apply to some of the operators (+,-,etc), but
see (3) below.
Solution: add .as_ref().
void f( const vnl_vector<T>& v );
f( my_v.as_ref() );
2. Passing a vector into a mutator. (I.e., need a non-const
Solution: Use as_ref().as_const():
void f( vnl_vector<T>& v );
f( my_v.as_ref().as_const() );
Beware: this is only good for passing arguments. See the
documentation of vnl_vector_ref::as_const(). Be extremely careful
about lifetimes. In particular, the following will cause undefined
vnl_vector<double>& ref = my_fixed_v.as_ref().as_const(); // NO!
Change such instances to use the correct type. For example,
vnl_double_3x3& R = *this;
3. Missing matrix-vector_fixed multiplications.
Solution: include vnl_matrix_fixed.
The overload for vnl_matrix * vnl_vector_fixed is in
vnl_matrix_fixed.h. It's hard to put it anywhere else without
creating unnecessary dependencies.
4. cross_2d and cross_3d not found.
Solution: Rename to vnl_cross* and include vnl_cross.h
5. Missing vnl_vector_dereference
Solution: none. It was removed.
Hopefully I haven't broken too much...