Here you can find the source of getZipfPlotData(List
Parameter | Description |
---|---|
sortedCount | a parameter |
public static long[][] getZipfPlotData(List<Long> sortedCount)
//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; } }