containers.xml 85.5 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="stylesheet.xsl"?>

<doc>
   <title>Containers</title>

   <!-- ************************************************************************* -->

   <body>
         <br/><br/>
         <p>
         Many of these containers were inspired by the RESOLVE/C++ course sequence at Ohio State.  As such, most of 
         the objects do not support copying in any form, only swapping is allowed. That is, when objects 
         are added or removed from any of these containers they are swapped in and out, not copied. 
Davis King's avatar
Davis King committed
15
         </p>
16

Davis King's avatar
Davis King committed
17
         <p>
18
         This allows you to do things like have containers of containers of containers without encountering the 
Davis King's avatar
Davis King committed
19
20
21
         overhead of the massive copying that would likely result if you did the same thing with the STL. 
         It also means you can store objects that are not copyable inside these containers, which is not 
         something you can do with the STL.  
22
23
24
25
26
27
28
         </p>

         <p>
         To use any of these containers all you need to do is #include the file indicated in the 
         short section about the component you would like to use. Then pick which implementation you 
         would like and typedef it to something nice. Here is an example of creating a typedef for 
         a set of integers using the first kernel implementation. <br/>
29
30
31
         <tt>typedef dlib::set&lt;int&gt;::kernel_1a set_of_ints;</tt>.  Or as another example,
         if you wanted to make an expandable array of ints you might say <br/>
         <tt>typedef dlib::array&lt;int&gt;::expand_1d_c array_of_ints;</tt>. 
32
33
34
35
36
37
         </p>


         <p>
         Note that it is assumed by these containers that swap() and operator&lt; do not throw.  They
         may not function correctly if this assumption is broken.  Also note that the built in types (int, long,
Davis King's avatar
Davis King committed
38
         char, etc.) and std::string will not cause operator&lt; or swap() to throw.
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
         </p>

         <p>
            Note also that most of the containers inherit from the <a href="#enumerable">enumerable</a>
            interface.  Thus, all the member functions inherited from enumerable are defined
            in the enumerable class and their documentation is not repeated in each 
            container's documentation.  This includes the size() member function in each
            container.
         </p>

   
   </body>

   <!-- ************************************************************************* -->

   <menu width="150">
    <top>
      <section>
         <name>Objects</name>
         <item>static_set</item> 
Davis King's avatar
Davis King committed
59
         <item>any</item> 
Davis King's avatar
Davis King committed
60
         <item>any_trainer</item> 
Davis King's avatar
Davis King committed
61
         <item>any_function</item> 
Davis King's avatar
Davis King committed
62
         <item>any_decision_function</item> 
63
64
65
66
67
68
69
70
71
         <item>array</item> 
         <item>array2d</item> 
         <item>binary_search_tree</item> 
         <item>hash_map</item> 
         <item>hash_set</item> 
         <item>hash_table</item> 
         <item>directed_graph</item> 
         <item>graph</item> 
         <item>map</item> 
Davis King's avatar
Davis King committed
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
         <item>
            <name>matrix</name>
            <sub>
               <item nolink="true">
                  <name>math</name>
                  <sub>
                     <item>
                        <name>exp</name>
                        <link>dlib/matrix/matrix_math_functions_abstract.h.html#exp</link>
                     </item>
                     <item>
                        <name>log10</name>
                        <link>dlib/matrix/matrix_math_functions_abstract.h.html#log10</link>
                     </item>
                     <item>
                        <name>log</name>
                        <link>dlib/matrix/matrix_math_functions_abstract.h.html#log</link>
                     </item>
                     <item>
                        <name>sqrt</name>
                        <link>dlib/matrix/matrix_math_functions_abstract.h.html#sqrt</link>
                     </item>
                     <item>
                        <name>pow</name>
                        <link>dlib/matrix/matrix_math_functions_abstract.h.html#pow</link>
                     </item>
                     <item>
                        <name>squared</name>
                        <link>dlib/matrix/matrix_math_functions_abstract.h.html#squared</link>
                     </item>
                     <item>
                        <name>cubed</name>
                        <link>dlib/matrix/matrix_math_functions_abstract.h.html#cubed</link>
                     </item>
                     <item>
                        <name>sigmoid</name>
                        <link>dlib/matrix/matrix_math_functions_abstract.h.html#sigmoid</link>
                     </item>
                     <item>
                        <name>abs</name>
                        <link>dlib/matrix/matrix_math_functions_abstract.h.html#abs</link>
                     </item>
                     <item>
                        <name>reciprocal</name>
                        <link>dlib/matrix/matrix_math_functions_abstract.h.html#reciprocal</link>
                     </item>
Davis King's avatar
Davis King committed
118
119
120
121
                     <item>
                        <name>reciprocal_max</name>
                        <link>dlib/matrix/matrix_math_functions_abstract.h.html#reciprocal_max</link>
                     </item>
Davis King's avatar
Davis King committed
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
                     <item>
                        <name>normalize</name>
                        <link>dlib/matrix/matrix_math_functions_abstract.h.html#normalize</link>
                     </item>
                     <item>
                        <name>round</name>
                        <link>dlib/matrix/matrix_math_functions_abstract.h.html#round</link>
                     </item>
                     <item>
                        <name>ceil</name>
                        <link>dlib/matrix/matrix_math_functions_abstract.h.html#ceil</link>
                     </item>
                     <item>
                        <name>floor</name>
                        <link>dlib/matrix/matrix_math_functions_abstract.h.html#floor</link>
                     </item>
                     <item>
                        <name>round_zeros</name>
                        <link>dlib/matrix/matrix_math_functions_abstract.h.html#round_zeros</link>
                     </item>
                     <item>
                        <name>conj</name>
                        <link>dlib/matrix/matrix_math_functions_abstract.h.html#conj</link>
                     </item>
                     <item>
                        <name>norm</name>
                        <link>dlib/matrix/matrix_math_functions_abstract.h.html#norm</link>
                     </item>
                     <item>
                        <name>imag</name>
                        <link>dlib/matrix/matrix_math_functions_abstract.h.html#imag</link>
                     </item>
                     <item>
                        <name>real</name>
                        <link>dlib/matrix/matrix_math_functions_abstract.h.html#real</link>
                     </item>
                     <item>
                        <name>complex_matrix</name>
                        <link>dlib/matrix/matrix_math_functions_abstract.h.html#complex_matrix</link>
                     </item>
                     <item>
                        <name>sin</name>
                        <link>dlib/matrix/matrix_math_functions_abstract.h.html#sin</link>
                     </item>
                     <item>
                        <name>cos</name>
                        <link>dlib/matrix/matrix_math_functions_abstract.h.html#cos</link>
                     </item>
                     <item>
                        <name>tan</name>
                        <link>dlib/matrix/matrix_math_functions_abstract.h.html#tan</link>
                     </item>
                     <item>
                        <name>asin</name>
                        <link>dlib/matrix/matrix_math_functions_abstract.h.html#asin</link>
                     </item>
                     <item>
                        <name>acos</name>
                        <link>dlib/matrix/matrix_math_functions_abstract.h.html#acos</link>
                     </item>
                     <item>
                        <name>atan</name>
                        <link>dlib/matrix/matrix_math_functions_abstract.h.html#atan</link>
                     </item>
                     <item>
                        <name>sinh</name>
                        <link>dlib/matrix/matrix_math_functions_abstract.h.html#sinh</link>
                     </item>
                     <item>
                        <name>cosh</name>
                        <link>dlib/matrix/matrix_math_functions_abstract.h.html#cosh</link>
                     </item>
                     <item>
                        <name>tanh</name>
                        <link>dlib/matrix/matrix_math_functions_abstract.h.html#tanh</link>
                     </item>
                  </sub>
               </item>
               <item nolink="true">
                  <name>linear_algebra</name>
                  <sub>
                     <item>
                        <name>inv</name>
                        <link>dlib/matrix/matrix_la_abstract.h.html#inv</link>
                     </item>
                     <item>
                        <name>pinv</name>
                        <link>dlib/matrix/matrix_la_abstract.h.html#pinv</link>
                     </item>
                     <item>
                        <name>svd</name>
                        <link>dlib/matrix/matrix_la_abstract.h.html#svd</link>
                     </item>
                     <item>
                        <name>svd2</name>
                        <link>dlib/matrix/matrix_la_abstract.h.html#svd2</link>
                     </item>
                     <item>
                        <name>svd3</name>
                        <link>dlib/matrix/matrix_la_abstract.h.html#svd3</link>
                     </item>
                     <item>
                        <name>det</name>
                        <link>dlib/matrix/matrix_la_abstract.h.html#det</link>
                     </item>
Davis King's avatar
Davis King committed
227
228
229
230
                     <item>
                        <name>trace</name>
                        <link>dlib/matrix/matrix_la_abstract.h.html#trace</link>
                     </item>
