MCPcopy Create free account
hub / github.com/ConorWilliams/libfork / random_vec

Function random_vec

test/source/algorithm/matrix.hpp:41–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39};
40
41inline auto random_vec(std::type_identity<matrix>, std::size_t n) -> std::vector<matrix> {
42
43 std::vector<matrix> out(n);
44
45 lf::xoshiro rng{lf::seed, std::random_device{}};
46 std::uniform_int_distribution<unsigned long> dist{0, 100};
47
48 for (auto &&elem : out) {
49 elem = matrix{
50 dist(rng),
51 dist(rng),
52 dist(rng),
53 dist(rng),
54 };
55 }
56
57 return out;
58}
59
60#endif /* FC8523B7_91E1_4380_ADE2_512163CE73AF */

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected