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

Subgraph

mattt edited this page Jul 15, 2020 · 10 revisions

Subgraph

@dynamicMemberLookup public struct Subgraph: Hashable

Inheritance

Hashable

Nested Type Aliases

Fragment

typealias Fragment = SubgraphBuilder.Fragment

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)

append(_:)

private mutating func append(_ fragment: Fragment)

append(typeErased:)

private mutating func append(typeErased member: SubgraphMember)

Clone this wiki locally