How to find the index of maximum element in ojalgo? To find maximum I can use double res = mat.aggregateAll(Aggregator.MAXIMUM);, but how to find the maximum’s indices? PS: the mat is type of SparseStore<Double> Answer You don’t specify what type mat is? There is a method indexOfLargest() defined in the Access1D.Aggregatable interface – implemented by a lot of different classes.