MCPcopy Create free account
hub / github.com/GDRETools/gdsdecomp / vector_to_array

Function vector_to_array

utility/common.h:222–229  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

220
221template <class T>
222Array vector_to_array(const Vector<T> &vec) {
223 Array arr;
224 arr.resize(vec.size());
225 for (int i = 0; i < vec.size(); i++) {
226 arr.set(i, vec[i]);
227 }
228 return arr;
229}
230
231// specialization for Ref<T>
232template <class T>

Callers 1

to_jsonMethod · 0.85

Calls 3

setMethod · 0.80
resizeMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected