Class: Edge
边 (图系统范畴内)
Table of contents
Constructors
Properties
Methods
Constructors
constructor
new Edge(from
, to
)
Parameters
Name | Type |
---|---|
from | Vertext |
to | Vertext |
Properties
from
from: Vertext
id
id: number
object
object: any
to
to: Vertext
weight
weight: number
= 0
Methods
isAdjacent
isAdjacent(edge
): boolean
是否和指定边邻接
Parameters
Name | Type |
---|---|
edge | Edge |
Returns
boolean
isLoop
isLoop(): boolean
是否自环(Loop):若一条边的两个顶点为同一顶点,则此边称作自环。
Returns
boolean