$darkmode
DENOPTIM
|
General utilities. More...
Static Public Member Functions | |
static String | getPaddedString (int count, int number) |
returns the padded string with zeroes placed to the left of 'number' up to reach the desired number of digits. More... | |
static void | printMemoryDetails () |
Print an analysis of the current memory usage. More... | |
static int | getIdxOfClosing (int id, String s) |
Return the index of the closing parenthesis. More... | |
static< T > void | unionOfIntersectingSets (List< Set< T > > list) |
Takes the union of any two sets in this list that intersect. More... | |
static String | getEnglishFormattedDecimal (String pattern, int decimals, double value) |
Formats a decimal number using the given pattern but with English format as for separators. More... | |
static String | getEnglishFormattedDecimal (String pattern, double value) |
Formats a decimal number using the given pattern but with English format as for separators. More... | |
Static Private Attributes | |
static Runtime | RUNTIME = Runtime.getRuntime() |
static final String | NL = DENOPTIMConstants.EOL |
General utilities.
Definition at line 37 of file GeneralUtils.java.
|
static |
Formats a decimal number using the given pattern but with English format as for separators.
Imposes 4 as the minimum number of fractional digits.
pattern | the pattern to use. Example "###.####" |
value | the value to format |
Definition at line 209 of file GeneralUtils.java.
References denoptim.utils.GeneralUtils.getEnglishFormattedDecimal().
|
static |
Formats a decimal number using the given pattern but with English format as for separators.
pattern | the pattern to use. Example "###.#" |
decimals | minimum number of decimal digits to print. Overwrites the specific defined by the pattern. |
value | the value to format |
Definition at line 190 of file GeneralUtils.java.
Referenced by denoptim.utils.FormulaUtilsTest.convertSimpleToString(), denoptim.utils.FormulaUtilsTest.convertToString(), denoptim.gui.CuttingRulesSelectionDialog.CuttingRulesSelectionDialog(), denoptim.utils.GeneralUtils.getEnglishFormattedDecimal(), and denoptim.graph.AttachmentPoint.getSingleAPStringSDF().
|
static |
Return the index of the closing parenthesis.
Ignores nested parenthesis
id | identified of the parenthesis (use 1 for round, 2 for square, and three for curly brackets) |
s | the string to analyze |
Definition at line 96 of file GeneralUtils.java.
|
static |
returns the padded string with zeroes placed to the left of 'number' up to reach the desired number of digits.
count | the total number of digits. |
number | the number to be formatted. |
Definition at line 51 of file GeneralUtils.java.
Referenced by denoptim.ga.EAUtils.buildCandidateByFragmentingMolecule(), denoptim.ga.EAUtils.buildCandidateByMutation(), denoptim.ga.EAUtils.buildCandidateFromScratch(), denoptim.ga.EAUtils.buildCandidatesByXOver(), denoptim.graph.Edge.compareAsUndirected(), denoptim.integration.tinker.TinkerUtils.getNameLastCycleFile(), denoptim.ga.EAUtils.getPathNameToGenerationDetailsFile(), denoptim.ga.EAUtils.getPathNameToGenerationFolder(), denoptim.ga.EAUtils.getPopulationFromFile(), denoptim.gui.GUIInspectGARun.importGARunData(), denoptim.graph.simplified.UndirectedEdge.makeInvariant(), denoptim.ga.EAUtils.readCandidateFromFile(), and denoptim.combinatorial.GraphBuildingTask.sendToFitnessProvider().
|
static |
Print an analysis of the current memory usage.
Definition at line 61 of file GeneralUtils.java.
References denoptim.utils.GeneralUtils.NL, and denoptim.utils.GeneralUtils.RUNTIME.
|
static |
Takes the union of any two sets in this list that intersect.
Performs operations in-place.
list | List to merge sets of |
Definition at line 149 of file GeneralUtils.java.
Referenced by denoptim.graph.DGraph.extractPattern(), and denoptim.utils.GenUtilsTest.testUnionOfSets().
|
staticprivate |
Definition at line 40 of file GeneralUtils.java.
Referenced by denoptim.utils.GeneralUtils.printMemoryDetails().
|
staticprivate |
Definition at line 39 of file GeneralUtils.java.
Referenced by denoptim.utils.GeneralUtils.printMemoryDetails().