|
@ -44,10 +44,28 @@ public class MatrixCalcController { |
|
|
double[][] result = math.matrixMultiplication(matrixA, matrixB); |
|
|
double[][] result = math.matrixMultiplication(matrixA, matrixB); |
|
|
|
|
|
|
|
|
String DisplayableString = util.outputMatrixToOutputText(result); |
|
|
String DisplayableString = util.outputMatrixToOutputText(result); |
|
|
|
|
|
|
|
|
outputText.setText(DisplayableString); |
|
|
outputText.setText(DisplayableString); |
|
|
outputText.setTextAlignment(TextAlignment.CENTER); |
|
|
outputText.setTextAlignment(TextAlignment.CENTER); |
|
|
} |
|
|
} |
|
|
// System.out.println(matrixATextArea.getText()); |
|
|
// System.out.println(matrixATextArea.getText()); |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
transposeButton.setOnMouseClicked((event) -> { |
|
|
|
|
|
MatrixCalcMath math = new MatrixCalcMath(); |
|
|
|
|
|
MatrixCalcIOUtils util = new MatrixCalcIOUtils(); |
|
|
|
|
|
|
|
|
|
|
|
String stringMatrixA = matrixATextArea.getText(); |
|
|
|
|
|
if (util.checkInput(stringMatrixA)) { |
|
|
|
|
|
|
|
|
|
|
|
double[][] matrixA = util.stringToMatrix(stringMatrixA); |
|
|
|
|
|
double[][] result = math.matrixTransponation(matrixA); |
|
|
|
|
|
|
|
|
|
|
|
String DisplayableString = util.outputMatrixToOutputText(result); |
|
|
|
|
|
|
|
|
|
|
|
outputText.setText(DisplayableString); |
|
|
|
|
|
outputText.setTextAlignment(TextAlignment.CENTER); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |