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

Function pack

dlib/test/mpc.cpp:137–148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

135 {
136 template <long N>
137 void pack(
138 matrix<double,0,1>& out,
139 const std::vector<matrix<double,N,1> >& item
140 )
141 {
142 DLIB_CASSERT(item.size() != 0,"");
143 out.set_size(item.size()*item[0].size());
144 long j = 0;
145 for (unsigned long i = 0; i < item.size(); ++i)
146 for (long r = 0; r < item[i].size(); ++r)
147 out(j++) = item[i](r);
148 }
149
150 template <long N>
151 void pack(

Callers 1

solve_linear_mpcFunction · 0.85

Calls 2

sizeMethod · 0.45
set_sizeMethod · 0.45

Tested by

no test coverage detected