📄 vnl_orthogonal_complement.txx
字号:
// This is vxl/vnl/algo/vnl_orthogonal_complement.txx
#ifndef vnl_orthogonal_complement_txx_
#define vnl_orthogonal_complement_txx_
/*
fsm
*/
#include "vnl_orthogonal_complement.h"
#include <vnl/algo/vnl_svd.h>
template <class T>
vnl_matrix<T> vnl_orthogonal_complement(vnl_vector<T> const &v)
{
unsigned n = v.size();
vnl_matrix<T> tmp(1, n);
tmp.set_row(0, v);
return vnl_svd<T>(tmp).V().extract(n, n-1, 0, 1);
}
#if 0
template <class T>
vnl_matrix<T> vnl_orthogonal_complement(vnl_matrix<T> const &M)
{
// TODO
}
#endif
//--------------------------------------------------------------------------------
#undef VNL_ORTHOGONAL_COMPLEMENT_INSTANTIATE
#define VNL_ORTHOGONAL_COMPLEMENT_INSTANTIATE(T) \
/* template vnl_matrix<T > vnl_orthogonal_complement(vnl_matrix<T > const &); */ \
template vnl_matrix<T > vnl_orthogonal_complement(vnl_vector<T > const &)
#endif // vnl_orthogonal_complement_txx_
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -