GraphSymbol
public protocol GraphSymbol
The basic graph symbol protocol.
-
Symbol type.
Declaration
Swift
var symbolType: SymbolType
-
Unique ID for this symbol in a graph.
Note: This attribute is generated by Serrano. Usually, user should not touch this.
Declaration
Swift
var UID: String
-
Readable label for this symbol.
Declaration
Swift
var symbolLabel: String
-
Inbound list of
GraphSymbol
of this symbolDeclaration
Swift
var inBounds: [GraphSymbol]
-
Outbound list of
GraphSymbol
of this symbolDeclaration
Swift
var outBounds: [GraphSymbol]
-
generateOutputGraph(_:)
Default implementationGenerate a graph ending with this symbol from its
inBounds
information recursively.Default Implementation
Generate a
ComputationGraph
object according toinBounds
andoutBounds
information of this symbol. The generated graph ending with this symbol.Declaration
Swift
func generateOutputGraph(_ label: String?) -> Graph
-
Add new symbol to
inBounds
. Should check duplicate.Declaration
Swift
func addToInBound(_ symbol: GraphSymbol)
-
Add new symbol to
outBounds
Should check duplicate.Declaration
Swift
func addToOutBound(_ symbol: GraphSymbol)
-
Evaluate the symbol to get value. Returns maybe
nil
.Declaration
Swift
func evaluate() -> [DataSymbolSupportedDataType]?
Return Value
[DataSymbolSupportedDataType]