Node
public class Node : TaxonRepresenting, Hashable, CustomDebugStringConvertible
The Node type represents a particular taxon in the lineage tree and
holds references to both its parent and its children (if any).
-
The internal NCBI identifier for the node.
Declaration
Swift
public let identifier: TaxonID -
The scientific name of the node.
Declaration
Swift
public let name: String -
A common name for the node (or nil if not set).
Declaration
Swift
public var commonName: String? -
The node’s rank or nil if none.
Declaration
Swift
public let rank: TaxonomicRank? -
The node’s parent (more generic) node or nil for ‘origin’.
Declaration
Swift
public internal(set) weak var parent: LineageTree.Node? -
A set containing the node’s child (more specific) nodes.
Declaration
Swift
public internal(set) var children: Set<LineageTree.Node> -
Determines if the node is present in a given node’s lineage.
Declaration
Swift
public func isPresentInLineageOf(_ node: Node) -> BoolParameters
nodeThe node whose lineage will be tested.
Return Value
trueif this node is present in the passed node’s lineage orfalseinstead. If both nodes are equal, this function returnstrue. -
Two nodes are equal when they share the same taxon identifier.
Declaration
Swift
public static func == (lhs: LineageTree.Node, rhs: LineageTree.Node) -> Bool -
Declaration
Swift
public func hash(into hasher: inout Hasher) -
Declaration
Swift
public var debugDescription: String { get }
View on GitHub
Install in Dash
Node Class Reference