15 _violator_size = violator_size;
32 for (
size_t row = 0; row <
_height; ++row)
34 for (
size_t column = 0; column <
_width; ++column)
36 _matrix(row, column) = (row == column || row == (column + 1) %
_height || (row < 2 && column >= 2 && column <
_width - 1)) ? 1 : 0;
43 std::cerr <<
"Hiding the violator..." << std::flush;
46 if (_violator_size == 0)
48 boost::uniform_int <int> dist(3,
_height);
49 _violator_size = dist(
_rng);
52 for (
size_t i = 0; i <
_height - _violator_size; ++i)
56 std::cerr <<
" done. (size is " << _violator_size <<
" x " << _violator_size <<
")" << std::endl;
Definition: gen_cycle_violator.hpp:7
virtual void generate()
Definition: gen_cycle_violator.hpp:29
cycle_violator_matrix_generator(size_t size, tu::log_level level)
Definition: gen_cycle_violator.hpp:18
virtual ~cycle_violator_matrix_generator()
Definition: gen_cycle_violator.hpp:24
cycle_violator_matrix_generator(size_t size, size_t violator_size, tu::log_level level)
Definition: gen_cycle_violator.hpp:12
Definition: gen_generic.hpp:11
void log_generate_end()
Definition: gen_generic.hpp:39
boost::mt19937 _rng
Definition: gen_generic.hpp:16
tu::log_level _level
Definition: gen_generic.hpp:17
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
log_level
Definition: common.hpp:36
@ LOG_QUIET
Definition: common.hpp:37
void matrix_binary_pivot(matrix_permuted< MatrixType > &matrix, size_t i, size_t j)
Definition: matrix_permuted.hpp:224