Class BidirectionalGraph<T>
Constructors
constructor
-
Type parameters
Parameters
-
comparator: (a: T, b: T) => boolean = ...
-
-
Parameters
Returns boolean
Properties
Readonly map
map: Map<T, T[]> = ...
Accessors
numberOfVertices
- get numberOfVertices(): number
Methods
addVertex
- addVertex(...items: T[]): void
areConnected
- areConnected(itemA: T, itemB: T): boolean
-
Parameters
Returns boolean
connect
- connect(itemA: T, ...items: T[]): void
-
Parameters
-
itemA: T
-
Rest ...items: T[]
Returns void
disconnect
- disconnect(itemA: T, itemB: T): void
hasVertex
- hasVertex(item: T): boolean
-
Parameters
Returns boolean
removeDisconnectedVertices
- removeDisconnectedVertices(): void
removeVertex
- removeVertex(vertex: T, force?: boolean): void
-
Parameters
-
vertex: T
-
force: boolean = false
Returns void