import { type ValuedGraphBase } from "https://deno.land/x/rimbu@1.0.3/graph/custom/index.ts";
const { Builder } = ValuedGraphBase;
Properties
Returns the context
associated to this collection instance.
Methods
Returns true if the graph has a connection between given nodes node1
and node2
.
Returns the value associated with the connection between node1
and node2
, or given otherwise
value if the key is not in the collection.
Adds the given node
to the graph.
Adds the given nodes
to the builder.
Adds the given element
graph element to the graph.
Adds the graph elements in the given elements
StreamSource to the graph.
Removes the given node
, and any of its connections, from the graph.
Removes the given nodes
, and any of their connections, from the graph.
Adds a connection between node1
and node2
to the graph with given value
.
Adds the connections in given connections
StreamSource
to the graph.
Modifies the graph at the connection between given node1
and node2
modified according to given options
.
Removes the connection between given node1
and node2
if the connection was present.
Removes all connections from the given connections
StreamSource
from the graph.
Returns an immutable graph containing the nodes and connections of this builder.