9 #ifndef CUBBYFLOW_ARRAY1_IMPL_H 10 #define CUBBYFLOW_ARRAY1_IMPL_H 25 Resize(size, initVal);
43 *
this = std::move(other);
49 for (
auto& v : m_data)
58 m_data.resize(other.m_data.size());
59 std::copy(other.m_data.begin(), other.m_data.end(), m_data.begin());
65 size_t size = list.size();
68 auto colIter = list.begin();
69 for (
size_t i = 0; i < size; ++i)
71 (*this)[i] = *colIter;
85 m_data.resize(size, initVal);
102 template <
typename T>
105 return m_data.size();
108 template <
typename T>
111 return m_data.data();
114 template <
typename T>
117 return m_data.data();
120 template <
typename T>
123 return m_data.begin();
126 template <
typename T>
129 return m_data.cbegin();
132 template <
typename T>
138 template <
typename T>
141 return m_data.cend();
144 template <
typename T>
150 template <
typename T>
156 template <
typename T>
159 std::swap(other.m_data, m_data);
162 template <
typename T>
165 m_data.push_back(newVal);
168 template <
typename T>
171 m_data.insert(m_data.end(), other.m_data.begin(), other.m_data.end());
174 template <
typename T>
175 template <
typename Callback>
178 ConstAccessor().ForEach(func);
181 template <
typename T>
182 template <
typename Callback>
185 ConstAccessor().ForEachIndex(func);
188 template <
typename T>
189 template <
typename Callback>
192 Accessor().ParallelForEach(func);
195 template <
typename T>
196 template <
typename Callback>
199 ConstAccessor().ParallelForEachIndex(func);
202 template <
typename T>
208 template <
typename T>
214 template <
typename T>
221 template <
typename T>
228 template <
typename T>
231 m_data = std::move(other.m_data);
235 template <
typename T>
242 template <
typename T>
248 template <
typename T>
251 return ConstAccessor();
1-D read-only array accessor class.
Definition: ArrayAccessor1.h:185
1-D array class.
Definition: Array1.h:29
Definition: pybind11Utils.h:24
Generic N-dimensional array class interface.
Definition: Array.h:28
1-D array accessor class.
Definition: ArrayAccessor1.h:28