Serves as an entry point for advanced customizations of the EdgeRouter algorithm.
Inheritance Hierarchy
Remarks
Subclass instances may be registered with the routing algorithm via its addPartitionExtension method.
See Also
Members
Show:
Properties
Retrieves the IRouterPartition associated with the current EdgeRouter.
Retrieves the IRouterPartition associated with the current EdgeRouter.
protectedreadonlyfinal
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.
Cleans up the extension from the last partitioning with the current configuration.
Parameters
- 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.
Creates another obstacle to the partition, optionally inserting it into the partition with a padding.
final
Parameters
- 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
trueduring preparePartition. - padding?: number
- The padding around the obstacle, when
insertistrue.
Return Value
- RoutingObstacle
- The newly created RoutingObstacle
Gets the RoutingObstacle that has been created earlier for the given data object.
Gets the RoutingObstacle that has been created earlier for the given data object.
final
Parameters
- data: any
- the given data for which the obstacle will be returned
Return Value
- RoutingObstacle
- the RoutingObstacle that has been created earlier for the given data object
See Also
Callback after the new given PartitionCell has been created.
Callback after the new given PartitionCell has been created.
Parameters
- createdCell: PartitionCell
- the newly created PartitionCell
Callback after the given PartitionCell has been finalized.
Callback after the given PartitionCell has been finalized.
Before the cell may be further subdivided, it has to be unlocked again.
Parameters
- finalizedCell: PartitionCell
- The cell that has been finalized
Callback after the given PartitionCell has been subdivided into several sub-cells.
Callback after the given PartitionCell has been subdivided into several sub-cells.
Parameters
- 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.
Callback after the given PartitionCell has been unlocked.
The cell had previously been finalized but has been unlocked again and may be subdivided in the future.
Parameters
- unlockedCell: PartitionCell
- the cell that has been unlocked
Called when this instance is initialized by EdgeRouter.
Called when this instance is initialized by EdgeRouter.
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
- configuration: PathSearchConfiguration
- the configuration used for the path search