Skip to content
This repository has been archived by the owner on Oct 17, 2021. It is now read-only.

Subgraph

mattt edited this page Nov 16, 2020 · 10 revisions

Subgraph

@dynamicMemberLookup public struct Subgraph: Hashable

Inheritance

Hashable

Initializers

init(id:)

public init(id: String? = nil)

init(id:_:)

public init(id: String? = nil, _ builder: () -> SubgraphMember)

Properties

id

var id: String?

nodes

var nodes: [Node] = []

edges

var edges: [Edge] = []

attributes

var attributes: Attributes

isEmpty

Returns whether the subgraph is empty.

var isEmpty: Bool

A subgraph is considered to be empty if it has no edges, has no nodes with attributes, and has no attributes itself.

Methods

append(_:)

public mutating func append(_ node: @autoclosure () -> Node)

append(_:)

public mutating func append(_ edge: @autoclosure () -> Edge)
Clone this wiki locally