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

Function randmat

dlib/test/matrix_chol.cpp:36–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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