//#region src/geomtypes.d.ts declare class Point { x: number; y: number; vn: number; constructor(x?: number, y?: number); eq(rhs: Point): boolean; at(dimension: number): number; setAt(dimension: number, value: number): void; } declare class Box { min: Point; max: Point; constructor(); length(dimension: number): number; width(): number; height(): number; } declare class Polygon { ps: Point[]; checkpointsOnRoute: Array<[number, Point]>; constructor(n?: number); clone(): Polygon; clear(): void; empty(): boolean; size(): number; at(index: number): Point | undefined; pairs(): Generator<[Point, Point]>; simplify(): Polygon; checkpointsOnSegment(segmentLowerIndex: number, indexModifier?: number): Point[]; offsetBoundingBox(offset: number): Box; } declare class Rect extends Polygon { readonly _origin: { x: number; y: number; }; readonly _size: { width: number; height: number; }; constructor(origin: { x: number; y: number; }, size: { width: number; height: number; }); offsetPolygon(bufferSpace: number): Rect; } //#endregion //#region src/utilities/option-set.d.ts declare class OptionSet { readonly rawValue: number; constructor(value: number | OptionSet[]); has(value: OptionSet): boolean; intersects(value: OptionSet): boolean; add(value: typeof this): typeof this; equal(other: typeof this): boolean; static zero: OptionSet; } //#endregion //#region src/models/Direction.d.ts declare class Direction extends OptionSet { static blockStart: Direction; static blockEnd: Direction; static block: Direction; static inlineStart: Direction; static inlineEnd: Direction; static inline: Direction; static all: Direction; } //#endregion //#region src/models/endpoint.d.ts declare class Endpoint { position: Point; directions: Direction; constructor(position: Point, directions?: Direction); } //#endregion //#region src/graph.d.ts declare class EdgeInf { lstPrev: EdgeInf | null; lstNext: EdgeInf | null; private router; private _added; private _isHyperedgeSegment; private _disabled; private _vert1; private _vert2; private _dist; private _mtstDist; private _crossingCost; constructor(v1: VertInf, v2: VertInf, router: Router); getDist(): number; isOrthogonal(): boolean; isDummyConnection(): boolean; isDisabled(): boolean; setDisabled(disabled: boolean): void; isHyperedgeSegment(): boolean; setHyperedgeSegment(hyperedge: boolean): void; mtstDist(): number; setMtstDist(joinCost: number): void; crossingCost(): number; /** @internal */ setCrossingCost(cost: number): void; otherVert(vert: VertInf): VertInf; vert1(): VertInf; vert2(): VertInf; setDist(dist: number): void; private makeActive; private makeInactive; destroy(): void; rotationLessThan(lastV: VertInf | null, rhs: EdgeInf): boolean; } declare class EdgeList { private _firstEdge; private _lastEdge; private _count; constructor(); size(): number; begin(): EdgeInf | null; addEdge(edge: EdgeInf): void; removeEdge(edge: EdgeInf): void; clear(): void; values(): IterableIterator; [Symbol.iterator](): IterableIterator; } //#endregion //#region src/vertex.d.ts interface ANode {} interface VertInfRoles { isConnPoint?: boolean; isOrthShapeEdge?: boolean; isJunctionCentre?: boolean; isConnCheckpoint?: boolean; isDimensionChangePartner?: boolean; } declare class VertInf { objID: number; vn: number; readonly _seq: number; point: Point; isConnPoint: boolean; isOrthShapeEdge: boolean; isJunctionCentre: boolean; isConnCheckpoint: boolean; isDimensionChangePartner: boolean; lstPrev: VertInf | null; lstNext: VertInf | null; shPrev: VertInf | null; shNext: VertInf | null; orthogVisList: EdgeInf[]; pathNext: VertInf | null; aStarDoneNodes: ANode[]; aStarPendingNodes: ANode[]; orthogonalPartner: VertInf | null; _treeRootBox: { value: VertInf | null; } | null; _sptfRoot: VertInf | null; sptfDist: number; visDirections: Direction; orthogVisPropFlags: number; constructor(objID: number, vn: number, point: Point, roles?: VertInfRoles); private applyRoles; static compare(a: VertInf, b: VertInf): number; removeFromGraph(_isConnVert?: boolean): void; directionFrom(other: VertInf): Direction; setVisibleDirections(directions: Direction): void; pathLeadsBackTo(start: VertInf): number; hasNeighbour(target: VertInf): EdgeInf | null; makeTreeRootPointer(root: VertInf): { value: VertInf | null; }; treeRoot(): VertInf | null; treeRootPointer(): { value: VertInf | null; } | null; setTreeRootPointer(pointer: { value: VertInf | null; } | null): void; } declare class VertInfList { private _firstShapeVert; private _firstConnVert; private _lastShapeVert; private _lastConnVert; constructor(); addVertex(vert: VertInf): void; removeVertex(vert: VertInf | null): VertInf | null; shapesBegin(): VertInf | null; connsBegin(): VertInf | null; end(): null; [Symbol.iterator](): IterableIterator; conns(): IterableIterator; shapes(): IterableIterator; } //#endregion //#region src/models/Checkpoint.d.ts declare class Checkpoint { point: Point; arrivalDirections: Direction; departureDirections: Direction; constructor(point: Point, arrivalDirections?: Direction, departureDirections?: Direction); } //#endregion //#region src/models/obstacle.d.ts declare class Obstacle { readonly router: Router; readonly polygon: Rect; constructor(router: Router, poly: Rect); routingBox(): Box; routingPolygon(bufferSpace: number): Rect; } //#endregion //#region src/models/junction.d.ts declare class Junction { readonly router: Router; readonly centreVertex: VertInf; readonly attachedEdges: Set; userData: UserData | null; readonly positionFixed: boolean; /** @internal */ _obstacle: Obstacle | null; private _position; constructor(router: Router, position: Point, fixed?: boolean, userData?: UserData | null); position(): Point; _setPosition(position: Point): void; static makeRectangle(router: Router, position: Point): Rect; } //#endregion //#region src/models/edge.d.ts declare class Edge { readonly router: Router; readonly userData: UserData | null; _id: number; private _needsRerouteFlag; private _hateCrossings; _route: Polygon; private _srcVert; private _dstVert; private _src; private _dst; private _checkpoints; private _checkpointVertices; get srcJunction(): Junction | null; get dstJunction(): Junction | null; get source(): Junction | Endpoint; get destination(): Junction | Endpoint; constructor(router: Router, src: Endpoint | Junction, dst: Endpoint | Junction, userData?: UserData | null); reverseRoute(): void; displayRoute(): Polygon; endpointAnchors(): [Junction | null, Junction | null]; setRoutingCheckpoints(checkpoints: Checkpoint[]): void; routingCheckpoints(): Checkpoint[]; setHateCrossings(val: boolean): void; doesHateCrossings(): boolean; set_route(route: Polygon): void; /** @internal */ freeRoutes(): void; generatePath(): boolean; /** @internal */ src(): VertInf; /** @internal */ dst(): VertInf; /** @internal */ makePathInvalid(): void; /** @internal */ private updateEndPoint; /** @internal */ generateStandardPath(path: Point[], vertices: VertInf[]): void; /** @internal */ generateCheckpointsPath(path: Point[], vertices: VertInf[]): void; } //#endregion //#region src/hyperedge.d.ts type Hyperedge = { type: 'terminals'; connEnds: (Endpoint | Junction)[]; } | { type: 'invalid'; }; type HyperedgeEntry = { hyperedge: Hyperedge; deletedEdges: Set; terminalVertices: Set; }; declare class HyperedgeRerouter { router: Router; hyperedges: HyperedgeEntry[]; addedVertices: VertInf[]; constructor(router: Router, hyperedges: Hyperedge[]); count(): number; calcHyperedgeConnectors(): { edges: Set; addedVertices: VertInf[]; }; /** @internal */ private findExistingConnectorsForTerminals; /** @internal */ performRerouting(): void; } //#endregion //#region src/models/annotation-group.d.ts declare class AnnotationGroup { readonly router: Router; readonly polygon: Rect; constructor(router: Router, poly: Rect); bounds(): Box; bufferDistance(): number; trackPoints(): Point[]; contains(p: Point): boolean; crossings(a: Point, b: Point): number; interiorLength(a: Point, b: Point): number; } //#endregion //#region src/router.d.ts type RoutingParams = { segmentPenalty: number; crossingPenalty: number; fixedSharedPathPenalty: number; portDirectionPenalty: number; shapeBufferDistance: number; idealNudgingDistance: number; reverseDirectionPenalty: number; groupCrossingPenalty: number; groupInteriorCost: number; groupBufferDistance?: number; }; type RoutingOptions = { nudgeOrthogonalSegmentsConnectedToShapes: boolean; improveHyperedgeRoutesMovingJunctions: boolean; penaliseOrthogonalSharedPathsAtConnEnds: boolean; nudgeOrthogonalTouchingColinearSegments: boolean; performUnifyingNudgingPreprocessingStep: boolean; improveHyperedgeRoutesMovingAddingAndDeletingJunctions: boolean; nudgeSharedPathsWithCommonEndPoint: boolean; }; declare class Router { junctions: Set>; obstacles: Obstacle[]; groups: AnnotationGroup[]; connRefs: Edge[]; visOrthogGraph: EdgeList; vertices: VertInfList; params: RoutingParams; options: RoutingOptions; hyperedgesForRerouting: Hyperedge[]; private _nextObjectId; private m_in_crossing_rerouting_stage; constructor(params?: Partial, options?: Partial); /** @internal */ _assignObjectId(): number; createObstacle(rect: Rect): Obstacle; addObstacle(obstacle: Obstacle): void; deleteObstacle(obstacle: Obstacle): void; createGroup(rect: Rect): AnnotationGroup; addGroup(group: AnnotationGroup): void; deleteGroup(group: AnnotationGroup): void; addJunction(junction: Junction): void; addConnector(connector: Edge): void; deleteConnector(connector: Edge): void; isInCrossingPenaltyReroutingStage(): boolean; /** @internal */ _setInCrossingPenaltyReroutingStage(active: boolean): void; registerHyperedgeForRerouting(hyperedge: Hyperedge): void; route(): { anyChange: boolean; hyperedgeRerouter: HyperedgeRerouter | null; }; } //#endregion //#region src/utilities/print.d.ts declare function print(router: Router): string; //#endregion export { AnnotationGroup, Checkpoint, Direction, Edge, Endpoint, Junction, Point, Rect, Router, print }; //# sourceMappingURL=index.d.mts.map