Davis King's avatar
Davis King committed
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
                     <item>
                        <name>chol</name>
                        <link>dlib/matrix/matrix_la_abstract.h.html#chol</link>
                     </item>
                     <item>
                        <name>inv_lower_triangular</name>
                        <link>dlib/matrix/matrix_la_abstract.h.html#inv_lower_triangular</link>
                     </item>
                     <item>
                        <name>inv_upper_triangular</name>
                        <link>dlib/matrix/matrix_la_abstract.h.html#inv_upper_triangular</link>
                     </item>
                     <item>
                        <name>lu_decomposition</name>
                        <link>dlib/matrix/matrix_la_abstract.h.html#lu_decomposition</link>
                     </item>
                     <item>
                        <name>qr_decomposition</name>
                        <link>dlib/matrix/matrix_la_abstract.h.html#qr_decomposition</link>
                     </item>
                     <item>
                        <name>cholesky_decomposition</name>
                        <link>dlib/matrix/matrix_la_abstract.h.html#cholesky_decomposition</link>
                     </item>
                     <item>
                        <name>eigenvalue_decomposition</name>
                        <link>dlib/matrix/matrix_la_abstract.h.html#eigenvalue_decomposition</link>
                     </item>
Davis King's avatar
Davis King committed
259
260
261
262
                     <item>
                        <name>real_eigenvalues</name>
                        <link>dlib/matrix/matrix_la_abstract.h.html#real_eigenvalues</link>
                     </item>
Davis King's avatar
Davis King committed
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
299
300
301
302
303
304
                  </sub>
               </item>
               <item nolink="true">
                  <name>sub_expressions</name>
                  <sub>
                     <item>
                        <name>range</name>
                        <link>dlib/matrix/matrix_subexp_abstract.h.html#range</link>
                     </item>
                     <item>
                        <name>subm</name>
                        <link>dlib/matrix/matrix_subexp_abstract.h.html#subm</link>
                     </item>
                     <item>
                        <name>rowm</name>
                        <link>dlib/matrix/matrix_subexp_abstract.h.html#rowm</link>
                     </item>
                     <item>
                        <name>colm</name>
                        <link>dlib/matrix/matrix_subexp_abstract.h.html#colm</link>
                     </item>
                     <item>
                        <name>set_subm</name>
                        <link>dlib/matrix/matrix_subexp_abstract.h.html#set_subm</link>
                     </item>
                     <item>
                        <name>set_colm</name>
                        <link>dlib/matrix/matrix_subexp_abstract.h.html#set_colm</link>
                     </item>
                     <item>
                        <name>set_rowm</name>
                        <link>dlib/matrix/matrix_subexp_abstract.h.html#set_rowm</link>
                     </item>
                  </sub>
               </item>
               <item nolink="true">
                  <name>statistics</name>
                  <sub>
                     <item>
                        <name>sum</name>
                        <link>dlib/matrix/matrix_utilities_abstract.h.html#sum</link>
                     </item>
Davis King's avatar
Davis King committed
305
306
307
308
309
310
311
312
                     <item>
                        <name>sum_rows</name>
                        <link>dlib/matrix/matrix_utilities_abstract.h.html#sum_rows</link>
                     </item>
                     <item>
                        <name>sum_cols</name>
                        <link>dlib/matrix/matrix_utilities_abstract.h.html#sum_cols</link>
                     </item>
Davis King's avatar
Davis King committed
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
                     <item>
                        <name>prod</name>
                        <link>dlib/matrix/matrix_utilities_abstract.h.html#prod</link>
                     </item>
                     <item>
                        <name>mean</name>
                        <link>dlib/matrix/matrix_utilities_abstract.h.html#mean</link>
                     </item>
                     <item>
                        <name>max</name>
                        <link>dlib/matrix/matrix_utilities_abstract.h.html#max</link>
                     </item>
                     <item>
                        <name>min</name>
                        <link>dlib/matrix/matrix_utilities_abstract.h.html#min</link>
                     </item>
Davis King's avatar
Davis King committed
329
330
331
332
                     <item>
                        <name>find_min_and_max</name>
                        <link>dlib/matrix/matrix_utilities_abstract.h.html#find_min_and_max</link>
                     </item>
Davis King's avatar
Davis King committed
333
334
335
336
337
338
339
340
                     <item>
                        <name>index_of_min</name>
                        <link>dlib/matrix/matrix_utilities_abstract.h.html#index_of_min</link>
                     </item>
                     <item>
                        <name>index_of_max</name>
                        <link>dlib/matrix/matrix_utilities_abstract.h.html#index_of_max</link>
                     </item>
Davis King's avatar
Davis King committed
341
342
343
344
345
346
347
348
                     <item>
                        <name>variance</name>
                        <link>dlib/matrix/matrix_utilities_abstract.h.html#variance</link>
                     </item>
                     <item>
                        <name>covariance</name>
                        <link>dlib/matrix/matrix_utilities_abstract.h.html#covariance</link>
                     </item>
Davis King's avatar
Davis King committed
349
350
351
352
                     <item>
                        <name>randm</name>
                        <link>dlib/matrix/matrix_utilities_abstract.h.html#randm</link>
                     </item>
Davis King's avatar
Davis King committed
353
354
355
356
357
                  </sub>
               </item>
               <item nolink="true">
                  <name>utilities</name>
                  <sub>
Davis King's avatar
Davis King committed
358
359
360
361
362
363
364
365
366
367
368
369
                     <item>
                        <name>is_col_vector</name>
                        <link>dlib/matrix/matrix_utilities_abstract.h.html#is_col_vector</link>
                     </item>
                     <item>
                        <name>is_row_vector</name>
                        <link>dlib/matrix/matrix_utilities_abstract.h.html#is_row_vector</link>
                     </item>
                     <item>
                        <name>is_vector</name>
                        <link>dlib/matrix/matrix_utilities_abstract.h.html#is_vector</link>
                     </item>
Davis King's avatar
Davis King committed
370
371
372
373
                     <item>
                        <name>const_temp_matrix</name>
                        <link>dlib/matrix/matrix_abstract.h.html#const_temp_matrix</link>
                     </item>
Davis King's avatar
Davis King committed
374
375
376
377
378
379
380
381
                     <item>
                        <name>diag</name>
                        <link>dlib/matrix/matrix_utilities_abstract.h.html#diag</link>
                     </item>
                     <item>
                        <name>diagm</name>
                        <link>dlib/matrix/matrix_utilities_abstract.h.html#diagm</link>
                     </item>
Davis King's avatar
Davis King committed
382
383
384
385
                     <item>
                        <name>symmetric_matrix_cache</name>
                        <link>dlib/matrix/symmetric_matrix_cache_abstract.h.html</link>
                     </item>
Davis King's avatar
Davis King committed
386
387
388
389
                     <item>
                        <name>trans</name>
                        <link>dlib/matrix/matrix_utilities_abstract.h.html#trans</link>
                     </item>
Davis King's avatar
Davis King committed
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
                     <item>
                        <name>conv</name>
                        <link>dlib/matrix/matrix_conv_abstract.h.html#conv</link>
                     </item>
                     <item>
                        <name>conv_same</name>
                        <link>dlib/matrix/matrix_conv_abstract.h.html#conv_same</link>
                     </item>
                     <item>
                        <name>conv_valid</name>
                        <link>dlib/matrix/matrix_conv_abstract.h.html#conv_valid</link>
                     </item>
                     <item>
                        <name>xcorr</name>
                        <link>dlib/matrix/matrix_conv_abstract.h.html#xcorr</link>
                     </item>
                     <item>
                        <name>xcorr_same</name>
                        <link>dlib/matrix/matrix_conv_abstract.h.html#xcorr_same</link>
                     </item>
                     <item>
                        <name>xcorr_valid</name>
                        <link>dlib/matrix/matrix_conv_abstract.h.html#xcorr_valid</link>
                     </item>
                     <item>
                        <name>flip</name>
                        <link>dlib/matrix/matrix_utilities_abstract.h.html#flip</link>
                     </item>
Davis King's avatar
Davis King committed
418
419
420
421
422
423
424
425
                     <item>
                        <name>flipud</name>
                        <link>dlib/matrix/matrix_utilities_abstract.h.html#flipud</link>
                     </item>
                     <item>
                        <name>fliplr</name>
                        <link>dlib/matrix/matrix_utilities_abstract.h.html#fliplr</link>
                     </item>
Davis King's avatar
Davis King committed
426
427
428
429
                     <item>
                        <name>dot</name>
                        <link>dlib/matrix/matrix_utilities_abstract.h.html#dot</link>
                     </item>
Davis King's avatar
Davis King committed
430
431
432
433
434
435
436
437
                     <item>
                        <name>lowerm</name>
                        <link>dlib/matrix/matrix_utilities_abstract.h.html#lowerm</link>
                     </item>
                     <item>
                        <name>upperm</name>
                        <link>dlib/matrix/matrix_utilities_abstract.h.html#upperm</link>
                     </item>
