cmatrix.Matrix.mirror_mat

Matrix.mirror_mat()

Create the mirror matrix from the self matrix object from the given mode argument

Parameters

Type

Description

mode

int

mode define the profile of algorithm between :
  • 0 => vertical mirror

  • 1 => horizontal mirror

Returns
Matrix

The self mirror matrix

Examples

>>> m=rand(4)
>>> print(m)
| +5.000 | +14.000 | +8.000 | +6.000 |
| +14.000 | +11.000 | +4.000 | +0.000 |
| +2.000 | +14.000 | +12.000 | +0.000 |
| +16.000 | +0.000 | +11.000 | +4.000 |
printed
>>> print(m.mirror_mat(0))
| +6.000 | +8.000 | +14.000 | +5.000 |
| +0.000 | +4.000 | +11.000 | +14.000 |
| +0.000 | +12.000 | +14.000 | +2.000 |
| +4.000 | +11.000 | +0.000 | +16.000 |
printed
>>> print(m.mirror_mat(1))
| +16.000 | +0.000 | +11.000 | +4.000 |
| +2.000 | +14.000 | +12.000 | +0.000 |
| +14.000 | +11.000 | +4.000 | +0.000 |
| +5.000 | +14.000 | +8.000 | +6.000 |
printed