Skip to content
本页目录

Class: Edge

边 (图系统范畴内)

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new Edge(from, to)

Parameters

NameType
fromVertext
toVertext

Properties

from

from: Vertext


id

id: number


object

object: any


to

to: Vertext


weight

weight: number

Methods

isAdjacent

isAdjacent(edge): boolean

是否和指定边邻接

Parameters

NameType
edgeEdge

Returns

boolean


isLoop

isLoop(): boolean

是否自环(Loop):若一条边的两个顶点为同一顶点,则此边称作自环。

Returns

boolean