Davis King's avatar
Davis King committed
438
439
440
441
                     <item>
                        <name>make_symmetric</name>
                        <link>dlib/matrix/matrix_utilities_abstract.h.html#make_symmetric</link>
                     </item>
Davis King's avatar
Davis King committed
442
443
444
445
446
447
448
449
                     <item>
                        <name>ones_matrix</name>
                        <link>dlib/matrix/matrix_utilities_abstract.h.html#ones_matrix</link>
                     </item>
                     <item>
                        <name>zeros_matrix</name>
                        <link>dlib/matrix/matrix_utilities_abstract.h.html#zeros_matrix</link>
                     </item>
Davis King's avatar
Davis King committed
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
                     <item>
                        <name>uniform_matrix</name>
                        <link>dlib/matrix/matrix_utilities_abstract.h.html#uniform_matrix</link>
                     </item>
                     <item>
                        <name>identity_matrix</name>
                        <link>dlib/matrix/matrix_utilities_abstract.h.html#identity_matrix</link>
                     </item>
                     <item>
                        <name>rotate</name>
                        <link>dlib/matrix/matrix_utilities_abstract.h.html#rotate</link>
                     </item>
                     <item>
                        <name>vector_to_matrix</name>
                        <link>dlib/matrix/matrix_utilities_abstract.h.html#vector_to_matrix</link>
                     </item>
Davis King's avatar
Davis King committed
466
467
468
469
                     <item>
                        <name>pointer_to_column_vector</name>
                        <link>dlib/matrix/matrix_utilities_abstract.h.html#pointer_to_column_vector</link>
                     </item>
Davis King's avatar
Davis King committed
470
471
472
473
                     <item>
                        <name>pointer_to_matrix</name>
                        <link>dlib/matrix/matrix_utilities_abstract.h.html#pointer_to_matrix</link>
                     </item>
Davis King's avatar
Davis King committed
474
                     <item>
Davis King's avatar
Davis King committed
475
476
                        <name>reshape_to_column_vector</name>
                        <link>dlib/matrix/matrix_utilities_abstract.h.html#reshape_to_column_vector</link>
Davis King's avatar
Davis King committed
477
                     </item>
Davis King's avatar
Davis King committed
478
479
480
481
                     <item>
                        <name>reshape</name>
                        <link>dlib/matrix/matrix_utilities_abstract.h.html#reshape</link>
                     </item>
Davis King's avatar
Davis King committed
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
                     <item>
                        <name>array_to_matrix</name>
                        <link>dlib/matrix/matrix_utilities_abstract.h.html#array_to_matrix</link>
                     </item>
                     <item>
                        <name>removerc</name>
                        <link>dlib/matrix/matrix_utilities_abstract.h.html#removerc</link>
                     </item>
                     <item>
                        <name>remove_row</name>
                        <link>dlib/matrix/matrix_utilities_abstract.h.html#remove_row</link>
                     </item>
                     <item>
                        <name>remove_col</name>
                        <link>dlib/matrix/matrix_utilities_abstract.h.html#remove_col</link>
                     </item>
                     <item>
                        <name>matrix_cast</name>
                        <link>dlib/matrix/matrix_utilities_abstract.h.html#matrix_cast</link>
                     </item>
                     <item>
                        <name>set_all_elements</name>
                        <link>dlib/matrix/matrix_utilities_abstract.h.html#set_all_elements</link>
                     </item>
Davis King's avatar
Davis King committed
506
507
508
509
                     <item>
                        <name>hash</name>
                        <link>dlib/matrix/matrix_utilities_abstract.h.html#hash</link>
                     </item>
Davis King's avatar
Davis King committed
510
511
512
513
514
515
516
517
518
519
520
521
522
                     <item>
                        <name>tmp</name>
                        <link>dlib/matrix/matrix_utilities_abstract.h.html#tmp</link>
                     </item>
                     <item>
                        <name>equal</name>
                        <link>dlib/matrix/matrix_utilities_abstract.h.html#equal</link>
                     </item>
                     <item>
                        <name>pointwise_multiply</name>
                        <link>dlib/matrix/matrix_utilities_abstract.h.html#pointwise_multiply</link>
                     </item>
                     <item>
Davis King's avatar
Davis King committed
523
524
525
526
527
528
529
530
                        <name>join_rows</name>
                        <link>dlib/matrix/matrix_utilities_abstract.h.html#join_rows</link>
                     </item>
                     <item>
                        <name>join_cols</name>
                        <link>dlib/matrix/matrix_utilities_abstract.h.html#join_cols</link>
                     </item>
                     <item>
Davis King's avatar
Davis King committed
531
532
533
534
535
536
537
                        <name>tensor_product</name>
                        <link>dlib/matrix/matrix_utilities_abstract.h.html#tensor_product</link>
                     </item>
                     <item>
                        <name>scale_columns</name>
                        <link>dlib/matrix/matrix_utilities_abstract.h.html#scale_columns</link>
                     </item>
Davis King's avatar
Davis King committed
538
539
540
541
                     <item>
                        <name>scale_rows</name>
                        <link>dlib/matrix/matrix_utilities_abstract.h.html#scale_rows</link>
                     </item>
Davis King's avatar
Davis King committed
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
                     <item>
                        <name>sort_columns</name>
                        <link>dlib/matrix/matrix_utilities_abstract.h.html#sort_columns</link>
                     </item>
                     <item>
                        <name>rsort_columns</name>
                        <link>dlib/matrix/matrix_utilities_abstract.h.html#rsort_columns</link>
                     </item>
                     <item>
                        <name>length</name>
                        <link>dlib/matrix/matrix_utilities_abstract.h.html#length</link>
                     </item>
                     <item>
                        <name>length_squared</name>
                        <link>dlib/matrix/matrix_utilities_abstract.h.html#length_squared</link>
                     </item>

                     <item>
                        <name>pixel_to_vector</name>
                        <link>dlib/matrix/matrix_utilities_abstract.h.html#pixel_to_vector</link>
                     </item>
                     <item>
                        <name>vector_to_pixel</name>
                        <link>dlib/matrix/matrix_utilities_abstract.h.html#vector_to_pixel</link>
                     </item>
                     <item>
                        <name>clamp</name>
                        <link>dlib/matrix/matrix_utilities_abstract.h.html#clamp</link>
                     </item>
Davis King's avatar
Davis King committed
571
572
573
574
575
576
577
578
579
580
581
582
                     <item>
                        <name>linspace</name>
                        <link>dlib/matrix/matrix_utilities_abstract.h.html#linspace</link>
                     </item>
                     <item>
                        <name>logspace</name>
                        <link>dlib/matrix/matrix_utilities_abstract.h.html#logspace</link>
                     </item>
                     <item>
                        <name>cartesian_product</name>
                        <link>dlib/matrix/matrix_utilities_abstract.h.html#cartesian_product</link>
                     </item>
Davis King's avatar
Davis King committed
583
584
585
586
                  </sub>
               </item>
            </sub>
         </item> 
587
588
         <item>queue</item> 
         <item>reference_counter</item> 
Davis King's avatar
Davis King committed
589
         <item>type_safe_union</item> 
Davis King's avatar
Davis King committed
590
         <item>unordered_pair</item> 
591
592
593
594
595
596
         <item>sequence</item> 
         <item>set</item> 
         <item>stack</item> 
         <item>std_vector_c</item> 
         <item>static_map</item> 
         <item>sliding_buffer</item>
Davis King's avatar
Davis King committed
597
         <item>circular_buffer</item>
598
         <item>tuple</item>
Davis King's avatar
Davis King committed
599
         <item>reference_wrapper</item>
600
601
602
603
604
         <item nolink="true">
            <name>smart pointers</name>
            <sub>
               <item>scoped_ptr</item>
               <item>shared_ptr</item>
