-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy patha01100_source.html
177 lines (175 loc) · 18.4 KB
/
a01100_source.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.3"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>gtsam: /Users/dellaert/git/github/gtsam/slam/JacobianFactorSVD.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">gtsam<span id="projectnumber"> 4.1.1</span>
</div>
<div id="projectbrief">gtsam</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.3 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
$(document).ready(function(){initNavTree('a01100_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="headertitle"><div class="title">JacobianFactorSVD.h</div></div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="comment">/*</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="comment"> * @file JacobianFactorSVD.h</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="comment"> * @date Oct 27, 2013</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="comment"> * @uthor Frank Dellaert</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="comment"> */</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span> </div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="preprocessor">#pragma once</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="preprocessor">#include <<a class="code" href="a00746.html">gtsam/linear/RegularJacobianFactor.h</a>></span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span> </div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="keyword">namespace </span><a class="code hl_namespace" href="a01596.html">gtsam</a> {</div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span><span class="keyword">template</span><<span class="keywordtype">size_t</span> D, <span class="keywordtype">size_t</span> ZDim></div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"><a class="line" href="a04808.html"> 29</a></span><span class="keyword">class </span><a class="code hl_class" href="a04808.html">JacobianFactorSVD</a>: <span class="keyword">public</span> <a class="code hl_class" href="a03968.html">RegularJacobianFactor</a><D> {</div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> </div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> <span class="keyword">typedef</span> <a class="code hl_class" href="a03968.html">RegularJacobianFactor<D></a> <a class="code hl_class" href="a03544.html">Base</a>;</div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> <span class="keyword">typedef</span> Eigen::Matrix<double, ZDim, D> MatrixZD; <span class="comment">// e.g 2 x 6 with Z=Point2</span></div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> <span class="keyword">typedef</span> std::pair<Key, Matrix> KeyMatrix;</div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> </div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span><span class="keyword">public</span>:</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> </div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"><a class="line" href="a04808.html#a551b1c04012573be8cb418c02ed77295"> 38</a></span> <a class="code hl_function" href="a04808.html#a551b1c04012573be8cb418c02ed77295">JacobianFactorSVD</a>() {</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> }</div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> </div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"><a class="line" href="a04808.html#a7631acc7207dd75097e22708237f3632"> 42</a></span> <a class="code hl_function" href="a04808.html#a7631acc7207dd75097e22708237f3632">JacobianFactorSVD</a>(<span class="keyword">const</span> <a class="code hl_typedef" href="a01596.html#a1c320e42b033352fbbd8266e3bd5faad">KeyVector</a>& <a class="code hl_function" href="a03544.html#a03d71985cf81a0175a71d1ecf5279edb">keys</a>,</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> <span class="keyword">const</span> SharedDiagonal& model = SharedDiagonal())</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> : <a class="code hl_class" href="a03544.html">Base</a>() {</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> Matrix zeroMatrix = Matrix::Zero(0, D);</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> Vector zeroVector = Vector::Zero(0);</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> std::vector<KeyMatrix> QF;</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> QF.reserve(<a class="code hl_function" href="a03544.html#a03d71985cf81a0175a71d1ecf5279edb">keys</a>.size());</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> <span class="keywordflow">for</span>(<span class="keyword">const</span> <a class="code hl_typedef" href="a01596.html#adad029f5f6ffce610428b5fe768b0df2">Key</a>& key: <a class="code hl_function" href="a03544.html#a03d71985cf81a0175a71d1ecf5279edb">keys</a>)</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> QF.push_back(KeyMatrix(key, zeroMatrix));</div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> <a class="code hl_function" href="a03796.html#a44d0e92d8e8e74eab3792080ed648b5e">JacobianFactor::fillTerms</a>(QF, zeroVector, model);</div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> }</div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> </div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"><a class="line" href="a04808.html#a72d8f9bc4560c97915194f35f8c2025f"> 64</a></span> <a class="code hl_function" href="a04808.html#a72d8f9bc4560c97915194f35f8c2025f">JacobianFactorSVD</a>(</div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> <span class="keyword">const</span> <a class="code hl_typedef" href="a01596.html#a1c320e42b033352fbbd8266e3bd5faad">KeyVector</a>& <a class="code hl_function" href="a03544.html#a03d71985cf81a0175a71d1ecf5279edb">keys</a>,</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> <span class="keyword">const</span> std::vector<MatrixZD, Eigen::aligned_allocator<MatrixZD> >& Fblocks,</div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> <span class="keyword">const</span> Matrix& Enull, <span class="keyword">const</span> Vector& b,</div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> <span class="keyword">const</span> SharedDiagonal& model = SharedDiagonal())</div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> : <a class="code hl_class" href="a03544.html">Base</a>() {</div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> <span class="keywordtype">size_t</span> numKeys = Enull.rows() / ZDim;</div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> <span class="keywordtype">size_t</span> m2 = ZDim * numKeys - 3; <span class="comment">// TODO: is this not just Enull.rows()?</span></div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> <span class="comment">// PLAIN nullptr SPACE TRICK</span></div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> <span class="comment">// Matrix Q = Enull * Enull.transpose();</span></div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> <span class="comment">// for(const KeyMatrixZD& it: Fblocks)</span></div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> <span class="comment">// QF.push_back(KeyMatrix(it.first, Q.block(0, 2 * j++, m2, 2) * it.second));</span></div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> <span class="comment">// JacobianFactor factor(QF, Q * b);</span></div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> std::vector<KeyMatrix> QF;</div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> QF.reserve(numKeys);</div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> k = 0; k < Fblocks.size(); ++k) {</div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> <a class="code hl_typedef" href="a01596.html#adad029f5f6ffce610428b5fe768b0df2">Key</a> key = <a class="code hl_function" href="a03544.html#a03d71985cf81a0175a71d1ecf5279edb">keys</a>[k];</div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> QF.emplace_back(</div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> key, (Enull.transpose()).block(0, ZDim * k, m2, ZDim) * Fblocks[k]);</div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> }</div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> <a class="code hl_function" href="a03796.html#a44d0e92d8e8e74eab3792080ed648b5e">JacobianFactor::fillTerms</a>(QF, Enull.transpose() * b, model);</div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> }</div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span>};</div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> </div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span>}</div>
<div class="ttc" id="aa00746_html"><div class="ttname"><a href="a00746.html">RegularJacobianFactor.h</a></div><div class="ttdoc">JacobianFactor class with fixed sized blcoks.</div></div>
<div class="ttc" id="aa01596_html"><div class="ttname"><a href="a01596.html">gtsam</a></div><div class="ttdoc">Global functions in a separate testing namespace.</div><div class="ttdef"><b>Definition:</b> chartTesting.h:28</div></div>
<div class="ttc" id="aa01596_html_a1c320e42b033352fbbd8266e3bd5faad"><div class="ttname"><a href="a01596.html#a1c320e42b033352fbbd8266e3bd5faad">gtsam::KeyVector</a></div><div class="ttdeci">FastVector< Key > KeyVector</div><div class="ttdoc">Define collection type once and for all - also used in wrappers.</div><div class="ttdef"><b>Definition:</b> Key.h:86</div></div>
<div class="ttc" id="aa01596_html_adad029f5f6ffce610428b5fe768b0df2"><div class="ttname"><a href="a01596.html#adad029f5f6ffce610428b5fe768b0df2">gtsam::Key</a></div><div class="ttdeci">std::uint64_t Key</div><div class="ttdoc">Integer nonlinear key type.</div><div class="ttdef"><b>Definition:</b> types.h:69</div></div>
<div class="ttc" id="aa03544_html"><div class="ttname"><a href="a03544.html">gtsam::Factor</a></div><div class="ttdoc">This is the base class for all factor types.</div><div class="ttdef"><b>Definition:</b> Factor.h:56</div></div>
<div class="ttc" id="aa03544_html_a03d71985cf81a0175a71d1ecf5279edb"><div class="ttname"><a href="a03544.html#a03d71985cf81a0175a71d1ecf5279edb">gtsam::Factor::keys</a></div><div class="ttdeci">const KeyVector & keys() const</div><div class="ttdoc">Access the factor's involved variable keys.</div><div class="ttdef"><b>Definition:</b> Factor.h:125</div></div>
<div class="ttc" id="aa03796_html_a44d0e92d8e8e74eab3792080ed648b5e"><div class="ttname"><a href="a03796.html#a44d0e92d8e8e74eab3792080ed648b5e">gtsam::JacobianFactor::fillTerms</a></div><div class="ttdeci">void fillTerms(const TERMS &terms, const Vector &b, const SharedDiagonal &noiseModel)</div><div class="ttdoc">Internal function to fill blocks and set dimensions.</div><div class="ttdef"><b>Definition:</b> JacobianFactor-inl.h:60</div></div>
<div class="ttc" id="aa03968_html"><div class="ttname"><a href="a03968.html">gtsam::RegularJacobianFactor</a></div><div class="ttdoc">JacobianFactor with constant sized blocks Provides raw memory access versions of linear operator.</div><div class="ttdef"><b>Definition:</b> RegularJacobianFactor.h:32</div></div>
<div class="ttc" id="aa04808_html"><div class="ttname"><a href="a04808.html">gtsam::JacobianFactorSVD</a></div><div class="ttdoc">JacobianFactor for Schur complement that uses the "Nullspace Trick" by Mourikis et al.</div><div class="ttdef"><b>Definition:</b> JacobianFactorSVD.h:29</div></div>
<div class="ttc" id="aa04808_html_a551b1c04012573be8cb418c02ed77295"><div class="ttname"><a href="a04808.html#a551b1c04012573be8cb418c02ed77295">gtsam::JacobianFactorSVD::JacobianFactorSVD</a></div><div class="ttdeci">JacobianFactorSVD()</div><div class="ttdoc">Default constructor.</div><div class="ttdef"><b>Definition:</b> JacobianFactorSVD.h:38</div></div>
<div class="ttc" id="aa04808_html_a72d8f9bc4560c97915194f35f8c2025f"><div class="ttname"><a href="a04808.html#a72d8f9bc4560c97915194f35f8c2025f">gtsam::JacobianFactorSVD::JacobianFactorSVD</a></div><div class="ttdeci">JacobianFactorSVD(const KeyVector &keys, const std::vector< MatrixZD, Eigen::aligned_allocator< MatrixZD > > &Fblocks, const Matrix &Enull, const Vector &b, const SharedDiagonal &model=SharedDiagonal())</div><div class="ttdoc">Construct a new JacobianFactorSVD object, createing a reduced-rank Jacobian factor on the CameraSet.</div><div class="ttdef"><b>Definition:</b> JacobianFactorSVD.h:64</div></div>
<div class="ttc" id="aa04808_html_a7631acc7207dd75097e22708237f3632"><div class="ttname"><a href="a04808.html#a7631acc7207dd75097e22708237f3632">gtsam::JacobianFactorSVD::JacobianFactorSVD</a></div><div class="ttdeci">JacobianFactorSVD(const KeyVector &keys, const SharedDiagonal &model=SharedDiagonal())</div><div class="ttdoc">Empty constructor with keys.</div><div class="ttdef"><b>Definition:</b> JacobianFactorSVD.h:42</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_bfc28a2d5821421c95e1320e4031f515.html">gtsam</a></li><li class="navelem"><a class="el" href="dir_323e70a1eef083399c870cf8a6035771.html">slam</a></li><li class="navelem"><b>JacobianFactorSVD.h</b></li>
<li class="footer">Generated on Tue Jan 25 2022 13:36:44 for gtsam by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.3 </li>
</ul>
</div>
</body>
</html>