MCPcopy Create free account
hub / github.com/davisking/dlib / array2d

Class array2d

dlib/array2d/array2d_kernel.h:18–362  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16 typename mem_manager = default_memory_manager
17 >
18 class array2d : public enumerable<T>
19 {
20
21 /*!
22 INITIAL VALUE
23 - nc_ == 0
24 - nr_ == 0
25 - data == 0
26 - at_start_ == true
27 - cur == 0
28 - last == 0
29
30 CONVENTION
31 - nc_ == nc()
32 - nr_ == nc()
33 - if (data != 0) then
34 - last == a pointer to the last element in the data array
35 - data == pointer to an array of nc_*nr_ T objects
36 - else
37 - nc_ == 0
38 - nr_ == 0
39 - data == 0
40 - last == 0
41
42
43 - nr_ * nc_ == size()
44 - if (cur == 0) then
45 - current_element_valid() == false
46 - else
47 - current_element_valid() == true
48 - *cur == element()
49
50 - at_start_ == at_start()
51 !*/
52
53
54 class row_helper;
55 public:
56
57 // These typedefs are here for backwards compatibility with older versions of dlib.
58 typedef array2d kernel_1a;
59 typedef array2d kernel_1a_c;
60
61 typedef T type;
62 typedef mem_manager mem_manager_type;
63 typedef T* iterator;
64 typedef const T* const_iterator;
65
66
67 // -----------------------------------
68
69 class row
70 {
71 /*!
72 CONVENTION
73 - nc_ == nc()
74 - for all x < nc_:
75 - (*this)[x] == data[x]

Callers

nothing calls this directly

Calls 1

swapFunction · 0.70

Tested by

no test coverage detected