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

Function rand_real

dlib/test/fft.cpp:50–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48
49 template<typename R>
50 matrix<R> rand_real(long nr, long nc)
51 {
52 matrix<R> m(nr,nc);
53
54 for (long r = 0; r < m.nr(); ++r)
55 {
56 for (long c = 0; c < m.nc(); ++c)
57 {
58 m(r,c) = rnd.get_random_gaussian() * 10.0;
59 }
60 }
61 return m;
62 }
63
64// ----------------------------------------------------------------------------------------
65

Callers

nothing calls this directly

Calls 3

get_random_gaussianMethod · 0.80
nrMethod · 0.45
ncMethod · 0.45

Tested by

no test coverage detected