Package org.neo4j.gds.core.utils
Class TwoArraysSort
- java.lang.Object
-
- org.neo4j.gds.core.utils.TwoArraysSort
-
public final class TwoArraysSort extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TwoArraysSort.AscendingLongComparator
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
sortDoubleArrayByLongValues(long[] longArray, double[] doubleArray, int length)
Sort two arrays simultaneously based on values of the first (long) array.
-
-
-
Method Detail
-
sortDoubleArrayByLongValues
public static void sortDoubleArrayByLongValues(long[] longArray, double[] doubleArray, int length)
Sort two arrays simultaneously based on values of the first (long) array. E.g. {[4, 1, 8], [0.5, 1.9, 0.9]} -> {[1, 4, 8], [1,9, 0.5, 0.9]}- Parameters:
longArray
- Array of long values (e.g. neighbours ids)doubleArray
- Array of double values (e.g. neighbours weighs)length
- Number of values to sort
-
-