aboutsummaryrefslogtreecommitdiffstats
path: root/doc/latex/classmeow_1_1VP__Tree.tex
blob: a0ce0e4521ac4f7a3ef048d86614902c2d850365 (plain) (blame)
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
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
\hypertarget{classmeow_1_1VP__Tree}{\section{meow\-:\-:V\-P\-\_\-\-Tree$<$ Vector, Scalar $>$ Class Template Reference}
\label{classmeow_1_1VP__Tree}\index{meow\-::\-V\-P\-\_\-\-Tree$<$ Vector, Scalar $>$@{meow\-::\-V\-P\-\_\-\-Tree$<$ Vector, Scalar $>$}}
}


跟\-K\-D\-\_\-\-Tree很像歐  




{\ttfamily \#include \char`\"{}V\-P\-\_\-\-Tree.\-h\char`\"{}}

\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
typedef std\-::vector$<$ \hyperlink{classmeow_1_1Vector}{Vector} $>$ \hyperlink{classmeow_1_1VP__Tree_a02c136810876c8713b9760aa8bb51aa4}{Vectors}
\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{classmeow_1_1VP__Tree_ab611c988f5c567498d40866e9eab3851}{V\-P\-\_\-\-Tree} ()
\begin{DoxyCompactList}\small\item\em constructor, with dimension = 1 \end{DoxyCompactList}\item 
\hyperlink{classmeow_1_1VP__Tree_a1f301f751afe7baf5eafe6964c6a7a15}{V\-P\-\_\-\-Tree} (\hyperlink{classmeow_1_1VP__Tree}{V\-P\-\_\-\-Tree} const \&tree2)
\begin{DoxyCompactList}\small\item\em constructor, 複製資料 \end{DoxyCompactList}\item 
\hyperlink{classmeow_1_1VP__Tree_a5ce274e16a28c6ef5cac63c6e3258d8b}{V\-P\-\_\-\-Tree} (size\-\_\-t dimension)
\begin{DoxyCompactList}\small\item\em constructor, 給定dimension \end{DoxyCompactList}\item 
\hyperlink{classmeow_1_1VP__Tree_a599a1fba89e0e5a06fa1e71c81bc5216}{$\sim$\-V\-P\-\_\-\-Tree} ()
\begin{DoxyCompactList}\small\item\em destructor \end{DoxyCompactList}\item 
\hyperlink{classmeow_1_1VP__Tree}{V\-P\-\_\-\-Tree} \& \hyperlink{classmeow_1_1VP__Tree_afcc9734a4e012d6dfdab408d5c698905}{copy\-From} (\hyperlink{classmeow_1_1VP__Tree}{V\-P\-\_\-\-Tree} const \&tree2)
\begin{DoxyCompactList}\small\item\em 複製資料 \end{DoxyCompactList}\item 
void \hyperlink{classmeow_1_1VP__Tree_a2319a3995c4b6ad415a4997764e83b3f}{insert} (\hyperlink{classmeow_1_1Vector}{Vector} const \&vector)
\begin{DoxyCompactList}\small\item\em 將給定的\-Vector加到set中 \end{DoxyCompactList}\item 
bool \hyperlink{classmeow_1_1VP__Tree_aa53e215a7e6daa3edfba4201602c8894}{erase} (\hyperlink{classmeow_1_1Vector}{Vector} const \&vector)
\begin{DoxyCompactList}\small\item\em 將給定的\-Vector從set移除 \end{DoxyCompactList}\item 
void \hyperlink{classmeow_1_1VP__Tree_a4688e0675080bf406a086d176c5555b9}{build} ()
\begin{DoxyCompactList}\small\item\em 檢查至今是否有 insert/erase 被呼叫來決定是否 {\ttfamily rebuild()} \end{DoxyCompactList}\item 
void \hyperlink{classmeow_1_1VP__Tree_aa4adfa52bd1cee8703b49a5ecf906733}{force\-Build} ()
\begin{DoxyCompactList}\small\item\em 重新建樹 \end{DoxyCompactList}\item 
\hyperlink{classmeow_1_1VP__Tree_a02c136810876c8713b9760aa8bb51aa4}{Vectors} \hyperlink{classmeow_1_1VP__Tree_a22db303a6318b2ef58957b22063cb591}{query} (\hyperlink{classmeow_1_1Vector}{Vector} const \&vector, size\-\_\-t nearest\-Number, bool compare\-Whole\-Vector) const 
\begin{DoxyCompactList}\small\item\em 查找 \end{DoxyCompactList}\item 
void \hyperlink{classmeow_1_1VP__Tree_ac4d1a186226b2d27abce9eb71149c62c}{clear} ()
\begin{DoxyCompactList}\small\item\em 清空所有資料 \end{DoxyCompactList}\item 
size\-\_\-t \hyperlink{classmeow_1_1VP__Tree_ad1bffde18bc2f0fc955e78fe77333558}{reset} (size\-\_\-t dimension)
\begin{DoxyCompactList}\small\item\em 清空所有資料並重新給定維度 \end{DoxyCompactList}\item 
\hyperlink{classmeow_1_1VP__Tree}{V\-P\-\_\-\-Tree} \& \hyperlink{classmeow_1_1VP__Tree_a7c73bb25b40f440b48267f94fa4561ad}{operator=} (\hyperlink{classmeow_1_1VP__Tree}{V\-P\-\_\-\-Tree} const \&tree2)
\begin{DoxyCompactList}\small\item\em same as {\ttfamily copy\-From(tree2)} \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
\subsubsection*{template$<$class Vector, class Scalar$>$class meow\-::\-V\-P\-\_\-\-Tree$<$ Vector, Scalar $>$}

跟\-K\-D\-\_\-\-Tree很像歐 

{\ttfamily \hyperlink{classmeow_1_1VP__Tree}{V\-P\-\_\-\-Tree}} 用來維護由 {\bfseries N個\-K維度向量所成的集合} , 並可於該set中查找 {\bfseries 前i個離給定向量最接近的向量$\ast$} . 不像 {\ttfamily \hyperlink{classmeow_1_1KD__Tree}{K\-D\-\_\-\-Tree}} 二分樹每次都選擇一個維度去分, 分成小的跟大的, {\ttfamily \hyperlink{classmeow_1_1VP__Tree}{V\-P\-\_\-\-Tree}} 每次選一個點, 將資料分成 離這個點近的, 跟離這個點遠的. 至於怎麼選呢...., 嘛還沒研究, 先random

參考資料連結\-:
\begin{DoxyItemize}
\item \href{http://stevehanov.ca/blog/index.php?id=130}{\tt http\-://stevehanov.\-ca/blog/index.\-php?id=130}
\item \href{http://pnylab.com/pny/papers/vptree/vptree}{\tt http\-://pnylab.\-com/pny/papers/vptree/vptree}
\end{DoxyItemize}

\subsubsection*{Template Class Operators Request }

\begin{TabularC}{6}
\hline
\rowcolor{lightgray}\PBS\raggedleft {\bf const?}&\PBS\centering {\bf Typename}&\PBS\raggedleft {\bf Operator }&{\bf Parameters }&\PBS\centering {\bf Return Type }&{\bf Description  }\\\cline{1-6}
\PBS\raggedleft const &\PBS\centering \hyperlink{classmeow_1_1Vector}{Vector}&\PBS\raggedleft operator\mbox{[}\mbox{]} &(size\-\_\-t {\ttfamily n}) &\PBS\centering Scalar &取得第{\ttfamily n} 維度量 \\\cline{1-6}
\PBS\raggedleft const &\PBS\centering \hyperlink{classmeow_1_1Vector}{Vector}&\PBS\raggedleft operator= &(\hyperlink{classmeow_1_1Vector}{Vector} {\ttfamily v}) &\PBS\centering \hyperlink{classmeow_1_1Vector}{Vector}\& &copy operator \\\cline{1-6}
\PBS\raggedleft const &\PBS\centering \hyperlink{classmeow_1_1Vector}{Vector}&\PBS\raggedleft operator$<$ &(\hyperlink{classmeow_1_1Vector}{Vector} {\ttfamily v}) &\PBS\centering bool &權重比較 \\\cline{1-6}
\PBS\raggedleft const &\PBS\centering Scalar&\PBS\raggedleft 'Scalar' &(int {\ttfamily n}) &\PBS\centering Scalar &建構子, \\\cline{1-6}
\end{TabularC}
其中一定{\ttfamily n=0or4} $\vert$ $\vert$const $\vert$ Scalar$\vert$operator$\ast$ $\vert$(Scalar {\ttfamily s}) $\vert$ Scalar $\vert$ 相乘 $\vert$ $\vert$const $\vert$ Scalar$\vert$operator+ $\vert$(Scalar {\ttfamily s}) $\vert$ Scalar $\vert$ 相加 $\vert$ $\vert$const $\vert$ Scalar$\vert$operator-\/ $\vert$(Scalar {\ttfamily s}) $\vert$ Scalar $\vert$ 相差 $\vert$ $\vert$const $\vert$ Scalar$\vert$operator-\/ $\vert$( ) $\vert$ Scalar $\vert$ 取負號 $\vert$ $\vert$const $\vert$ Scalar$\vert$operator$<$ $\vert$(Scalar {\ttfamily s}) $\vert$ bool $\vert$ 大小比較 $\vert$

\begin{DoxyNote}{Note}
\-: -\/實測結果發覺, 維度小的時候, 比起中規中矩的 {\ttfamily \hyperlink{classmeow_1_1KD__Tree}{K\-D\-\_\-\-Tree}}, {\ttfamily \hyperlink{classmeow_1_1VP__Tree}{V\-P\-\_\-\-Tree}}{\bfseries random} 於其中, 因此時間複雜度只是期望值 {\ttfamily O(log\-N)} 但是測資大到 一定程度, {\ttfamily \hyperlink{classmeow_1_1KD__Tree}{K\-D\-\_\-\-Tree}} 效率會一整個大幅掉下, 但 {\ttfamily \hyperlink{classmeow_1_1VP__Tree}{V\-P\-\_\-\-Tree}} 幾乎不受影響 -\/\-T\-O\-D\-O {\ttfamily \hyperlink{classmeow_1_1VP__Tree_a2319a3995c4b6ad415a4997764e83b3f}{insert()}}, {\ttfamily \hyperlink{classmeow_1_1VP__Tree_aa53e215a7e6daa3edfba4201602c8894}{erase()}} 算是未完成功能 
\end{DoxyNote}


Definition at line 51 of file V\-P\-\_\-\-Tree.\-h.



\subsection{Member Typedef Documentation}
\hypertarget{classmeow_1_1VP__Tree_a02c136810876c8713b9760aa8bb51aa4}{\index{meow\-::\-V\-P\-\_\-\-Tree@{meow\-::\-V\-P\-\_\-\-Tree}!Vectors@{Vectors}}
\index{Vectors@{Vectors}!meow::VP_Tree@{meow\-::\-V\-P\-\_\-\-Tree}}
\subsubsection[{Vectors}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class Vector, class Scalar$>$ typedef std\-::vector$<${\bf Vector}$>$ {\bf meow\-::\-V\-P\-\_\-\-Tree}$<$ {\bf Vector}, Scalar $>$\-::{\bf Vectors}}}\label{classmeow_1_1VP__Tree_a02c136810876c8713b9760aa8bb51aa4}


Definition at line 53 of file V\-P\-\_\-\-Tree.\-h.



\subsection{Constructor \& Destructor Documentation}
\hypertarget{classmeow_1_1VP__Tree_ab611c988f5c567498d40866e9eab3851}{\index{meow\-::\-V\-P\-\_\-\-Tree@{meow\-::\-V\-P\-\_\-\-Tree}!V\-P\-\_\-\-Tree@{V\-P\-\_\-\-Tree}}
\index{V\-P\-\_\-\-Tree@{V\-P\-\_\-\-Tree}!meow::VP_Tree@{meow\-::\-V\-P\-\_\-\-Tree}}
\subsubsection[{V\-P\-\_\-\-Tree}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class Vector, class Scalar$>$ {\bf meow\-::\-V\-P\-\_\-\-Tree}$<$ {\bf Vector}, Scalar $>$\-::{\bf V\-P\-\_\-\-Tree} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{classmeow_1_1VP__Tree_ab611c988f5c567498d40866e9eab3851}


constructor, with dimension = 1 



Definition at line 212 of file V\-P\-\_\-\-Tree.\-h.

\hypertarget{classmeow_1_1VP__Tree_a1f301f751afe7baf5eafe6964c6a7a15}{\index{meow\-::\-V\-P\-\_\-\-Tree@{meow\-::\-V\-P\-\_\-\-Tree}!V\-P\-\_\-\-Tree@{V\-P\-\_\-\-Tree}}
\index{V\-P\-\_\-\-Tree@{V\-P\-\_\-\-Tree}!meow::VP_Tree@{meow\-::\-V\-P\-\_\-\-Tree}}
\subsubsection[{V\-P\-\_\-\-Tree}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class Vector, class Scalar$>$ {\bf meow\-::\-V\-P\-\_\-\-Tree}$<$ {\bf Vector}, Scalar $>$\-::{\bf V\-P\-\_\-\-Tree} (
\begin{DoxyParamCaption}
\item[{{\bf V\-P\-\_\-\-Tree}$<$ {\bf Vector}, Scalar $>$ const \&}]{tree2}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{classmeow_1_1VP__Tree_a1f301f751afe7baf5eafe6964c6a7a15}


constructor, 複製資料 



Definition at line 217 of file V\-P\-\_\-\-Tree.\-h.

\hypertarget{classmeow_1_1VP__Tree_a5ce274e16a28c6ef5cac63c6e3258d8b}{\index{meow\-::\-V\-P\-\_\-\-Tree@{meow\-::\-V\-P\-\_\-\-Tree}!V\-P\-\_\-\-Tree@{V\-P\-\_\-\-Tree}}
\index{V\-P\-\_\-\-Tree@{V\-P\-\_\-\-Tree}!meow::VP_Tree@{meow\-::\-V\-P\-\_\-\-Tree}}
\subsubsection[{V\-P\-\_\-\-Tree}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class Vector, class Scalar$>$ {\bf meow\-::\-V\-P\-\_\-\-Tree}$<$ {\bf Vector}, Scalar $>$\-::{\bf V\-P\-\_\-\-Tree} (
\begin{DoxyParamCaption}
\item[{size\-\_\-t}]{dimension}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{classmeow_1_1VP__Tree_a5ce274e16a28c6ef5cac63c6e3258d8b}


constructor, 給定dimension 



Definition at line 225 of file V\-P\-\_\-\-Tree.\-h.

\hypertarget{classmeow_1_1VP__Tree_a599a1fba89e0e5a06fa1e71c81bc5216}{\index{meow\-::\-V\-P\-\_\-\-Tree@{meow\-::\-V\-P\-\_\-\-Tree}!$\sim$\-V\-P\-\_\-\-Tree@{$\sim$\-V\-P\-\_\-\-Tree}}
\index{$\sim$\-V\-P\-\_\-\-Tree@{$\sim$\-V\-P\-\_\-\-Tree}!meow::VP_Tree@{meow\-::\-V\-P\-\_\-\-Tree}}
\subsubsection[{$\sim$\-V\-P\-\_\-\-Tree}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class Vector, class Scalar$>$ {\bf meow\-::\-V\-P\-\_\-\-Tree}$<$ {\bf Vector}, Scalar $>$\-::$\sim${\bf V\-P\-\_\-\-Tree} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{classmeow_1_1VP__Tree_a599a1fba89e0e5a06fa1e71c81bc5216}


destructor 



Definition at line 234 of file V\-P\-\_\-\-Tree.\-h.



\subsection{Member Function Documentation}
\hypertarget{classmeow_1_1VP__Tree_a4688e0675080bf406a086d176c5555b9}{\index{meow\-::\-V\-P\-\_\-\-Tree@{meow\-::\-V\-P\-\_\-\-Tree}!build@{build}}
\index{build@{build}!meow::VP_Tree@{meow\-::\-V\-P\-\_\-\-Tree}}
\subsubsection[{build}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class Vector, class Scalar$>$ void {\bf meow\-::\-V\-P\-\_\-\-Tree}$<$ {\bf Vector}, Scalar $>$\-::build (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{classmeow_1_1VP__Tree_a4688e0675080bf406a086d176c5555b9}


檢查至今是否有 insert/erase 被呼叫來決定是否 {\ttfamily rebuild()} 



Definition at line 275 of file V\-P\-\_\-\-Tree.\-h.

\hypertarget{classmeow_1_1VP__Tree_ac4d1a186226b2d27abce9eb71149c62c}{\index{meow\-::\-V\-P\-\_\-\-Tree@{meow\-::\-V\-P\-\_\-\-Tree}!clear@{clear}}
\index{clear@{clear}!meow::VP_Tree@{meow\-::\-V\-P\-\_\-\-Tree}}
\subsubsection[{clear}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class Vector, class Scalar$>$ void {\bf meow\-::\-V\-P\-\_\-\-Tree}$<$ {\bf Vector}, Scalar $>$\-::clear (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{classmeow_1_1VP__Tree_ac4d1a186226b2d27abce9eb71149c62c}


清空所有資料 



Definition at line 313 of file V\-P\-\_\-\-Tree.\-h.

\hypertarget{classmeow_1_1VP__Tree_afcc9734a4e012d6dfdab408d5c698905}{\index{meow\-::\-V\-P\-\_\-\-Tree@{meow\-::\-V\-P\-\_\-\-Tree}!copy\-From@{copy\-From}}
\index{copy\-From@{copy\-From}!meow::VP_Tree@{meow\-::\-V\-P\-\_\-\-Tree}}
\subsubsection[{copy\-From}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class Vector, class Scalar$>$ {\bf V\-P\-\_\-\-Tree}\& {\bf meow\-::\-V\-P\-\_\-\-Tree}$<$ {\bf Vector}, Scalar $>$\-::copy\-From (
\begin{DoxyParamCaption}
\item[{{\bf V\-P\-\_\-\-Tree}$<$ {\bf Vector}, Scalar $>$ const \&}]{tree2}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{classmeow_1_1VP__Tree_afcc9734a4e012d6dfdab408d5c698905}


複製資料 



Definition at line 241 of file V\-P\-\_\-\-Tree.\-h.

\hypertarget{classmeow_1_1VP__Tree_aa53e215a7e6daa3edfba4201602c8894}{\index{meow\-::\-V\-P\-\_\-\-Tree@{meow\-::\-V\-P\-\_\-\-Tree}!erase@{erase}}
\index{erase@{erase}!meow::VP_Tree@{meow\-::\-V\-P\-\_\-\-Tree}}
\subsubsection[{erase}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class Vector, class Scalar$>$ bool {\bf meow\-::\-V\-P\-\_\-\-Tree}$<$ {\bf Vector}, Scalar $>$\-::erase (
\begin{DoxyParamCaption}
\item[{{\bf Vector} const \&}]{vector}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{classmeow_1_1VP__Tree_aa53e215a7e6daa3edfba4201602c8894}


將給定的\-Vector從set移除 



Definition at line 260 of file V\-P\-\_\-\-Tree.\-h.

\hypertarget{classmeow_1_1VP__Tree_aa4adfa52bd1cee8703b49a5ecf906733}{\index{meow\-::\-V\-P\-\_\-\-Tree@{meow\-::\-V\-P\-\_\-\-Tree}!force\-Build@{force\-Build}}
\index{force\-Build@{force\-Build}!meow::VP_Tree@{meow\-::\-V\-P\-\_\-\-Tree}}
\subsubsection[{force\-Build}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class Vector, class Scalar$>$ void {\bf meow\-::\-V\-P\-\_\-\-Tree}$<$ {\bf Vector}, Scalar $>$\-::force\-Build (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{classmeow_1_1VP__Tree_aa4adfa52bd1cee8703b49a5ecf906733}


重新建樹 



Definition at line 284 of file V\-P\-\_\-\-Tree.\-h.

\hypertarget{classmeow_1_1VP__Tree_a2319a3995c4b6ad415a4997764e83b3f}{\index{meow\-::\-V\-P\-\_\-\-Tree@{meow\-::\-V\-P\-\_\-\-Tree}!insert@{insert}}
\index{insert@{insert}!meow::VP_Tree@{meow\-::\-V\-P\-\_\-\-Tree}}
\subsubsection[{insert}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class Vector, class Scalar$>$ void {\bf meow\-::\-V\-P\-\_\-\-Tree}$<$ {\bf Vector}, Scalar $>$\-::insert (
\begin{DoxyParamCaption}
\item[{{\bf Vector} const \&}]{vector}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{classmeow_1_1VP__Tree_a2319a3995c4b6ad415a4997764e83b3f}


將給定的\-Vector加到set中 



Definition at line 252 of file V\-P\-\_\-\-Tree.\-h.

\hypertarget{classmeow_1_1VP__Tree_a7c73bb25b40f440b48267f94fa4561ad}{\index{meow\-::\-V\-P\-\_\-\-Tree@{meow\-::\-V\-P\-\_\-\-Tree}!operator=@{operator=}}
\index{operator=@{operator=}!meow::VP_Tree@{meow\-::\-V\-P\-\_\-\-Tree}}
\subsubsection[{operator=}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class Vector, class Scalar$>$ {\bf V\-P\-\_\-\-Tree}\& {\bf meow\-::\-V\-P\-\_\-\-Tree}$<$ {\bf Vector}, Scalar $>$\-::operator= (
\begin{DoxyParamCaption}
\item[{{\bf V\-P\-\_\-\-Tree}$<$ {\bf Vector}, Scalar $>$ const \&}]{tree2}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{classmeow_1_1VP__Tree_a7c73bb25b40f440b48267f94fa4561ad}


same as {\ttfamily copy\-From(tree2)} 



Definition at line 330 of file V\-P\-\_\-\-Tree.\-h.

\hypertarget{classmeow_1_1VP__Tree_a22db303a6318b2ef58957b22063cb591}{\index{meow\-::\-V\-P\-\_\-\-Tree@{meow\-::\-V\-P\-\_\-\-Tree}!query@{query}}
\index{query@{query}!meow::VP_Tree@{meow\-::\-V\-P\-\_\-\-Tree}}
\subsubsection[{query}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class Vector, class Scalar$>$ {\bf Vectors} {\bf meow\-::\-V\-P\-\_\-\-Tree}$<$ {\bf Vector}, Scalar $>$\-::query (
\begin{DoxyParamCaption}
\item[{{\bf Vector} const \&}]{vector, }
\item[{size\-\_\-t}]{nearest\-Number, }
\item[{bool}]{compare\-Whole\-Vector}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily [inline]}}}\label{classmeow_1_1VP__Tree_a22db303a6318b2ef58957b22063cb591}


查找 

於set中找尋距離指定向量前 {\ttfamily i} 近的向量, 並依照由近而遠的順序排序. 如果有兩個向量{\ttfamily v1},v2 距離一樣, 且 {\ttfamily cmp}{\ttfamily true} , 則直接依照 {\ttfamily v1$<$v2} 來決定誰在前面. 最後回傳一陣列包含所有解. 

Definition at line 296 of file V\-P\-\_\-\-Tree.\-h.

\hypertarget{classmeow_1_1VP__Tree_ad1bffde18bc2f0fc955e78fe77333558}{\index{meow\-::\-V\-P\-\_\-\-Tree@{meow\-::\-V\-P\-\_\-\-Tree}!reset@{reset}}
\index{reset@{reset}!meow::VP_Tree@{meow\-::\-V\-P\-\_\-\-Tree}}
\subsubsection[{reset}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class Vector, class Scalar$>$ size\-\_\-t {\bf meow\-::\-V\-P\-\_\-\-Tree}$<$ {\bf Vector}, Scalar $>$\-::reset (
\begin{DoxyParamCaption}
\item[{size\-\_\-t}]{dimension}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{classmeow_1_1VP__Tree_ad1bffde18bc2f0fc955e78fe77333558}


清空所有資料並重新給定維度 



Definition at line 323 of file V\-P\-\_\-\-Tree.\-h.



The documentation for this class was generated from the following file\-:\begin{DoxyCompactItemize}
\item 
meowpp/dsa/\hyperlink{VP__Tree_8h}{V\-P\-\_\-\-Tree.\-h}\end{DoxyCompactItemize}