How to Use the MatrixGame Class
You can then apply row operations by providing operation strings to the applyOperation() method. The rows start from R1.
Supported operations include:
- Row swapping:
R1 <-> R2
- Row scaling:
-0.5R1 -> R1
- Linear combinations:
R3 - 4R1 -> R3
Decimal numbers are fully supported (e.g., 0.5R1 + 1.25R2 -> R2), but exact fractions like 1/3 are not recognized.
Due to floating-point limitations, very small values close to zero may still appear. To improve readability, all results are automatically rounded to 4 decimal places after each operation. However, intermediate results may temporarily show more than 4 decimals before rounding.