Serves as an entry point for advanced customizations of the EdgeRouter algorithm.
Inheritance Hierarchy
PartitionExtension
Remarks
Subclass instances may be registered with the routing algorithm via its addPartitionExtension method.
Type Details
- yFiles module
- algorithms
See Also
Properties
Retrieves the IRouterPartition associated with the current EdgeRouter.
Throws
- Exception({ name: 'NotSupportedError' })
- If the extension is not currently being executed by the algorithm.
Methods
Cleans up the extension from the last partitioning with the current configuration.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- configuration - PathSearchConfiguration
- The configuration used for the current path search.
Creates another obstacle to the partition, optionally inserting it into the partition with a padding.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- bounds - Rect
- The bounds of the obstacle
- data - any
- The object to associate with the obstacle. See getObstacle.
- insert - boolean
- Whether to insert the obstacle into the partition after the partition has been initialized. Should not be called with
true
during preparePartition. - padding - number
- The padding around the obstacle, when
insert
istrue
.
Returns
- ↪RoutingObstacle
- The newly created RoutingObstacle
Gets the RoutingObstacle that has been created earlier for the given data object.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- data - any
- the given data for which the obstacle will be returned
Returns
- ↪RoutingObstacle
- the RoutingObstacle that has been created earlier for the given data object
See Also
Callback after the new given PartitionCell has been created.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- createdCell - PartitionCell
- the newly created PartitionCell
Callback after the given PartitionCell has been finalized.
Remarks
Before the cell may be further subdivided, it has to be unlocked again.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- finalizedCell - PartitionCell
- The cell that has been finalized
Callback after the given PartitionCell has been subdivided into several sub-cells.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- cell - PartitionCell
- The cell that has been subdivided
- subCells - IEnumerable<PartitionCell>
- The sub-cells resulting from the subdivision of the given PartitionCell
Callback after the given PartitionCell has been unlocked.
Remarks
The cell had previously been finalized but has been unlocked again and may be subdivided in the future.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- unlockedCell - PartitionCell
- the cell that has been unlocked
Called when this instance is initialized by EdgeRouter.
Remarks
It is called upon initialization of the partition but before the obstacles are initialized. Implementations may use the graph upon which the given IRouterPartition is based to initialize themselves and/or to add obstacles to the list with which partition will be populated.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- configuration - PathSearchConfiguration
- the configuration used for the path search