public abstract class GraphPartitionExtensionAdapter extends Object implements IGraphPartitionExtension
GraphPartitionExtensionAdapter
provides an empty implementation of IGraphPartitionExtension
.
The only real functionality is contained in method IGraphPartitionExtension.preparePartition(PathSearchConfiguration, GraphPartition)
which stores the given PathSearchConfiguration
and GraphPartition
in properties.
getConfiguration()
,
getGraphPartition()
Constructor and Description |
---|
GraphPartitionExtensionAdapter()
Creates a new instance of
GraphPartitionExtensionAdapter . |
Modifier and Type | Method and Description |
---|---|
void |
cleanup()
Cleans up the extension from the last partitioning with the current
configuration and
GraphPartition . |
protected PathSearchConfiguration |
getConfiguration()
Gets the configuration of the
PathSearch passed to
IGraphPartitionExtension.preparePartition(PathSearchConfiguration, GraphPartition) . |
protected GraphPartition |
getGraphPartition()
|
void |
onCellCreated(PartitionCell createdCell)
Callback after the new given
PartitionCell has been created. |
void |
onCellFinalized(PartitionCell finalizedCell)
Callback after the given
PartitionCell has been finalized and won't be further subdivided. |
void |
onCellSubdivided(PartitionCell cell,
List<Object> subCells)
Callback after the given
PartitionCell has been subdivided into several sub-cells. |
void |
preparePartition(PathSearchConfiguration configuration,
GraphPartition graphPartition)
Stores the given
PathSearchConfiguration and GraphPartition such that they are accessible through Configuration
and GraphPartition , respectively. |
public GraphPartitionExtensionAdapter()
GraphPartitionExtensionAdapter
.public void cleanup()
IGraphPartitionExtension
configuration
and
GraphPartition
.cleanup
in interface IGraphPartitionExtension
protected PathSearchConfiguration getConfiguration()
PathSearch
passed to
IGraphPartitionExtension.preparePartition(PathSearchConfiguration, GraphPartition)
.PathSearch
passed to IGraphPartitionExtension.preparePartition(PathSearchConfiguration, GraphPartition)
or null
if said method has not been called yet or this instance has been cleaned up
protected GraphPartition getGraphPartition()
GraphPartition
passed to
IGraphPartitionExtension.preparePartition(PathSearchConfiguration, GraphPartition)
.GraphPartition
passed to IGraphPartitionExtension.preparePartition(PathSearchConfiguration, GraphPartition)
or null
if said method has not been called yet or this instance has been cleaned up
public void onCellCreated(PartitionCell createdCell)
IDecompositionListener
PartitionCell
has been created.onCellCreated
in interface IDecompositionListener
createdCell
- the newly created PartitionCell
public void onCellFinalized(PartitionCell finalizedCell)
IDecompositionListener
PartitionCell
has been finalized and won't be further subdivided.onCellFinalized
in interface IDecompositionListener
finalizedCell
- the cell that has been finalizedpublic void onCellSubdivided(PartitionCell cell, List<Object> subCells)
IDecompositionListener
PartitionCell
has been subdivided into several sub-cells.
IDecompositionListener
may not modify the list of sub-cells.
onCellSubdivided
in interface IDecompositionListener
cell
- the cell that has been subdividedsubCells
- the sub-cells resulting from the subdivision of the given PartitionCell
public void preparePartition(PathSearchConfiguration configuration, GraphPartition graphPartition)
PathSearchConfiguration
and GraphPartition
such that they are accessible through Configuration
and GraphPartition
, respectively.preparePartition
in interface IGraphPartitionExtension
configuration
- the configuration used for the path searchgraphPartition
- the graph partition that uses this extension