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
-
changes
-
faces
-
data
-
air
-
variety
-
changes_sd
-
faces_sd
-
data_sd
-
air_sd
-
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
Get correlation coefficient.- Parameters:
n- nsum- sum- Returns:
- result
-
sum
CallsArrays.stream(array).sum()- Parameters:
array- array- Returns:
- sum
-
square
A simple array squaring algorithm. - Used for calculating the variance- Parameters:
array- array- Returns:
- result
-
getSD
An optimized lossy standard deviation algorithm.- Parameters:
ranks- ranks- Returns:
- result
-
rank
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
An optimized algorithm for ranking a very specific set of inputs- Parameters:
input- inputsize- size- Returns:
- result
-
sort
-
asList
-
getComplexity
-