Davis King's avatar
Davis King committed
605
               <item>shared_ptr_thread_safe</item>
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
               <item>weak_ptr</item>
            </sub>
         </item>
         
      </section>

      <section>
         <name>Interfaces</name>
         <item>map_pair</item> 
         <item>enumerable</item> 
         <item>
            <name>remover</name>
            <sub>
               <item>
                  <name>remover</name>
                  <link>dlib/interfaces/remover.h.html#remover</link>
               </item>
               <item>
                  <name>asc_remover</name>
                  <link>dlib/interfaces/remover.h.html#asc_remover</link>
               </item>
               <item>
                  <name>pair_remover</name>
                  <link>dlib/interfaces/remover.h.html#pair_remover</link>
               </item>
               <item>
                  <name>asc_pair_remover</name>
                  <link>dlib/interfaces/remover.h.html#asc_pair_remover</link>
               </item>
            </sub>   
         </item>     
      </section>     
    </top>
   </menu>

   <!-- ************************************************************************* -->
   <!-- ************************************************************************* -->
   <!-- ************************************************************************* -->

   <components>
   
      <component checked="true">
         <name>array</name>
         <file>dlib/array.h</file>
         <spec_file>dlib/array/array_kernel_abstract.h</spec_file>
         <description>
            This object is just like a C style array and the accessor functions operate 
            in constant time. 
         </description>
         
         <implementations>
            <implementation>
               <name>array_kernel_1</name>
               <file>dlib/array/array_kernel_1.h</file>
               <description> 
                  This implementation is done using an array of pointers, each of which point to 
                  small sections of the array. This implementation allows the array to use only 
                  about as much memory as it needs at any given time.
                  It does not use the <a href="other.html#memory_manager">memory_manager</a> at all. 

               </description> 

               <typedefs>
                  <typedef>
                     <name>kernel_1a</name>
                     <description>is a typedef for array_kernel_1</description>
                  </typedef>
               </typedefs>                
               
            </implementation>          

            <implementation>
               <name>array_kernel_2</name>
               <file>dlib/array/array_kernel_2.h</file>
               <description> 
                  This implementation is done using a single array of max_size() elements.  So this
                  is just a simple layer on top of a C style array.
                  It uses the <a href="other.html#memory_manager">memory_manager</a> for all 
                  memory allocations. 

               </description> 

               <typedefs>
                  <typedef>
                     <name>kernel_2a</name>
                     <description>is a typedef for array_kernel_2</description>
                  </typedef>
               </typedefs>                
               
            </implementation>          

         </implementations>
         
         <extensions>
            <extension>
               <name>array_sort</name>
               <spec_file>dlib/array/array_sort_abstract.h</spec_file>
               <description> 
                  This extension gives an array the ability to sort its contents.
               </description> 

               <implementations>
                  <implementation>
                     <name>array_sort_1</name>
                     <file>dlib/array/array_sort_1.h</file>
                     <description> 
                        This is a version of the QuickSort algorithm. It swaps the entire array into a C 
                        style array, sorts it and then swaps it back into the array object.
                     </description> 

                     <typedefs>
                        <typedef>
                           <name>sort_1a</name>
                           <description>is a typedef for array_kernel_1a extended by array_sort_1</description>
                        </typedef>
                        <typedef>
                           <name>sort_1b</name>
                           <description>is a typedef for array_kernel_2a extended by array_sort_1</description>
                        </typedef>
                     </typedefs>                
                     
                  </implementation> 
                  <implementation>
                     <name>array_sort_2</name>
                     <file>dlib/array/array_sort_2.h</file>
                     <description> 
                        This is a version of the QuickSort algorithm.
                     </description> 

                     <typedefs>
                        <typedef>
                           <name>sort_2a</name>
                           <description>is a typedef for array_kernel_1a extended by array_sort_2</description>
                        </typedef>
                        <typedef>
                           <name>sort_2b</name>
                           <description>is a typedef for array_kernel_2a extended by array_sort_2</description>
                        </typedef>
                     </typedefs>                
                     
                  </implementation>          
               </implementations>
   
               
            </extension>



            <extension>
               <name>array_expand</name>
               <spec_file>dlib/array/array_expand_abstract.h</spec_file>
               <description> 
                This extension gives an array the ability to expand its size() beyond
                its max_size() without clearing out all its elements.  It also adds a set of pop/push_back()
                functions similar to the ones in the std::vector object.
               </description> 

               <implementations>
                  <implementation>
                     <name>array_expand_1</name>
                     <file>dlib/array/array_expand_1.h</file>
                     <description> 
                        This is implemented by creating a new bigger array if max_size() isn't big enough,
                        swapping everything into that new array, and then swapping that array with *this.
                     </description> 

                     <typedefs>
                        <typedef>
                           <name>expand_1a</name>
                           <description>is a typedef for array_sort_1a extended by array_expand_1</description>
                        </typedef>
                        <typedef>
                           <name>expand_1b</name>
                           <description>is a typedef for array_sort_1b extended by array_expand_1</description>
                        </typedef>
                        <typedef>
                           <name>expand_1c</name>
                           <description>is a typedef for array_sort_2a extended by array_expand_1</description>
                        </typedef>
                        <typedef>
                           <name>expand_1d</name>
                           <description>is a typedef for array_sort_2b extended by array_expand_1</description>
                        </typedef>
                     </typedefs>                
                     
                  </implementation> 
               </implementations>
   
               
            </extension>


         </extensions>
               
      </component>
      
      
      
   <!-- ************************************************************************* -->
      
      <component checked="true">
         <name>sliding_buffer</name>
         <file>dlib/sliding_buffer.h</file>
         <spec_file>dlib/sliding_buffer/sliding_buffer_kernel_abstract.h</spec_file>
         <description>
            This object represents an array with the ability to rotate its contents
Davis King's avatar
Davis King committed
812
813
            left or right.  Note that the size of this object is always a power of two.
            If you need arbitrary sized objects then use a <a href="#circular_buffer">circular_buffer</a>.
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
         </description>
         
         <implementations>
            <implementation>
               <name>sliding_buffer_kernel_1</name>
               <file>dlib/sliding_buffer/sliding_buffer_kernel_1.h</file>
               <description> 
                  This object is implemented using a C style array in the obvious way.  See the code for details. 
               </description> 
    
               <typedefs>
                  <typedef>
                     <name>kernel_1a</name>
                     <description>is a typedef for sliding_buffer_kernel_1</description>
                  </typedef>
               </typedefs>                
               
            </implementation> 
                     
         </implementations>
                        
      </component>
            
      
   <!-- ************************************************************************* -->
      
