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

Function rand_complex

dlib/test/fft.cpp:35–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33
34 template<typename R>
35 matrix<complex<R> > rand_complex(long nr, long nc, R scale = 10.0)
36 {
37 matrix<complex<R> > m(nr,nc);
38
39 for (long r = 0; r < m.nr(); ++r)
40 {
41 for (long c = 0; c < m.nc(); ++c)
42 {
43 m(r,c) = std::complex<R>(rnd.get_random_gaussian() * scale, rnd.get_random_gaussian() * scale);
44 }
45 }
46 return m;
47 }
48
49 template<typename R>
50 matrix<R> rand_real(long nr, long nc)

Callers

nothing calls this directly

Calls 3

get_random_gaussianMethod · 0.80
nrMethod · 0.45
ncMethod · 0.45

Tested by

no test coverage detected