** Based on any issue? **
godotengine/godot#26793
** Solution **
Implement basic matrix operations, these are building blocks for NNs (Neural Networks) and other stuff
** API Description **
The Matrix will be a class containing the following methods:
ArrayToMatrix(arr:Array) -> void - Convert a input array to a 1 column matrix e.g: [1,2,3] will result in a matrix: [[1],[2],[3]]
MatrixToArray() -> Array - The inverse operation of the above method
PrettyPrint() -> void - Prints a Matrix the beatiful way
SetRandomData(int rows, int columns) -> void - Generate a random value with rows and columns
SetData(arr:Array) -> void - Set the matrix data e.g: [[1,2,3],[4,5,6]] a Matrix 2x3
Transpose() -> void - Rows becomes columns and vice-versa e.g: [[1,2,3],[4,5,6]] will become [[1,4],[2,5],[3,6]]
Multiply(by:Matrix) -> Matrix - Returns Matrices multiplication result
MultiplyScalar(value:float) -> Matrix - Multiply a entire matrix with a single value
Hadamard(by:Matrix) -> Matrix - Different from matrices multiplication each value from Matrix A is multiplied with each value from B
Add(by:Matrix) -> Matrix - Returns a Matrices Addition operation result
Subtract(by:Matrix) -> Matrix - Returns a Matrices Subtraction operation result
** Based on any issue? **
godotengine/godot#26793
** Solution **
Implement basic matrix operations, these are building blocks for NNs (Neural Networks) and other stuff
** API Description **
The Matrix will be a class containing the following methods:
ArrayToMatrix(arr:Array) -> void- Convert a input array to a 1 column matrix e.g: [1,2,3] will result in a matrix: [[1],[2],[3]]MatrixToArray() -> Array- The inverse operation of the above methodPrettyPrint() -> void- Prints a Matrix the beatiful waySetRandomData(int rows, int columns) -> void- Generate a random value with rows and columnsSetData(arr:Array) -> void- Set the matrix data e.g: [[1,2,3],[4,5,6]] a Matrix 2x3Transpose() -> void- Rows becomes columns and vice-versa e.g: [[1,2,3],[4,5,6]] will become [[1,4],[2,5],[3,6]]Multiply(by:Matrix) -> Matrix- Returns Matrices multiplication resultMultiplyScalar(value:float) -> Matrix- Multiply a entire matrix with a single valueHadamard(by:Matrix) -> Matrix- Different from matrices multiplication each value from Matrix A is multiplied with each value from BAdd(by:Matrix) -> Matrix- Returns a Matrices Addition operation resultSubtract(by:Matrix) -> Matrix- Returns a Matrices Subtraction operation result