Davis King's avatar
Davis King committed
840
841
842
843
844
845
846
847
848
849
850
851
852
853
      <component>
         <name>circular_buffer</name>
         <file>dlib/sliding_buffer.h</file>
         <spec_file>dlib/sliding_buffer/circular_buffer_abstract.h</spec_file>
         <description>
            This object represents a simple sliding buffer which can contain
            and arbitrary number of elements.
         </description>
      </component>
            
   <!-- ************************************************************************* -->
      
      
      <component>
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
         <name>array2d</name>
         <file>dlib/array2d.h</file>
         <spec_file>dlib/array2d/array2d_kernel_abstract.h</spec_file>
         <description>
                This object represents a 2-Dimensional array of objects.
         </description>

         <examples>
            <example>image_ex.cpp.html</example>
         </examples>
         
      </component>
            
   <!-- ************************************************************************* -->
      
      <component checked="true">
         <name>binary_search_tree</name>
         <file>dlib/binary_search_tree.h</file>
         <spec_file>dlib/binary_search_tree/binary_search_tree_kernel_abstract.h</spec_file>
         <description>
            This object represents a data dictionary that is built on top of some kind of binary search tree.  
         </description>
         
         <implementations>
            <implementation>
               <name>binary_search_tree_kernel_1</name>
               <file>dlib/binary_search_tree/binary_search_tree_kernel_1.h</file>
               <description> 
        This implementation is done using an AVL binary search tree.  It uses the 
        <a href="other.html#memory_manager">memory_manager</a> for all memory allocations.
     </description>  
  
               <typedefs>
                  <typedef>
                     <name>kernel_1a</name>
                     <description>is a typedef for binary_search_tree_kernel_1</description>
                  </typedef>
               </typedefs>                
               
            </implementation> 
            <implementation>
               <name>binary_search_tree_kernel_2</name>
               <file>dlib/binary_search_tree/binary_search_tree_kernel_2.h</file>
               <description> 
                  This implementation is done using a red-black binary search tree.  It uses the 
        <a href="other.html#memory_manager">memory_manager</a> for all memory allocations. 
               </description> 
               <typedefs>
                  <typedef>
                     <name>kernel_2a</name>
                     <description>is a typedef for binary_search_tree_kernel_2</description>
                  </typedef>
               </typedefs>                
               
            </implementation>          
         </implementations>
         
               
      </component>
      
      
   <!-- ************************************************************************* -->
      
      <component checked="true">
         <name>hash_map</name>
         <file>dlib/hash_map.h</file>
         <spec_file>dlib/hash_map/hash_map_kernel_abstract.h</spec_file>
         <description>
            This object represents a hashed mapping of items of type domain onto items of type range. 
         </description>
         
         <implementations>
            <implementation>
               <name>hash_map_kernel_1</name>
               <file>dlib/hash_map/hash_map_kernel_1.h</file>
               <description> 
                  This implementation is done using a <a href="#hash_table">hash_table</a> object. It uses the 
        <a href="other.html#memory_manager">memory_manager</a> for all memory allocations.

               </description> 
   
 
               <typedefs>
                  <typedef>
                     <name>kernel_1a</name>
                     <description>is a typedef for hash_map_kernel_1 that uses hash_table_kernel_1a</description>
                  </typedef>
                  <typedef>
                     <name>kernel_1b</name>
                     <description>is a typedef for hash_map_kernel_1 that uses hash_table_kernel_2a</description>
                  </typedef>
                  <typedef>
                     <name>kernel_1c</name>
                     <description>is a typedef for hash_map_kernel_1 that uses hash_table_kernel_2b</description>
                  </typedef>
               </typedefs>                
               
            </implementation> 
         
                        
         </implementations>
         
               
      </component>
      
      
   <!-- ************************************************************************* -->
      
      <component checked="true">
         <name>hash_set</name>
         <file>dlib/hash_set.h</file>
         <spec_file>dlib/hash_set/hash_set_kernel_abstract.h</spec_file>
         <description>
            This object represents a hashed unordered and unaddressed collection of unique items. 
         </description>
         
         <implementations>
            <implementation>
               <name>hash_set_kernel_1</name>
               <file>dlib/hash_set/hash_set_kernel_1.h</file>
               <description> 
                  This implementation is done using a <a href="#hash_table">hash_table</a> object. It uses the 
        <a href="other.html#memory_manager">memory_manager</a> for all memory allocations.

               </description> 
   
 
               <typedefs>
                  <typedef>
                     <name>kernel_1a</name>
                     <description>is a typedef for hash_set_kernel_1 that uses hash_table_kernel_1a</description>
                  </typedef>
                  <typedef>
                     <name>kernel_1b</name>
                     <description>is a typedef for hash_set_kernel_1 that uses hash_table_kernel_2a</description>
                  </typedef>
                  <typedef>
                     <name>kernel_1c</name>
                     <description>is a typedef for hash_set_kernel_1 that uses hash_table_kernel_2b</description>
                  </typedef>
               </typedefs>                
               
            </implementation> 
         
                        
         </implementations>
         
               
      </component>
      
      
   <!-- ************************************************************************* -->
      
      <component checked="true">
         <name>hash_table</name>
         <file>dlib/hash_table.h</file>
         <spec_file>dlib/hash_table/hash_table_kernel_abstract.h</spec_file>
         <description>
            This object represents a data dictionary that is built on top of some kind of 
            hash table. 
         </description>
         
         <implementations>
            <implementation>
               <name>hash_table_kernel_1</name>
               <file>dlib/hash_table/hash_table_kernel_1.h</file>
               <description> 
                  This implementation is done using singly linked lists as hashing buckets.  It uses the 
        <a href="other.html#memory_manager">memory_manager</a> for all memory allocations. 
               </description> 
   
  
               <typedefs>
                  <typedef>
                     <name>kernel_1a</name>
                     <description>is a typedef for hash_table_kernel_1. </description>
                  </typedef>
               </typedefs>                
               
            </implementation> 
         
            <implementation>
               <name>hash_table_kernel_2</name>
               <file>dlib/hash_table/hash_table_kernel_2.h</file>
               <description> 
                  This implementation is done using <a href="#binary_search_tree">
                  binary_search_tree</a> objects as hashing buckets.  It uses the 
        <a href="other.html#memory_manager">memory_manager</a> for all memory allocations. 

               </description> 
    
  
               <typedefs>
                  <typedef>
                     <name>kernel_2a</name>
                     <description>is a typedef for hash_table_kernel_2 that uses binary_search_tree_kernel_1</description>
                  </typedef>
                  <typedef>
                     <name>kernel_2b</name>
                     <description>is a typedef for hash_table_kernel_2 that uses binary_search_tree_kernel_2</description>
                  </typedef>
               </typedefs>                
               
            </implementation> 
         
                        
         </implementations>
         
               
      </component>
      
      
      
   <!-- ************************************************************************* -->
      
      <component checked="true">
         <name>map</name>
         <file>dlib/map.h</file>
         <spec_file>dlib/map/map_kernel_abstract.h</spec_file>
         <description>
            This object represents a mapping of items of type domain onto items of type range.
         </description>
         
         <implementations>
            <implementation>
               <name>map_kernel_1</name>
               <file>dlib/map/map_kernel_1.h</file>
               <description> 
                  This is implemented using the <a href="#binary_search_tree">binary_search_tree</a> component. It uses the 
        <a href="other.html#memory_manager">memory_manager</a> for all memory allocations.

               </description> 
   
      
               <typedefs>
                  <typedef>
                     <name>kernel_1a</name>
                     <description>is a typedef for map_kernel_1 that uses binary_search_tree_kernel_1</description>
                  </typedef>
                  <typedef>
                     <name>kernel_1b</name>
                     <description>is a typedef for map_kernel_1 that uses binary_search_tree_kernel_2</description>
                  </typedef>
               </typedefs>                
               
            </implementation> 
         
         
                        
         </implementations>
         
               
      </component>
      
      
   <!-- ************************************************************************* -->
      
      <component>
         <name>enumerable</name>
         <file>dlib/interfaces/enumerable.h</file>
         <spec_file>dlib/interfaces/enumerable.h</spec_file>
         <description>
            This object is an abstract class which represents an interface for iterating over 
            all the elements of a container. 
         </description>
         
               
      </component>
      
      
   <!-- ************************************************************************* -->
      
      <component>
         <name>map_pair</name>
         <file>dlib/interfaces/map_pair.h</file>
         <spec_file>dlib/interfaces/map_pair.h</spec_file>
         <description>
            This object is an abstract class which represents an interface for accessing a 
Davis King's avatar
Davis King committed
1132
            pair from a container such as the map, hash_table, etc. 
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
         </description>
         
               
      </component>
      
      
   <!-- ************************************************************************* -->
      
      <component>
         <name>remover</name>
         <file>dlib/interfaces/remover.h</file>
         <spec_file>dlib/interfaces/remover.h</spec_file>
         <description>
            This is a set of interfaces which gives the ability to remove all the items in a 
            container without actually knowing what kind of container contains them. 
         </description>
         
               
      </component>
      
      
   <!-- ************************************************************************* -->

      <component>
         <name>weak_ptr</name>
         <file>dlib/smart_pointers.h</file>
         <spec_file>dlib/smart_pointers/weak_ptr_abstract.h</spec_file>
         <description>
            <p>
                The weak_ptr class template stores a weak reference to an object that is 
                already managed by a shared_ptr. To access the object, a weak_ptr can 
                be converted to a shared_ptr using the member function lock().  
            </p>

            <p>
                This is an implementation of the std::tr1::weak_ptr template from the 
                document ISO/IEC PDTR 19768, Proposed Draft Technical Report on C++
                Library Extensions.  The only deviation from that document is that this 
                shared_ptr is declared inside the dlib namespace rather than std::tr1.
            </p>
         </description>
               
      </component>
      
   <!-- ************************************************************************* -->

Davis King's avatar
Davis King committed
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
      <component>
         <name>type_safe_union</name>
         <file>dlib/type_safe_union.h</file>
         <spec_file link="true">dlib/type_safe_union/type_safe_union_kernel_abstract.h</spec_file>
         <description>
                This object is a type safe analogue of the classic C union object. 
                The type_safe_union, unlike a union, can contain non-POD types such 
                as std::string.    
                <p>It is also implemented without performing any
                   heap memory allocations and instead it stores everything on the stack.</p>
         </description>
         
         <examples>
            <example>pipe_ex_2.cpp.html</example>
Davis King's avatar
Davis King committed
1193
            <example>bridge_ex.cpp.html</example>
Davis King's avatar
Davis King committed
1194
1195
1196
1197
         </examples>
         
      </component>
      
Davis King's avatar
Davis King committed
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
   <!-- ************************************************************************* -->
      
      <component>
         <name>unordered_pair</name>
         <file>dlib/unordered_pair.h</file>
         <spec_file link="true">dlib/unordered_pair.h</spec_file>
         <description>
                This object is very similar to the std::pair struct except unordered_pair 
                is only capable of representing an unordered set of two items rather than 
                an ordered list of two items like std::pair.  
         </description>
         
      </component>
      
Davis King's avatar
Davis King committed
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
   <!-- ************************************************************************* -->
      
      <component>
         <name>any</name>
         <file>dlib/any.h</file>
         <spec_file link="true">dlib/any/any_abstract.h</spec_file>
         <description>
                This object is basically a type-safe version of a void*.  In particular,
                it is a container which can contain only one object but the object may
                be of any type.  

               <p>
                It is somewhat like the <a href="#type_safe_union">type_safe_union</a> except you don't have to declare 
                the set of possible content types beforehand.  So in some sense this is 
                like a less type-strict version of the type_safe_union.
               </p>
         </description>
      </component>
      
Davis King's avatar
Davis King committed
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
   <!-- ************************************************************************* -->
      
      <component>
         <name>any_decision_function</name>
         <file>dlib/any.h</file>
         <spec_file link="true">dlib/any/any_decision_function_abstract.h</spec_file>
         <description>
               This object is a version of dlib::<a href="#any">any</a> that is restricted to containing 
                elements which are some kind of function object with an operator() with 
                the following signature: 
Davis King's avatar
Davis King committed
1241
                <tt>result_type operator()(const sample_type&amp;) const</tt>
Davis King's avatar
Davis King committed
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251

               <p>
                  It is intended to be used to contain dlib::<a href="ml.html#decision_function">decision_function</a> 
                  objects and other types which represent learned decision functions.  It allows you
                to write code which contains and processes these decision functions
                without needing to know the specific types of decision functions used.
               </p>
         </description>
      </component>
      
Davis King's avatar
Davis King committed
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
   <!-- ************************************************************************* -->
      
      <component>
         <name>any_function</name>
         <file>dlib/any.h</file>
         <spec_file link="true">dlib/any/any_function_abstract.h</spec_file>
         <description>
                This object is a version of dlib::<a href="#any">any</a> that is restricted to containing 
                elements which are some kind of function or function object.    
         </description>
      </component>
      
Davis King's avatar
Davis King committed
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
   <!-- ************************************************************************* -->
      
      <component>
         <name>any_trainer</name>
         <file>dlib/any.h</file>
         <spec_file link="true">dlib/any/any_trainer_abstract.h</spec_file>
         <description>
                This object is a version of dlib::<a href="#any">any</a> that is restricted to containing 
                elements which are some kind of object with a .train() method compatible 
                with the following signature: 
<pre> decision_function train(
      const std::vector&lt;sample_type&gt;&amp; samples,
      const std::vector&lt;scalar_type&gt;&amp; labels
   ) const
</pre>
Davis King's avatar
Davis King committed
1279
                  Where <tt>decision_function</tt> is a type capable of being stored in an
Davis King's avatar
Davis King committed
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
                    <a href="#any_decision_function">any_decision_function</a> object.

               <p>
                  any_trainer is intended to be used to contain objects such as the <a href="ml.html#svm_nu_trainer">svm_nu_trainer</a>
                and other similar types which represent supervised machine learning algorithms.   
                It allows you to write code which contains and processes these trainer objects 
                without needing to know the specific types of trainer objects used.
               </p>
         </description>
      </component>
      
Davis King's avatar
Davis King committed
1291
1292
1293
   <!-- ************************************************************************* -->
      

Davis King's avatar
Davis King committed
1294
1295
      <component>
         <name>shared_ptr_thread_safe</name>
Davis King's avatar
Davis King committed
1296
         <file>dlib/smart_pointers_thread_safe.h</file>
Davis King's avatar
Davis King committed
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
         <spec_file>dlib/smart_pointers/shared_ptr_thread_safe_abstract.h</spec_file>
         <description>
            <p>
                This object represents a reference counted smart pointer just like 
                <a href="#shared_ptr">shared_ptr</a> except that it is threadsafe.
            </p>
         </description>
               
      </component>
      
   <!-- ************************************************************************* -->
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
      <component>
         <name>shared_ptr</name>
         <file>dlib/smart_pointers.h</file>
         <spec_file>dlib/smart_pointers/shared_ptr_abstract.h</spec_file>
         <description>
            <p>
                This object represents a reference counted smart pointer.  Each shared_ptr
                contains a pointer to some object and when the last shared_ptr that points
                to the object is destructed or reset() then the object is guaranteed to be 
                deleted.
            </p>

            <p>
                This is an implementation of the std::tr1::shared_ptr template from the 
                document ISO/IEC PDTR 19768, Proposed Draft Technical Report on C++
                Library Extensions.  The only deviation from that document is that this 
                shared_ptr is declared inside the dlib namespace rather than std::tr1.
            </p>
         </description>
               
      </component>
      
   <!-- ************************************************************************* -->

      <component>
         <name>tuple</name>
         <file>dlib/tuple.h</file>
         <spec_file>dlib/tuple/tuple_abstract.h</spec_file>
         <description>
                This is an implementation of a very simple templated container object.
                It contains between 0 and 31 objects where each object is listed
Davis King's avatar
Davis King committed
1339
                explicitly in the tuple's template arguments.   
1340
1341
1342

            <p>
               Note that there is only one implementation of this object so there aren't any
Davis King's avatar
Davis King committed
1343
               different kernels to choose from when you create instances of the tuple object.  
1344
1345
1346
1347
1348
1349
1350
1351
               So for example, you
               could declare a tuple of 3 ints using the following statement: 
               <tt>dlib::tuple&lt;int,int,int&gt; t;</tt>  
            </p>
         </description>
               
      </component>
      
