15 template <
class T>
inline const typename T::first_type&
first_point(
const T& t) {
return t.first; }
16 template <
class T>
inline const typename T::second_type&
second_point(
const T& t) {
return t.second; }
17 template <
class T>
inline double noise(
const T& t) {
return 1.0; }
34 assert(std::distance(begin,end) >= 4);
37 for (It it=begin; it!=end; it++) {
40 const TooN::Vector<8> J1 = TooN::makeVector(a[0], a[1], 1, 0, 0, 0, -b[0]*a[0], -b[0]*a[1]);
41 const TooN::Vector<8> J2 = TooN::makeVector(0, 0, 0, a[0], a[1], 1, -b[1]*a[0], -b[1]*a[1]);
42 wls.add_mJ(b[0], J1,
noise(*it));
43 wls.add_mJ(b[1], J2,
noise(*it));
46 TooN::Vector<8> h = wls.get_mu();
47 H[0] = h.template slice<0,3>();
48 H[1] = h.template slice<3,3>();
79 assert(vec.size() == 3);
80 assert(result.num_cols() == 3 && result.num_rows() == 3);
81 result(0,0) = 0; result(0,1) = -vec[2]; result(0,2) = vec[1];
82 result(1,0) = vec[2]; result(1,1) = 0; result(1,2) = -vec[0];
83 result(2,0) = -vec[1]; result(2,1) = vec[0]; result(2,2) = 0;
91 TooN::Matrix<3> result;
102 const TooN::Vector<3> & t = transform.get_translation();
103 const TooN::Matrix<3> & r = transform.get_rotation().get_matrix();
104 E[0] = t[1] * r[2] - t[2] * r[1];
105 E[1] = t[2] * r[0] - t[0] * r[2];
106 E[2] = t[0] * r[1] - t[1] * r[0];
121 #endif // TAG_HELPERS_H