Class PlotAnalysis
java.lang.Object
com.plotsquared.core.plot.expiration.PlotAnalysis
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
analyzePlot(Plot plot, RunnableVal<PlotAnalysis> whenDone)
asList()
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 clearingstatic PlotAnalysis
getAnalysis(Plot plot, Settings.Auto_Clear settings)
static double
getCC(int n, int sum)
Get correlation coefficient.int
getComplexity(Settings.Auto_Clear settings)
static int[]
getSD(int[]... ranks)
An optimized lossy standard deviation algorithm.static String
static void
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 timestatic int[]
rank(int[] input, int size)
An optimized algorithm for ranking a very specific set of inputsstatic void
sort(int[] input)
static int[]
square(int[] array)
A simple array squaring algorithmstatic int
sum(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
-