Class PlotAnalysis
java.lang.Object
com.plotsquared.core.plot.expiration.PlotAnalysis
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidanalyzePlot(Plot plot, RunnableVal<PlotAnalysis> whenDone) asList()static voidcalcOptimalModifiers(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 clearingstatic PlotAnalysisgetAnalysis(Plot plot, Settings.Auto_Clear settings) static doublegetCC(int n, int sum) Get correlation coefficient.intgetComplexity(Settings.Auto_Clear settings) static int[]getSD(int[]... ranks) An optimized lossy standard deviation algorithm.static Stringstatic voidstatic 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 timestatic int[]rank(int[] input, int size) An optimized algorithm for ranking a very specific set of inputsstatic voidsort(int[] input) static int[]square(int[] array) A simple array squaring algorithm.static intsum(int[] array) CallsArrays.stream(array).sum()
-
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
-
analyzePlot
-
calcOptimalModifiers
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 donethreshold- threshold
-
logln
-
log
-
getCC
public static double getCC(int n, int sum) Get correlation coefficient.- Parameters:
n- nsum- sum- Returns:
- result
-
sum
public static int sum(int[] array) CallsArrays.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- inputsize- size- Returns:
- result
-
sort
public static void sort(int[] input) -
asList
-
getComplexity
-