interface EdgeValuedGraphBase.NonEmpty<N,V,Tp>
undocumented
Extends: Streamable.NonEmpty<T>
, EdgeValuedGraphBase<N,V,Tp>
, ValuedGraphBase.NonEmpty<N,V,Tp>
Implemented by: EdgeValuedGraphHashed.NonEmpty<N,V>
, EdgeValuedGraph.NonEmpty<N,V>
, EdgeValuedGraphSorted.NonEmpty<N,V>
Type parameters
Name | Constraints | Default | Description |
---|---|---|---|
N | undocumented | ||
V | undocumented | ||
Tp | EdgeValuedGraphBase.Types | EdgeValuedGraphBase.Types | undocumented |
Properties
connectionSize
Returns the amount of connections in the graph.
connectionSize
context
Returns the context
associated to this collection instance.
context
context
associated to this collection instance.isDirected
Returns false since this is an edge (undirected) graph instance.
isDirected
isEmpty
Returns false since the graph is known to be non-empty.
isEmpty
linkMap
Returns the nested non-empty Map representation of the graph connections.
linkMap
nodeSize
Returns the amount of nodes in the graph.
nodeSize
Methods
[Symbol.iterator]
Returns a FastIterator
instance used to iterate over the values of this Iterable
.
[Symbol.iterator]
FastIterator
instance used to iterate over the values of this Iterable
.addNode
Returns the graph with the given node
added, if it was not yet present.
addNode
node
added, if it was not yet present.addNodes
Returns the non-empty graph with the nodes from the given nodes
StreamSource
added.
addNodes
nodes
StreamSource
added.asNormal
Returns this collection typed as a 'possibly empty' collection.
asNormal
assumeNonEmpty
Returns the collection as a .NonEmpty type
assumeNonEmpty
connect
Returns the graph where given nodes node1
and node2
are connected with the given value
.
connect
node1
and node2
are connected with the given value
.connectAll
Returns the non-empty graph with the connections from the given connections
StreamSource
added.
connectAll
connections
StreamSource
added.disconnect
Returns the graph with the connection between given node1
and node2
removed if it exists.
disconnect
node1
and node2
removed if it exists.disconnectAll
Returns the graph with all connections in given links
removed if they exist.
disconnectAll
links
removed if they exist.forEach
Performs given function f
for each entry of the collection, using given state
as initial traversal state.
forEach
f
for each entry of the collection, using given state
as initial traversal state.getConnectionsFrom
Returns a Map containing the nodes and connection values reachable from given node1
node as keys, and their corresponding values.
getConnectionsFrom
node1
node as keys, and their corresponding values.getConnectionStreamFrom
Returns a Stream
containing all the connetions from the given node1
getConnectionStreamFrom
Stream
containing all the connetions from the given node1
getConnectionStreamTo
Returns a Stream
containing all the connetions to the given node2
getConnectionStreamTo
Stream
containing all the connetions to the given node2
getValue
Returns the value of the connection between given node1
and node2
getValue
node1
and node2
hasConnection
Returns true if the graph has a connection between given node1
and node2
.
hasConnection
node1
and node2
.hasNode
Returns true if the graph contains the given node
.
hasNode
node
.mapValues
Returns a non-empty graph with the same connections, but where the given mapFun
function is applied to each connection value.
mapValues
mapFun
function is applied to each connection value.modifyAt
Returns the graph with the connection between given node1
and node2
modified according to given options
.
modifyAt
node1
and node2
modified according to given options
.nonEmpty
Returns true since this collection is known to be non-empty
nonEmpty
removeNode
Returns the graph with the given node
and all its connections removed.
removeNode
node
and all its connections removed.removeNodes
Returns the graph with all nodes in given nodes
stream removed, together with all their connections.
removeNodes
nodes
stream removed, together with all their connections.removeUnconnectedNodes
Returns the graph with all isolated nodes removed.
removeUnconnectedNodes
stream
Returns a non-empty Stream containing all entries of this collection as tuples of key and value.
stream
streamConnections
Returns a Stream
containing all connections of this collection.
streamConnections
Stream
containing all connections of this collection.streamNodes
Returns a non-empty Stream
containing all nodes of this collection.
streamNodes
Stream
containing all nodes of this collection.toBuilder
Returns a builder object containing the entries of this collection.
toBuilder
toJSON
Returns a JSON representation of this collection.
toJSON
toString
Returns a string representation of this collection.
toString