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

Function unpack

dlib/test/mpc.cpp:165–176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

163
164 template <long N>
165 void unpack(
166 std::vector<matrix<double,N,1> >& out,
167 const matrix<double,0,1>& item
168 )
169 {
170 DLIB_CASSERT(out.size() != 0,"");
171 DLIB_CASSERT((long)out.size()*out[0].size() == item.size(),"");
172 long j = 0;
173 for (unsigned long i = 0; i < out.size(); ++i)
174 for (long r = 0; r < out[i].size(); ++r)
175 out[i](r) = item(j++);
176 }
177 }
178
179 template <long S, long I>

Callers 1

solve_linear_mpcFunction · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected