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

Function randmat

dlib/test/matrix_lu.cpp:37–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35
36 template <typename type>
37 const matrix<type> randmat(long r, long c)
38 {
39 matrix<type> m(r,c);
40 for (long row = 0; row < m.nr(); ++row)
41 {
42 for (long col = 0; col < m.nc(); ++col)
43 {
44 m(row,col) = static_cast<type>(rnd.get_random_double());
45 }
46 }
47
48 return m;
49 }
50
51 template <typename type, long NR, long NC>
52 const matrix<type,NR,NC> randmat()

Callers

nothing calls this directly

Calls 3

get_random_doubleMethod · 0.80
nrMethod · 0.45
ncMethod · 0.45

Tested by

no test coverage detected