Class PlotAnalysis

java.lang.Object
com.plotsquared.core.plot.expiration.PlotAnalysis

public class PlotAnalysis extends Object
  • Field Details

    • running

      public static boolean running
    • changes

      public int changes
    • faces

      public int faces
    • data

      public int data
    • air

      public int air
    • variety

      public int variety
    • changes_sd

      public int changes_sd
    • faces_sd

      public int faces_sd
    • data_sd

      public int data_sd
    • air_sd

      public int air_sd
    • variety_sd

      public int variety_sd
  • Constructor Details

    • PlotAnalysis

      public PlotAnalysis()
  • Method Details

    • getAnalysis

      public static PlotAnalysis getAnalysis(Plot plot, Settings.Auto_Clear settings)
    • analyzePlot

      public static void analyzePlot(Plot plot, RunnableVal<PlotAnalysis> whenDone)
    • calcOptimalModifiers

      public static void calcOptimalModifiers(Runnable whenDone, double threshold)
      This will set the optimal modifiers for the plot analysis based on the current plot ratings
      - Will be used to calibrate the threshold for plot clearing
      Parameters:
      whenDone - task to run when done
      threshold - threshold
    • logln

      public static void logln(Object obj)
    • log

      public static String log(Object obj)
    • getCC

      public static double getCC(int n, int sum)
      Get correlation coefficient.
      Parameters:
      n - n
      sum - sum
      Returns:
      result
    • sum

      public static int sum(int[] array)
      Calls Arrays.stream(array).sum()
      Parameters:
      array - array
      Returns:
      sum
    • square

      public static int[] square(int[] array)
      A simple array squaring algorithm. - Used for calculating the variance
      Parameters:
      array - array
      Returns:
      result
    • getSD

      public static int[] getSD(int[]... ranks)
      An optimized lossy standard deviation algorithm.
      Parameters:
      ranks - ranks
      Returns:
      result
    • rank

      public static int[] rank(int[] input)
      An optimized algorithm for ranking a very specific set of inputs
      - Input is an array of int with a max size of 102400
      - A reduced sample space allows for sorting (and ranking in this case) in linear time
      Parameters:
      input - input
      Returns:
      result
    • rank

      public static int[] rank(int[] input, int size)
      An optimized algorithm for ranking a very specific set of inputs
      Parameters:
      input - input
      size - size
      Returns:
      result
    • sort

      public static void sort(int[] input)
    • asList

      public List<Integer> asList()
    • getComplexity

      public int getComplexity(Settings.Auto_Clear settings)