Node Type

Functions operating on nodes

Constructors

Constructor Description

Node()

Full Usage: Node()

Returns: Node
Returns: Node

Static members

Static member Description

Node.addNode graph key data

Full Usage: Node.addNode graph key data

Parameters:
    graph : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>
    key : 'NodeKey
    data : 'NodeData

Returns: AdjGraph<'NodeKey, 'NodeData, 'EdgeData>

Adds node to graph [if node exists it is updated]

graph : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>
key : 'NodeKey
data : 'NodeData
Returns: AdjGraph<'NodeKey, 'NodeData, 'EdgeData>

Node.containsKey key graph

Full Usage: Node.containsKey key graph

Parameters:
    key : 'NodeKey
    graph : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>

Returns: bool
key : 'NodeKey
graph : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>
Returns: bool

Node.count graph

Full Usage: Node.count graph

Parameters:
    graph : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>

Returns: int

Counts all nodes

graph : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>
Returns: int

Node.iter action graph

Full Usage: Node.iter action graph

Parameters:
    action : 'NodeKey -> 'NodeData -> unit
    graph : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>

Applies the given function to each node of the graph

action : 'NodeKey -> 'NodeData -> unit
graph : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>

Node.iteri action graph

Full Usage: Node.iteri action graph

Parameters:
    action : int -> 'NodeKey -> 'NodeData -> unit
    graph : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>

Applies the given function to each node of the graph

action : int -> 'NodeKey -> 'NodeData -> unit
graph : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>

Node.map mapping graph

Full Usage: Node.map mapping graph

Parameters:
    mapping : 'NodeKey -> 'NodeData -> 'NodeKey * 'NodeData
    graph : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>

Returns: Dictionary<'NodeKey, ('NodeData * Dictionary<'NodeKey, 'EdgeData>)>

Builds a graph whose elements are the results of applying the given function to each of the node.

mapping : 'NodeKey -> 'NodeData -> 'NodeKey * 'NodeData
graph : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>
Returns: Dictionary<'NodeKey, ('NodeData * Dictionary<'NodeKey, 'EdgeData>)>

Node.removeNode g nk

Full Usage: Node.removeNode g nk

Parameters:
    g : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>
    nk : 'NodeKey

Returns: AdjGraph<'NodeKey, 'NodeData, 'EdgeData>
g : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>
nk : 'NodeKey
Returns: AdjGraph<'NodeKey, 'NodeData, 'EdgeData>

Node.toArray graph

Full Usage: Node.toArray graph

Parameters:
    graph : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>

Returns: AdjGraph<'a, 'b, 'c> -> ('a * 'b)[]

Converts nodes to nodeKey * nodeData array

graph : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>
Returns: AdjGraph<'a, 'b, 'c> -> ('a * 'b)[]