53 for (
int c = 0 ; c < m.
width() ; c++)
64 int ncols = m.
width();
66 int length = (nrows/2) * ncols;
68 for (
int i = 0 ; i < length ; i++) {
73 int r2 = nrows - r1 - 1;
77 xs[length+i] = m(c2,r2);
87 int ncols = m.
width();
89 int length = (ncols/2) * nrows;
91 for (
int i = 0 ; i < length ; i++) {
96 int c2 = ncols - c1 - 1;
100 xs[length+i] = m(c2,r2);
110 int ncols = m.
width();
115 for (
int i = 0 ; i < nrows ; i++) {
116 for (
int j = i+1 ; j < ncols ; j++) {
Matrix-interface for arrays.
int width(void) const
Return the width of the matrix.
Slice< A > col(int c) const
Access column c.
Slice< A > row(int r) const
Access row r.
ArrayTraits< A >::ArgsType ArgsType
The type of the Args-array type for ValueType values.
int height(void) const
Return the height of the matrix.
A reference-counted pointer to a SymmetryObject.
Gecode toplevel namespace
Post propagator for SetVar SetOpType SetVar SetRelType r
SymmetryHandle rows_reflect(const Matrix< A > &m)
Reflect rows symmetry specification.
SymmetryHandle columns_reflect(const Matrix< A > &m)
Reflect columns symmetry specification.
SymmetryHandle rows_interchange(const Matrix< A > &m)
Interchangeable rows symmetry specification.
SymmetryHandle VariableSequenceSymmetry(const IntVarArgs &x, int ss)
Variable sequences in x of size ss are interchangeable.
SymmetryHandle diagonal_reflect(const Matrix< A > &m)
Reflect around main diagonal symmetry specification.
SymmetryHandle columns_interchange(const Matrix< A > &m)
Interchangeable columns symmetry specification.