class TimeSeriesUtil {

	public static List<Integer> sortIndexes(final double[] vector, final boolean ascending) {
		Integer[] indexes = new Integer[vector.length];
		for (int i = 0; i < indexes.length; i++) {
			indexes[i] = i;
		}
		Arrays.sort(indexes, (i1, i2) -> (ascending ? 1 : -1) * Double.compare(Math.abs(vector[i1]), Math.abs(vector[i2])));
		return Arrays.asList(indexes);
	}

	private  TimeSeriesUtil();

}