3 #include <boost/random/uniform_real.hpp>
10 double _nonzero_probability;
14 matrix_generator(
"random", height, width, level), _nonzero_probability(nonzero_probability)
27 boost::uniform_real<double> dist;
29 for (
size_t row = 0; row <
_height; ++row)
31 for (
size_t column = 0; column <
_width; ++column)
33 _matrix(row, column) = dist(
_rng) > _nonzero_probability ? 0 : 1;
40 virtual bool do_pivot(
size_t row,
size_t column)
42 tu::matrix_ternary_pivot(
_matrix, row, column);
Definition: gen_generic.hpp:11
void log_generate_end()
Definition: gen_generic.hpp:39
boost::mt19937 _rng
Definition: gen_generic.hpp:16
virtual void sign()
Definition: gen_generic.hpp:74
void log_generate_start()
Definition: gen_generic.hpp:33
tu::integer_matrix _matrix
Definition: gen_generic.hpp:15
size_t _height
Definition: gen_generic.hpp:13
size_t _width
Definition: gen_generic.hpp:14
Definition: gen_random.hpp:8
virtual void generate()
Definition: gen_random.hpp:24
virtual ~random_matrix_generator()
Definition: gen_random.hpp:19
virtual bool do_pivot(size_t row, size_t column)
Definition: gen_random.hpp:40
random_matrix_generator(size_t height, size_t width, double nonzero_probability, tu::log_level level)
Definition: gen_random.hpp:13
log_level
Definition: common.hpp:36