This repository has been archived by the owner on Oct 17, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 34
Graph
mattt edited this page Jan 7, 2021
·
12 revisions
@dynamicMemberLookup public struct Graph: Equatable
Equatable
Creates a graph.
public init(directed: Bool = false, strict: Bool = false)
- directed: Whether the graph is directed;
false by default
. - strict: Whether the graph is strict;
false
by default.
public init(directed: Bool = false, strict: Bool = false, _ builder: () -> GraphMember)
Whether the graph is directed.
var directed: Bool
Whether the graph is strict.
var strict: Bool
The id of the graph, is any.
var id: String? = nil
Subgraphs contained by the graph.
var subgraphs: [Subgraph] = []
Nodes contained by the graph.
var nodes: [Node] = []
Edges contained by the graph.
var edges: [Edge] = []
Returns whether the graph is empty.
var isEmpty: Bool
A graph is considered to be empty if it has no subgraphs, has no edges, has no nodes with attributes, and has no attributes itself.
var attributes: Attributes
public mutating func append(_ subgraph: Subgraph)
public mutating func append<S>(contentsOf subgraphs: S) where S.Element == Subgraph, S: Sequence
public mutating func append(_ node: Node)
public mutating func append<S>(contentsOf nodes: S) where S.Element == Node, S: Sequence
public mutating func append(_ edge: Edge)
public mutating func append<S>(contentsOf edges: S) where S.Element == Edge, S: Sequence
Renders the graph using the specified layout algorithm to the desired output format.
public func render(using layout: LayoutAlgorithm, to format: Format, with options: Renderer.Options = []) throws -> Data
- layout: The layout algorithm.
- format: The output format.
- options: The rendering options.
CocoaError
if the corresponding GraphViz tool isn't available.
Generated at 2021-01-07T20:25:50+0000 using swift-doc 1.0.0-beta.5.
Types
- AspectRatio
- Attribute
- Color
- Color.GradientStyle
- Color.Name
- DOTEncoder
- DOTEncoder.Delimiter
- Edge
- Edge.Arrow
- Edge.Arrow.Shape
- Edge.Arrow.Side
- Edge.Attributes
- Edge.Direction
- Edge.Port
- Edge.Style
- Error
- Format
- Graph
- Graph.Attributes
- Graph.ClusterMode
- Graph.FontNamingConvention
- Graph.InitialNodeLayoutStrategy
- Graph.LabelScheme
- Graph.Mode
- Graph.Orientation
- Graph.OutputOrder
- Graph.PackingMode
- Graph.PageDirection
- Graph.QuadtreeScheme
- Graph.RankDirection
- Graph.Smoothing
- Graph.Spline
- Graph.Viewport
- Graph.Viewport.Center
- GraphBuilder
- LayoutAlgorithm
- Location
- Node
- Node.Attributes
- Node.FixedSize
- Node.ImagePosition
- Node.Shape
- Node.Style
- Ordering
- Point
- Position
- Rectangle
- Renderer
- Renderer.Options
- Size
- Subgraph
- Subgraph.Attributes
- Subgraph.Rank
- Subgraph.Style
- SubgraphBuilder