3 #include <boost/random.hpp>
4 #include <tu/total_unimodularity.hpp>
36 std::cerr <<
"Generating " <<
_height <<
" x " <<
_width <<
" " <<
_name <<
" matrix..." << std::flush;
42 std::cerr <<
" done." << std::endl;
45 virtual bool do_pivot(
size_t row,
size_t column)
50 template <
typename MatrixType>
82 for (
size_t row = 0; row <
_height; ++row)
84 for (
size_t column = 0; column <
_width; ++column)
86 std::cout << std::setw(3) <<
_matrix(row, column);
90 std::cout << std::flush;
Definition: gen_generic.hpp:11
matrix_generator(const char *name, size_t height, size_t width, tu::log_level level)
Definition: gen_generic.hpp:21
void permute_rows()
Definition: gen_generic.hpp:57
void log_generate_end()
Definition: gen_generic.hpp:39
void permute_rows(MatrixType &matrix)
Definition: gen_generic.hpp:51
const char * _name
Definition: gen_generic.hpp:18
virtual void randomize()
Definition: gen_generic.hpp:68
virtual bool do_pivot(size_t row, size_t column)
Definition: gen_generic.hpp:45
boost::mt19937 _rng
Definition: gen_generic.hpp:16
virtual void print()
Definition: gen_generic.hpp:79
tu::log_level _level
Definition: gen_generic.hpp:17
virtual ~matrix_generator()
Definition: gen_generic.hpp:26
virtual void generate()=0
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
void permute_columns()
Definition: gen_generic.hpp:62
Definition: matrix_transposed.hpp:47
Definition: permutations.hpp:44
log_level
Definition: common.hpp:36
@ LOG_QUIET
Definition: common.hpp:37
boost::numeric::ublas::matrix< long long > integer_matrix
Definition: common.hpp:27
bool sign_matrix(M &matrix, submatrix_indices *violator)
Definition: signing.hpp:138
void matrix_apply_row_permutation(MatrixType &matrix, const permutation &perm)
Definition: matrix_reorder.hpp:19