DIS for arithmetic matrices in Java
I want to write a library for myself to work with the matrices. I think how to ensure that arithmetic operations can be performed over the elements of the matrix.
Yes. Java SE Interfaces declaring methods of type
subtract()etc.? Well, as far as I'm concerned, https://docs.oracle.com/javase/7/docs/api/java/lang/Number.html It's not gonna help, and he doesn't here much, because the elements of the matrix are not necessarily numbers.
Decided to make a simple Matrix abstract class, with basic methods for matrix operations. It inherits three classes: IntegerMatrix, DoubleMatrix and MatrixOfElements, where Element provides the necessary arithmetic operation over the matrix elements.