> Gehua Yang wrote about changing outer_product API for fixed vectors:
> Currently, I put the template into a new file called vnl_util_fixed.h.
> But theoretically it shall replace the outer_product() function in
> vnl_vector_fixed.h
Actually, the signature of this function should be extended to allow for
the outer product of two vectors of unequal length:
template <class T, unsigned m, unsigned n>
vnl_matrix_fixed<T,m,n>
outer_product(vnl_vector_fixed<T,m> const&, vnl_vector_fixed<T,n> const&);
Amitha Perera wrote, in reply to Gehua Yang's request:
> Another option is to move outer_product to vnl_matrix_fixed.h
With the mentioned extension, this would indeed be the best thing to do,
because then it can be included in the definition of
VNL_MATRIX_FIXED_INSTANTIATE(T,m,n).
Since I don't see an important advantage in having the implementation of
outer_product inlined (as it's a double for loop), I would indeed move
the implementation to vnl_matrix_fixed.txx. This also avoids the need
for mutual #includes between vnl_matrix_fixed.h and vnl_vector_fixed.h.
Actually, with respect to mutual 3includes, the solution used in
vnl_matrix.h and vnl_vector.h could be mimiced, namely forward declaring
both classes in both header files.
Remains the API change of (the return type of) the outer_product function.
Apart from one place in vnl/tests/test_vector.cxx, none of the current
public vxl code will be affected by this change.
If noone objects, I will make the necessary changes by the end of next week.
 Peter.