Davis King's avatar
Davis King committed
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
   <!-- ************************************************************************* -->

      <component>
         <name>reference_wrapper</name>
         <file>dlib/ref.h</file>
         <spec_file>dlib/ref.h</spec_file>
         <description>
                This is a simple object that just holds a reference to another object. 
                It is useful because it can serve as a kind of "copyable reference".  
         </description>
         <examples>
            <example>thread_function_ex.cpp.html</example>
         </examples>
               
      </component>
      
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
   <!-- ************************************************************************* -->

      <component>
         <name>scoped_ptr</name>
         <file>dlib/smart_pointers.h</file>
         <spec_file>dlib/smart_pointers/scoped_ptr_abstract.h</spec_file>
         <description>
                This is a implementation of the scoped_ptr class found in the Boost C++ 
                library.  It is a simple smart pointer class which guarantees that the 
                pointer contained within it will always be deleted.  
                
                The class does not permit copying and so does not do any kind of 
                reference counting.  Thus it is very simple and quite fast.
         </description>
               
      </component>
      
   <!-- ************************************************************************* -->
      
      <component checked="true">
         <name>graph</name>
         <file>dlib/graph.h</file>
         <spec_file>dlib/graph/graph_kernel_abstract.h</spec_file>
         <description>
                This object represents a graph which is a set of nodes with undirected
                edges connecting various nodes.  
         </description>
         
         <implementations>
            <implementation>
               <name>graph_kernel_1</name>
               <file>dlib/graph/graph_kernel_1.h</file>
               <description> 
                  This is implemented using std::vector to contain all the nodes and edges.   
               </description> 

               <typedefs>
                  <typedef>
                     <name>kernel_1a</name>
                     <description>is a typedef for graph_kernel_1</description>
                  </typedef>
               </typedefs>                
               
            </implementation> 
         </implementations>
         
      </component>
      
      
   <!-- ************************************************************************* -->
      <component checked="true">
         <name>directed_graph</name>
         <file>dlib/directed_graph.h</file>
         <spec_file>dlib/directed_graph/directed_graph_kernel_abstract.h</spec_file>
         <description>
                This object represents a directed graph which is a set of nodes with directed
                edges connecting various nodes.  
         </description>
         
         <implementations>
            <implementation>
               <name>directed_graph_kernel_1</name>
               <file>dlib/directed_graph/directed_graph_kernel_1.h</file>
               <description> 
                  This is implemented using std::vector to contain all the nodes and edges.   
               </description> 

               <typedefs>
                  <typedef>
                     <name>kernel_1a</name>
                     <description>is a typedef for directed_graph_kernel_1</description>
                  </typedef>
               </typedefs>                
               
            </implementation> 
         </implementations>
         
      </component>
      
      
   <!-- ************************************************************************* -->
      
      <component checked="true">
         <name>queue</name>
         <file>dlib/queue.h</file>
         <spec_file>dlib/queue/queue_kernel_abstract.h</spec_file>
         <description>
            This object represents a first in first out queue. 
         </description>
         
         <examples>
            <example>queue_ex.cpp.html</example>
         </examples>

         <implementations>
            <implementation>
               <name>queue_kernel_1</name>
               <file>dlib/queue/queue_kernel_1.h</file>
               <description> 
                  This is implemented in the obvious way using a singly linked list.  It does not use the 
        <a href="other.html#memory_manager">memory_manager</a> at all. 
               </description> 

               <typedefs>
                  <typedef>
                     <name>kernel_1a</name>
                     <description>is a typedef for queue_kernel_1</description>
                  </typedef>
               </typedefs>                
               
            </implementation> 
            <implementation>
               <name>queue_kernel_2</name>
               <file>dlib/queue/queue_kernel_2.h</file>
               <description> 
               This is implemented using a singly linked list and each node in the list
               contains block_size (a template parameter) elements.  It uses the 
        <a href="other.html#memory_manager">memory_manager</a> for all memory allocations. 
               </description> 
    
               <typedefs>
                  <typedef>
                     <name>kernel_2a</name>
                     <description>is a typedef for queue_kernel_2 with a block_size of 20</description>
                  </typedef>
                  <typedef>
                     <name>kernel_2b</name>
                     <description>is a typedef for queue_kernel_2 with a block_size of 100</description>
                  </typedef>
               </typedefs>                
               
            </implementation>          
         </implementations>
         
         <extensions>
            <extension>
               <name>queue_sort</name>
               <spec_file>dlib/queue/queue_sort_abstract.h</spec_file>
               <description> 
                  This extension gives a queue the ability to sort its contents.
               </description> 

               <implementations>
                  <implementation>
                     <name>queue_sort_1</name>
                     <file>dlib/queue/queue_sort_1.h</file>
                     <description> 
                        This is a version of the QuickSort algorithm.
                     </description> 
    
                     <typedefs>
                        <typedef>
                           <name>sort_1a</name>
                           <description>is a typedef for queue_kernel_1a extended by queue_sort_1</description>
                        </typedef>
                        <typedef>
                           <name>sort_1b</name>
                           <description>is a typedef for queue_kernel_2a extended by queue_sort_1</description>
                        </typedef>
                        <typedef>
                           <name>sort_1c</name>
                           <description>is a typedef for queue_kernel_2b extended by queue_sort_1</description>
                        </typedef>
                     </typedefs>                
                     
                  </implementation> 
                           
               </implementations>
   
               
            </extension>
         </extensions>
               
      </component>
      
      
      
   <!-- ************************************************************************* -->
      
      <component>
         <name>reference_counter</name>
         <file>dlib/reference_counter.h</file>
         <spec_file>dlib/reference_counter/reference_counter_kernel_abstract.h</spec_file>
         <description>
            This object represents a container for an object and provides reference counting
            capabilities for the object it contains. 
         </description>
         
         <implementations>
            <implementation>
               <name>reference_counter_kernel_1</name>
               <file>dlib/reference_counter/reference_counter_kernel_1.h</file>
               <description> 
                  This implementation is done using pointers in the obvious way.
               </description> 

               <typedefs>
                  <typedef>
                     <name>kernel_1a</name>
                     <description>is a typedef for reference_counter_kernel_1</description>
                  </typedef>
               </typedefs>                
               
            </implementation> 
                        
         </implementations>
         
               
      </component>
      
      
   <!-- ************************************************************************* -->
      
      <component checked="true">
         <name>sequence</name>
         <file>dlib/sequence.h</file>
         <spec_file>dlib/sequence/sequence_kernel_abstract.h</spec_file>
         <description>
            This object represents an ordered sequence of items, each item is 
            associated with an integer value. The items are numbered from 0 to the number of items in the 
            sequence minus 1. 
         </description>
         
         <implementations>
            <implementation>
               <name>sequence_kernel_1</name>
               <file>dlib/sequence/sequence_kernel_1.h</file>
               <description> 
                  This is implemented as an AVL binary search tree.  
                  Accessing(or adding or removing) an element always takes O(log n) time.  
 It uses the <a href="other.html#memory_manager">memory_manager</a> for all memory allocations. 
               </description> 

               <typedefs>
                  <typedef>
                     <name>kernel_1a</name>
                     <description>is a typedef for sequence_kernel_1</description>
                  </typedef>
               </typedefs>                
               
            </implementation> 
            <implementation>
               <name>sequence_kernel_2</name>
               <file>dlib/sequence/sequence_kernel_2.h</file>
               <description> 
                  This implementation is done using a doubly linked list in the shape of a ring.  
                  It will remember the last element accessed(or added or removed) and give O(1) 
                  access time to the elements just left and right of it.  Aside from that, 
                  accessing(or adding or removing) a random element will take O(n) and in the worst 
                  case it will take time proportional to the size of the sequence/2.  
      <p>
                     It does not use the 
                     <a href="other.html#memory_manager">memory_manager</a> at all. 
      </p>

               </description> 

               <typedefs>
                  <typedef>
                     <name>kernel_2a</name>
                     <description>is a typedef for sequence_kernel_2</description>
                  </typedef>
               </typedefs>                
               
            </implementation>          
         </implementations>
         
         <extensions>
      
            <extension>
               <name>sequence_sort</name>
               <spec_file>dlib/sequence/sequence_sort_abstract.h</spec_file>
               <description> 
                  This extension gives a sequence the ability to sort its contents.
               </description> 

               <implementations>
                  <implementation>
                     <name>sequence_sort_1</name>
                     <file>dlib/sequence/sequence_sort_1.h</file>
                     <description> 
                        This is a version of the QuickSort algorithm and it sorts sequences of less 
                        than 30 elements with a selection sort.  This implementation is fastest when 
                        used with sequence_kernel_2 and fairly slow when used with sequence_kernel_1                       
                     </description> 

                     <typedefs>
                        <typedef>
                           <name>sort_1a</name>
                           <description>is a typedef for sequence_kernel_2a extended by sequence_sort_1</description>
                        </typedef>
                     </typedefs>                
                     
                  </implementation> 
                  <implementation>
                     <name>sequence_sort_2</name>
                     <file>dlib/sequence/sequence_sort_2.h</file>
                     <description> 
                        This is a version of the QuickSort algorithm.  This implementation of sort is 
                        the best to use with sequence_kernel_1 objects but gives extremely poor performance 
                        with sequence_kernel_2 objects.
                     </description> 

                     <typedefs>
                        <typedef>
                           <name>sort_2a</name>
                           <description>is a typedef for sequence_kernel_1a extended by sequence_sort_2</description>
                        </typedef>
                     </typedefs>                
                     
                  </implementation>          
               </implementations>
   
               
            </extension>
            <extension>
               <name>sequence_compare</name>
               <spec_file>dlib/sequence/sequence_compare_abstract.h</spec_file>
               <description> 
                  This extension gives sequences the ability to compare themselves using 
                  operator&lt; and operator==.  Thus they can be used in the other container classes 
Davis King's avatar
Davis King committed
1689
                  that require this ability. (maps, sets, etc.)
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
               </description> 

               <implementations>
                  <implementation>
                     <name>sequence_compare_1</name>
                     <file>dlib/sequence/sequence_compare_1.h</file>
                     <description> 
                        The implementation is obvious.  Click on the sequence_compare_1 link if you want to see.                       
                     </description> 

                     <typedefs>
                        <typedef>
                           <name>compare_1a</name>
                           <description>is a typedef for sequence_kernel_1a extended by sequence_compare_1</description>
                        </typedef>
                        <typedef>
                           <name>compare_1b</name>
                           <description>is a typedef for sequence_kernel_2a extended by sequence_compare_1</description>
                        </typedef>
                     </typedefs>                
                     
                  </implementation> 
                           
               </implementations>
   
               
            </extension>
         </extensions>
               
      </component>
      
      
      
   <!-- ************************************************************************* -->
      
      <component checked="true">
         <name>set</name>
         <file>dlib/set.h</file>
         <spec_file>dlib/set/set_kernel_abstract.h</spec_file>
         <description>
            This object represents an unordered and unaddressed collection of unique items. 
         </description>
         
         <implementations>
            <implementation>
               <name>set_kernel_1</name>
               <file>dlib/set/set_kernel_1.h</file>
               <description> 
                  This is implemented using the <a href="#binary_search_tree">binary_search_tree</a> component.   It uses the 
        <a href="other.html#memory_manager">memory_manager</a> for all memory allocations.

               </description> 
    
               <typedefs>
                  <typedef>
                     <name>kernel_1a</name>
                     <description>is a typedef for set_kernel_1 that uses binary_search_tree_kernel_1</description>
                  </typedef>
                  <typedef>
                     <name>kernel_1b</name>
                     <description>is a typedef for set_kernel_1 that uses binary_search_tree_kernel_2</description>
                  </typedef>
               </typedefs>                
               
            </implementation> 
                     
         </implementations>
         
         <extensions>
      
            <extension>
               <name>set_compare</name>
               <spec_file>dlib/set/set_compare_abstract.h</spec_file>
               <description> 
                  This extension gives sets the ability to compare themselves using operator&lt; and 
                  operator==.  Thus they can be used in the other container classes that require 
