$darkmode
DENOPTIM
denoptim.combinatorial.CEBLUtils Class Reference

Helper methods for the exploration of the fragment space. More...

Static Public Member Functions

static String getNameOfStorageDir (CEBLParameters settings, int level)
 
static int getGraphIdFromStorageFile (String fileName) throws DENOPTIMException
 
static String getBaseNameOfStorageFile (int graphId)
 
static String getNameOfStorageFile (CEBLParameters settings, int level, int graphId)
 
static String getNameOfStorageIndexFile (CEBLParameters settings, int level)
 
static CheckPoint deserializeCheckpoint (String file) throws DENOPTIMException
 Converts a text file into the corresponding checkpoint object. More...
 

Static Protected Member Functions

static void storeAllGraphsOfLevel (CEBLParameters settings, ArrayList< DGraph > lstGraphs, int level) throws DENOPTIMException
 Serialize all DENOPTIMGraphs to file. More...
 
static void storeGraphOfLevel (CEBLParameters settings, DGraph graph, int level, int rootId, ArrayList< Integer > nextIds) throws DENOPTIMException
 Serialize a DENOPTIMGraph to a file. More...
 
static void serializeCheckPoint (CEBLParameters settings) throws DENOPTIMException
 Store the checkpoint in a text file with json format. More...
 

Detailed Description

Helper methods for the exploration of the fragment space.

Author
Marco Foscato

Definition at line 44 of file CEBLUtils.java.

Member Function Documentation

◆ deserializeCheckpoint()

static CheckPoint denoptim.combinatorial.CEBLUtils.deserializeCheckpoint ( String  file) throws DENOPTIMException
static

Converts a text file into the corresponding checkpoint object.

Parameters
filethe pathname of the file to convert.

Definition at line 237 of file CEBLUtils.java.

References denoptim.io.DenoptimIO.readText().

Referenced by denoptim.programs.combinatorial.CEBLParameters.processParameters().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getBaseNameOfStorageFile()

static String denoptim.combinatorial.CEBLUtils.getBaseNameOfStorageFile ( int  graphId)
static
Returns
the basename of a FragSpaceExplorer storage file

Definition at line 101 of file CEBLUtils.java.

References denoptim.constants.DENOPTIMConstants.SERGFILENAMEEXT.

Referenced by denoptim.combinatorial.CEBLUtils.getNameOfStorageFile(), and denoptim.combinatorial.CheckPoint.serFileAlreadyUsed().

Here is the caller graph for this function:

◆ getGraphIdFromStorageFile()

static int denoptim.combinatorial.CEBLUtils.getGraphIdFromStorageFile ( String  fileName) throws DENOPTIMException
static
Returns
the graphId from the name of the storage file

Definition at line 69 of file CEBLUtils.java.

References denoptim.constants.DENOPTIMConstants.SERGFILENAMEROOT.

◆ getNameOfStorageDir()

static String denoptim.combinatorial.CEBLUtils.getNameOfStorageDir ( CEBLParameters  settings,
int  level 
)
static
Returns
the pathname of the folder where serialized graphs of a level are stored

Definition at line 54 of file CEBLUtils.java.

References denoptim.programs.combinatorial.CEBLParameters.getDBRoot().

Referenced by denoptim.combinatorial.CombinatorialExplorerByLayer.exploreCombinationsAtGivenLevel(), denoptim.combinatorial.CombinatorialExplorerByLayer.run(), and denoptim.combinatorial.CEBLUtils.storeGraphOfLevel().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getNameOfStorageFile()

static String denoptim.combinatorial.CEBLUtils.getNameOfStorageFile ( CEBLParameters  settings,
int  level,
int  graphId 
)
static
Returns
the pathname of a FragSpaceExplorer storage file

Definition at line 115 of file CEBLUtils.java.

References denoptim.combinatorial.CEBLUtils.getBaseNameOfStorageFile(), and denoptim.programs.combinatorial.CEBLParameters.getDBRoot().

Referenced by denoptim.combinatorial.CEBLUtils.storeGraphOfLevel().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getNameOfStorageIndexFile()

static String denoptim.combinatorial.CEBLUtils.getNameOfStorageIndexFile ( CEBLParameters  settings,
int  level 
)
static
Returns
the pathname of a FragSpaceExplorer storage file where

Definition at line 133 of file CEBLUtils.java.

References denoptim.programs.combinatorial.CEBLParameters.getDBRoot().

Referenced by denoptim.combinatorial.CEBLUtils.storeGraphOfLevel().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ serializeCheckPoint()

static void denoptim.combinatorial.CEBLUtils.serializeCheckPoint ( CEBLParameters  settings) throws DENOPTIMException
staticprotected

Store the checkpoint in a text file with json format.

Definition at line 222 of file CEBLUtils.java.

References denoptim.io.DenoptimIO.writeData().

Referenced by denoptim.combinatorial.CombinatorialExplorerByLayer.makeCheckPoint().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ storeAllGraphsOfLevel()

static void denoptim.combinatorial.CEBLUtils.storeAllGraphsOfLevel ( CEBLParameters  settings,
ArrayList< DGraph lstGraphs,
int  level 
) throws DENOPTIMException
staticprotected

Serialize all DENOPTIMGraphs to file.

The pathname of the output file is given by the value of level and the parameters from FSEParameters.

Parameters
lstGraphs
level

Definition at line 156 of file CEBLUtils.java.

References denoptim.graph.DGraph.clone(), and denoptim.combinatorial.CEBLUtils.storeGraphOfLevel().

Referenced by denoptim.combinatorial.CombinatorialExplorerByLayer.exploreCombinationsAtGivenLevel().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ storeGraphOfLevel()

static void denoptim.combinatorial.CEBLUtils.storeGraphOfLevel ( CEBLParameters  settings,
DGraph  graph,
int  level,
int  rootId,
ArrayList< Integer >  nextIds 
) throws DENOPTIMException
staticprotected

Serialize a DENOPTIMGraph to a file.

The pathname of the output file is given by the value of level and the parameters from FSEParameters.

Parameters
graphthe graph to store
levelthe level of modification from which the graph is generated
rootIdthe ID of the root graph used to build the graph
nextIdsthe set of indexes used to generate the next combination of fragment.

Definition at line 187 of file CEBLUtils.java.

References denoptim.files.SingletonFileAccess.getInstance(), denoptim.combinatorial.CEBLUtils.getNameOfStorageDir(), denoptim.combinatorial.CEBLUtils.getNameOfStorageFile(), denoptim.combinatorial.CEBLUtils.getNameOfStorageIndexFile(), and denoptim.files.SingletonFileAccess.writeData().

Referenced by denoptim.combinatorial.GraphBuildingTask.call(), and denoptim.combinatorial.CEBLUtils.storeAllGraphsOfLevel().

Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following file: