vnl_orthogonal_complement.hxx
Go to the documentation of this file.
1 // This is core/vnl/algo/vnl_orthogonal_complement.hxx
2 #ifndef vnl_orthogonal_complement_hxx_
3 #define vnl_orthogonal_complement_hxx_
4 /*
5  fsm
6 */
8 #include <vnl/algo/vnl_svd.h>
9 
10 template <class T>
12 {
13  unsigned n = v.size();
14  vnl_matrix<T> tmp(1, n);
15  tmp.set_row(0, v);
16  return vnl_svd<T>(tmp).V().extract(n, n-1, 0, 1);
17 }
18 
19 //--------------------------------------------------------------------------------
20 
21 #undef VNL_ORTHOGONAL_COMPLEMENT_INSTANTIATE
22 #define VNL_ORTHOGONAL_COMPLEMENT_INSTANTIATE(T) \
23 /* template vnl_matrix<T > vnl_orthogonal_complement(vnl_matrix<T > const &); */ \
24 template VNL_ALGO_EXPORT vnl_matrix<T > vnl_orthogonal_complement(vnl_vector<T > const &)
25 
26 #endif // vnl_orthogonal_complement_hxx_
#define v
Definition: vnl_vector.h:42
For computing the orthogonal complement to a linear subspace.
An ordinary mathematical matrix.
Definition: vnl_adjugate.h:22
Mathematical vector class, templated by type of element.
Definition: vnl_fwd.h:16
vnl_matrix & set_row(unsigned i, T const *v)
Set the elements of the i'th row to v[i] (No bounds checking).
vnl_matrix< T > & V()
Return the matrix V.
Definition: vnl_svd.h:124
Holds the singular value decomposition of a vnl_matrix.
vnl_matrix< T > vnl_orthogonal_complement(vnl_vector< T > const &v)
Return a matrix whose columns span is the orthogonal complement of v.
Holds the singular value decomposition of a vnl_matrix.
Definition: vnl_algo_fwd.h:7