Davis King's avatar
Davis King committed
1766
                  this ability. (maps, sets, etc.)
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
               </description> 

               <implementations>
                  <implementation>
                     <name>set_compare_1</name>
                     <file>dlib/set/set_compare_1.h</file>
                     <description> 
                        The implementation is obvious.  Click on the set_compare_1 link if you want to see.                      
                     </description> 

                     <typedefs>
                        <typedef>
                           <name>compare_1a</name>
                           <description>is a typedef for set_kernel_1a extended by set_compare_1</description>
                        </typedef>
                        <typedef>
                           <name>compare_1b</name>
                           <description>is a typedef for set_kernel_1b extended by set_compare_1</description>
                        </typedef>
                     </typedefs>                
                     
                  </implementation> 
                           
               </implementations>
   
               
            </extension>
         </extensions>
               
      </component>
      
      
   <!-- ************************************************************************* -->
      
      <component checked="true">
         <name>stack</name>
         <file>dlib/stack.h</file>
         <spec_file>dlib/stack/stack_kernel_abstract.h</spec_file>
         <description>
            This object represents a last in first out stack. 
         </description>
         
         <implementations>
            <implementation>
               <name>stack_kernel_1</name>
               <file>dlib/stack/stack_kernel_1.h</file>
               <description> 
                  This implementation is done in the obvious way using a singly linked list.  It uses the 
        <a href="other.html#memory_manager">memory_manager</a> for all memory allocations. 

               </description> 
    
               <typedefs>
                  <typedef>
                     <name>kernel_1a</name>
                     <description>is a typedef for stack_kernel_1</description>
                  </typedef>
               </typedefs>                
               
            </implementation> 
                     
         </implementations>
                        
      </component>
      
      
   <!-- ************************************************************************* -->
      
      <component checked="true">
         <name>static_map</name>
         <file>dlib/static_map.h</file>
         <spec_file>dlib/static_map/static_map_kernel_abstract.h</spec_file>
         <description>
            This object represents a mapping of items of type domain onto items of type range. 
            The difference between this object and the normal <a href="#map">map</a> object is that it does not support adding
            or removing individual objects from itself.  This allows implementations to focus on using less memory and 
            achieving faster searching. 
         </description>
         
         <implementations>
            <implementation>
               <name>static_map_kernel_1</name>
               <file>dlib/static_map/static_map_kernel_1.h</file>
               <description> 
                  This implementation is just a sorted array which can be searched using a binary search.  
               </description> 
    
               <typedefs>
                  <typedef>
                     <name>kernel_1a</name>
                     <description>is a typedef for static_map_kernel_1</description>
                  </typedef>
               </typedefs>                
               
            </implementation> 
                     
         </implementations>
                        
      </component>
      
      
   <!-- ************************************************************************* -->
      
      <component checked="true">
         <name>static_set</name>
         <file>dlib/static_set.h</file>
         <spec_file>dlib/static_set/static_set_kernel_abstract.h</spec_file>
         <description>
            This object represents an unordered and unaddressed collection of items. 
            The difference between this object and the normal <a href="#set">set</a> object is that it does not support adding
            or removing individual objects from itself.  This allows implementations to focus on using less memory and 
            achieving faster searching. 
         </description>
         
         <implementations>
            <implementation>
               <name>static_set_kernel_1</name>
               <file>dlib/static_set/static_set_kernel_1.h</file>
               <description> 
                  This implementation is just a sorted array which can be searched using a binary search.  
               </description> 
    
               <typedefs>
                  <typedef>
                     <name>kernel_1a</name>
                     <description>is a typedef for static_set_kernel_1</description>
                  </typedef>
               </typedefs>                
               
            </implementation> 
                     
         </implementations>
         
         <extensions>
      
            <extension>
               <name>static_set_compare</name>
               <spec_file>dlib/static_set/static_set_compare_abstract.h</spec_file>
               <description> 
                  This extension gives static_sets the ability to compare themselves using operator&lt; and 
                  operator==.  Thus they can be used in the other container classes that require 
Davis King's avatar
Davis King committed
1908
                  this ability. (maps, static_sets, etc.)
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
               </description> 

               <implementations>
                  <implementation>
                     <name>static_set_compare_1</name>
                     <file>dlib/static_set/static_set_compare_1.h</file>
                     <description> 
                        The implementation is obvious.  Click on the static_set_compare_1 link if you want to see.                        
                     </description> 

                     <typedefs>
                        <typedef>
                           <name>compare_1a</name>
                           <description>is a typedef for static_set_kernel_1a extended by static_set_compare_1</description>
                        </typedef>
                     </typedefs>                
                     
                  </implementation> 
                           
               </implementations>
   
               
            </extension>
         </extensions>
               
      </component>
      
   <!-- ************************************************************************* -->
      
      <component>
         <name>matrix</name>
         <file>dlib/matrix.h</file>
         <spec_file link="true">dlib/matrix/matrix_abstract.h</spec_file>
         <description>
Davis King's avatar
Davis King committed
1943
1944
           This is a 2D matrix object that enables you to write code that deals with
           matrices using a simple syntax similar to what can be written in MATLAB.  It is implemented using 
Davis King's avatar
Davis King committed
1945
           the <a href="matrix_expressions_ex.cpp.html">expression templates</a> technique which allows it to eliminate the 
Davis King's avatar
Davis King committed
1946
1947
1948
1949
1950
           temporary matrix objects that would normally be returned from expressions 
           such as M = A+B+C+D;  Normally each invocation of the + operator would 
           construct and return a temporary matrix object but using this technique 
           we can avoid creating all these temporary objects and receive a large speed boost.
           <p>
Davis King's avatar
Davis King committed
1951
1952
           This object is also capable of using BLAS and LAPACK libraries such as ATLAS or the Intel
           MKL when available.   To enable BLAS support all you have to do is #define 
Davis King's avatar
Davis King committed
1953
           DLIB_USE_BLAS and then make sure you link your application with your 
Davis King's avatar
Davis King committed
1954
1955
1956
1957
           BLAS library.  Similarly, to enable LAPACK support just #define DLIB_USE_LAPACK and 
           link to your LAPACK library.  Finally, the use of BLAS and LAPACK is transparent to 
           the user, that is, the dlib matrix object uses BLAS and LAPACK internally to optimize 
           various operations while still allowing the user to use a simple MATLAB like syntax.  
Davis King's avatar
Davis King committed
1958
1959
1960
1961
1962
1963
1964
1965
           </p>
           <p>
           Note that the cmake files that come with dlib know how to link a project with ATLAS or
           the Intel MKL if you are building on a linux system.  The cmake files may also 
           work in a few other cases as well but I haven't tested any others.   But in any
           case, by no means are you required to use the dlib cmake files. 
           </p>
           <p>
Davis King's avatar
Davis King committed
1966
              It is also worth noting that all the preconditions of every function 
Davis King's avatar
Davis King committed
1967
1968
1969
1970
              related to the matrix object are checked by <a href="metaprogramming.html#DLIB_ASSERT">DLIB_ASSERT</a>
              statements and thus can be enabled by #defining ENABLE_ASSERTS or DEBUG.  Doing
              this will cause your program to run slower but should catch any usage errors. 
           </p>
Davis King's avatar
Davis King committed
1971
1972
1973
1974
           <p>
              Finally, you don't need to #include anything to get the matrix extensions listed below.  
              They are included by the <a href="dlib/matrix.h.html">dlib/matrix.h</a> file for you.
            </p>
1975
1976
1977
1978
         </description>
         
         <examples>
            <example>matrix_ex.cpp.html</example>
Davis King's avatar
Davis King committed
1979
            <example>matrix_expressions_ex.cpp.html</example>
1980
1981
1982
1983
1984
1985
         </examples>

         <extensions>
            <extension>
               <name>matrix_utilities</name>
               <spec_file>dlib/matrix/matrix_utilities_abstract.h</spec_file>
Davis King's avatar
Davis King committed
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
               <description>
                  This extension contains miscellaneous utility functions
                  for manipulating matrix objects.  
               </description>
            </extension>

            <extension>
               <name>matrix_la</name>
               <spec_file>dlib/matrix/matrix_la_abstract.h</spec_file>
               <description>
                  This extension contains linear algebra functions to calculate 
                  QR, LU, Cholesky, eigenvalue, and singular value decompositions.  It also
                  contains a few other miscellaneous functions that solve systems of 
                  equations or calculate values derived from the above decompositions.
2000
2001
               </description>
            </extension>
Davis King's avatar
Davis King committed
2002

2003
2004
2005
2006
            <extension>
               <name>matrix_math_functions</name>
               <spec_file>dlib/matrix/matrix_math_functions_abstract.h</spec_file>
               <description>This extension contains mathematical functions that operate on each
Davis King's avatar
Davis King committed
2007
                  element of a matrix independently.  
Davis King's avatar
Davis King committed
2008
2009
2010
2011
2012
2013
2014
2015
               </description>
            </extension>

            <extension>
               <name>matrix_sub_expressions</name>
               <spec_file>dlib/matrix/matrix_subexp_abstract.h</spec_file>
               <description>
                  This extension contains a number of functions for dealing with sub-matrices.  
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
               </description>
            </extension>
         </extensions>              
                                    
      </component>
      
   <!-- ************************************************************************* -->
      
      
      <component>
         <name>std_vector_c</name>
         <file>dlib/stl_checked.h</file>
         <spec_file link="true">dlib/stl_checked/std_vector_c_abstract.h</spec_file>
         <description>
            This object is a simple wrapper around the std::vector object.  It 
            provides an identical interface but also checks the preconditions of
            each member function.  That is, if you violate a requires
            clause the dlib::fatal_error exception is thrown. 
         </description>
      </component>
      
   <!-- ************************************************************************* -->
      
   </components>

   <!-- ************************************************************************* -->


</doc>