I noticed that Matlab does perform some matrix function, for example, adding 5 to all elements of the n * n array occurs almost instantly, even if the matrix is ββlarge, because you do not need to iterate over each element, doing the same in java, the for loop takes forever if the matrix is ββlarge.
I have two questions: are there efficient built-in classes in java for performing matrix operations, and secondly, how can I encode something to more efficiently update all elements of a large matrix in java.
source
share