Java List Sort getZipfPlotData(List sortedCount)

Here you can find the source of getZipfPlotData(List sortedCount)

Description

Expects sorted count in a decreasing order.

License

Open Source License

Parameter

Parameter Description
sortedCount a parameter

Declaration

public static long[][] getZipfPlotData(List<Long> sortedCount) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.*;

public class Main {
    /**/*  w  ww  .  j  av  a2s .  co  m*/
     * Expects sorted count in a decreasing order.
     * @param sortedCount
     * @return
     */
    public static long[][] getZipfPlotData(List<Long> sortedCount) {
        long[][] plotData = new long[sortedCount.size()][];
        for (int rank = 0; rank < sortedCount.size(); rank++) {
            plotData[rank] = new long[] { rank, sortedCount.get(rank) };
        }
        return plotData;
    }
}

Related

  1. getSortedFilesList(String filesList)
  2. getSortedKetList(HashMap numKnownGenesHashMap)
  3. getSortedList(Collection collection)
  4. getSortedList(Set items)
  5. getSortedStringList(List pathList)
  6. interpolateLinearlyQuantile(List sortedDataAscendingOrder, Double p)
  7. isEqualList(final List list1, final List list2, Comparator c, boolean sortList)
  8. isSorted(Iterable list)
  9. isSorted(List list)