Base template trait for graphs.
This trait provides the common structure and base operations for immutable graphs independently of their representation. Base operations also cover one-step traversals. For unlimited traversals see trait GraphTraversal
.
Users of Graph usually don't interact directly with this trait but with trait Graph
instead which inherits the functionality provided by this trait.
If E
inherits DirectedEdgeLike
the graph is directed, otherwise it is undirected or mixed.
Type parameters
- E
-
the kind of the edges (links) in this graph.
- N
-
the user type of the nodes (vertices) in this graph.
Attributes
- Companion
- object
- Graph
-
- Supertypes
-
trait Serializableclass Objecttrait Matchableclass AnyShow all
- Known subtypes
-
Show all
- Self type
-
Members list
Type members
Classlikes
Attributes
- Companion
- trait
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
BaseInnerEdge.type
Attributes
- Supertypes
- Known subtypes
-
trait GraphInnerNodeclass InnerNodeImplclass InnerNodeImpltrait NodeBasetrait GraphLikeInnerNodetrait TraverserInnerNodetrait InnerNodeTraversalImplShow all
Ordering for the path dependent type EdgeT.
Ordering for the path dependent type EdgeT.
Attributes
- Companion
- trait
- Supertypes
-
trait Serializableclass Objecttrait Matchableclass Any
- Self type
-
EdgeOrdering.type
Ordering for the path dependent type EdgeT.
Attributes
- Supertypes
-
trait Serializabletrait ExtSetMethods[EdgeT]trait FilterableSet[EdgeT]trait Equalstrait IterableOnce[EdgeT]class Objecttrait Matchableclass AnyShow all
- Known subtypes
-
trait GraphEdgeSettrait AdjacencyListBaseEdgeSetclass AdjacencyListEdgeSetclass AdjacencyListEdgeSettrait GraphLikeEdgeSet
The empty ElemOrdering.
The empty ElemOrdering.
Attributes
- Supertypes
-
trait Serializableclass Objecttrait Matchableclass Any
- Self type
-
NoOrdering.type
Attributes
- Companion
- object
- Supertypes
-
trait Serializableclass Objecttrait Matchableclass Any
- Known subtypes
-
trait BaseInnerNodetrait GraphInnerNodeclass InnerNodeImplclass InnerNodeImpltrait NodeBasetrait GraphLikeInnerNodetrait TraverserInnerNodetrait InnerNodeTraversalImplShow all
Attributes
- Companion
- trait
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
NodeOrdering.type
Ordering for the path dependent type NodeT.
Attributes
- Supertypes
-
trait ExtSetMethods[NodeT]trait FilterableSet[NodeT]trait Equalstrait IterableOnce[NodeT]class Objecttrait Matchableclass AnyShow all
- Known subtypes
-
trait GraphNodeSettrait AdjacencyListBaseNodeSetclass AdjacencyListNodeSetclass AdjacencyListNodeSettrait GraphLikeNodeSet
Inherited classlikes
Attributes
- Inherited from:
- GraphOps
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Inherited from:
- GraphOps
- Supertypes
- Known subtypes
-
trait BaseInnerEdgetrait GraphInnerEdge
Attributes
- Inherited from:
- GraphOps
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
trait InnerEdgetrait BaseInnerEdgetrait GraphInnerEdgetrait InnerNodetrait BaseInnerNodetrait GraphInnerNodeclass InnerNodeImplclass InnerNodeImpltrait NodeBasetrait GraphLikeInnerNodetrait TraverserInnerNodetrait InnerNodeTraversalImplShow all
Attributes
- Inherited from:
- GraphOps
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Inherited from:
- GraphOps
- Supertypes
- Known subtypes
-
trait BaseInnerNodetrait GraphInnerNodeclass InnerNodeImplclass InnerNodeImpltrait NodeBasetrait GraphLikeInnerNodetrait TraverserInnerNodetrait InnerNodeTraversalImplShow all
To be mixed in by edge classes to allow passing them to Graph(...)
.
To be mixed in by edge classes to allow passing them to Graph(...)
.
Attributes
- Inherited from:
- OuterElems
- Supertypes
Attributes
- Inherited from:
- OuterElems
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
Wraps any type to be accepted when calling Graph(...)
.
Wraps any type to be accepted when calling Graph(...)
.
Attributes
- Inherited from:
- OuterElems
- Supertypes
Types
Value members
Abstract methods
The edge set of this Graph
commonly referred to as E(G).
The edge set of this Graph
commonly referred to as E(G).
Attributes
- Returns
-
Set of all contained edges.
Concrete methods
true
if f
is not equivalent to anyEdge
.
true
if f
is not equivalent to anyEdge
.
Attributes
true
if f
is not equivalent to anyNode
.
true
if f
is not equivalent to anyNode
.
Attributes
The order - commonly referred to as |G| - of this graph equaling to the number of nodes.
The order - commonly referred to as |G| - of this graph equaling to the number of nodes.
Attributes
The size - commonly referred to as |E| - of this graph equaling to the number of edges.
The size - commonly referred to as |E| - of this graph equaling to the number of edges.
Attributes
The Sum of the weight of all edges.
The Sum of the weight of all edges.
Attributes
Inherited methods
Alias for intersect
.
Alias for diff
.
Alias for concat(edges)
.
Alias for concat(isolatedNodes, edges)
.
Whether the given edge is contained in this graph.
Whether the given node is contained in this graph.
Same as concat(isolatedNodes, edges)
but with empty isolatedNodes
. This method is useful if you don't need to pass any isolated node.
Same as concat(isolatedNodes, edges)
but with empty isolatedNodes
. This method is useful if you don't need to pass any isolated node.
Attributes
- Inherited from:
- GraphOps
Computes a new graph that is the difference of this graph and that
graph.
Computes a new graph that is the difference of this graph and that
graph.
Attributes
- Inherited from:
- GraphOps
The number of nodes and edges.
Computes a new graph without nodes satisfying nodeP
and without edges satisfying ePred
. If both nodeP
and ePred
have default values the original graph is retained.
Computes a new graph without nodes satisfying nodeP
and without edges satisfying ePred
. If both nodeP
and ePred
have default values the original graph is retained.
Attributes
- Inherited from:
- GraphOps
Creates a new graph with nodes and edges returned by fNode
respectively fEdge
.
Creates a new graph with nodes and edges returned by fNode
respectively fEdge
.
See overload except the parameter
Value parameters
- fEdge
-
has a simplified signature in this overload leaving out the inner edge. This comes in handy whenever you don't need to inspect inner edges.
Attributes
- Inherited from:
- GraphOps
Creates a new graph with nodes and edges returned by fNode
respectively fEdge
.
Creates a new graph with nodes and edges returned by fNode
respectively fEdge
.
You can call this flavor only if this graph's edge type is typed. Otherwise see flatMap
.
See overload except the parameter
Value parameters
- fEdge
-
has a simplified signature in this overload leaving out the inner edge. This comes in handy whenever you don't need to inspect inner edges.
Attributes
- Inherited from:
- GraphOps
Creates a new graph with nodes and edges returned by fNode
respectively fEdge
.
Creates a new graph with nodes and edges returned by fNode
respectively fEdge
.
You can call this flavor only if this graph's edge type is generic. Otherwise see flatMapDiHyperBound
.
See overload except the parameter
Value parameters
- fDiHyperEdge
-
has a simplified signature in this overload leaving out the inner edge. This comes in handy whenever you don't need to inspect inner edges.
Attributes
- Inherited from:
- GraphOps
Creates a new graph with nodes and edges returned by fNode
respectively fEdge
.
Creates a new graph with nodes and edges returned by fNode
respectively fEdge
.
You can call this flavor only if this graph's edge type is typed. Otherwise see flatMapDiHyper
.
See overload except the parameter
Value parameters
- fDiHyperEdge
-
has a simplified signature in this overload leaving out the inner edge. This comes in handy whenever you don't need to inspect inner edges.
Attributes
- Inherited from:
- GraphOps
Creates a new graph with nodes and edges returned by fNode
respectively fEdge
.
Creates a new graph with nodes and edges returned by fNode
respectively fEdge
.
You can call this flavor only if this graph's edge type is generic. Otherwise see flatMapHyperBound
.
See overload except the parameter
Value parameters
- fHyperEdge
-
has a simplified signature in this overload leaving out the inner edge. This comes in handy whenever you don't need to inspect inner edges.
Attributes
- Inherited from:
- GraphOps
Creates a new graph with nodes and edges returned by fNode
respectively fEdge
.
Creates a new graph with nodes and edges returned by fNode
respectively fEdge
.
You can call this flavor only if this graph's edge type is typed. Otherwise see flatMapHyper
.
See overload except the parameter
Value parameters
- fHyperEdge
-
has a simplified signature in this overload leaving out the inner edge. This comes in handy whenever you don't need to inspect inner edges.
Attributes
- Inherited from:
- GraphOps
Same as foldLeft
except the second parameter of the binary operators.
Same as foldLeft
except the second parameter of the binary operators.
Value parameters
- opEdge
-
the binary operator that is passed the cumulated value and an outer edge.
- opNode
-
the binary operator that is passed the cumulated value and an outer node.
Attributes
- Inherited from:
- GraphOps
Computes the intersection between this graph and that
graph.
Whether this graph contains any node or any edge.
true
if this graph has at most 1 node.
Creates a new graph with nodes and edges that are computed by the supplied mapping functions.
Creates a new graph with nodes and edges that are computed by the supplied mapping functions.
See overload except the parameter
Value parameters
- fEdge
-
has a simplified signature in this overload leaving out the inner edge. This comes in handy whenever you don't need to inspect inner edges.
Attributes
- Inherited from:
- GraphOps
Creates a new graph with nodes and edges that are computed by the supplied mapping functions.
Creates a new graph with nodes and edges that are computed by the supplied mapping functions.
See overload except the parameter
Value parameters
- fEdge
-
has a simplified signature in this overload leaving out the inner edge. This comes in handy whenever you don't need to inspect inner edges.
Attributes
- Inherited from:
- GraphOps
Creates a new graph with nodes and edges that are computed by the supplied mapping functions.
Creates a new graph with nodes and edges that are computed by the supplied mapping functions.
You can call this flavor only if this graph's edge type is generic. Otherwise see mapDiHyperBound
.
See overload except the parameter
Value parameters
- fDiHyperEdge
-
has a simplified signature in this overload leaving out the inner edge. This comes in handy whenever you don't need to inspect inner edges.
Attributes
- Inherited from:
- GraphOps
Creates a new graph with nodes and edges that are computed by the supplied mapping functions.
Creates a new graph with nodes and edges that are computed by the supplied mapping functions.
You can call this flavor only if this graph's edge type is typed. Otherwise see mapDiHyper
.
See overload except the parameter
Value parameters
- fDiHyperEdge
-
has a simplified signature in this overload leaving out the inner edge. This comes in handy whenever you don't need to inspect inner edges.
Attributes
- Inherited from:
- GraphOps
Creates a new graph with nodes and edges that are computed by the supplied mapping functions.
Creates a new graph with nodes and edges that are computed by the supplied mapping functions.
You can call this flavor only if this graph's edge type is generic. Otherwise see mapHyperBound
.
See overload except the parameter
Value parameters
- fHyperEdge
-
has a simplified signature in this overload leaving out the inner edge. This comes in handy whenever you don't need to inspect inner edges.
Attributes
- Inherited from:
- GraphOps
Creates a new graph with nodes and edges that are computed by the supplied mapping functions.
Creates a new graph with nodes and edges that are computed by the supplied mapping functions.
You can call this flavor only if this graph's edge type is typed. Otherwise see mapHyper
.
See overload except the parameter
Value parameters
- fHyperEdge
-
has a simplified signature in this overload leaving out the inner edge. This comes in handy whenever you don't need to inspect inner edges.
Attributes
- Inherited from:
- GraphOps
true
if this graph has at least 2 nodes.
Computes the union between this graph and that
graph.
Inherited and Abstract methods
Creates a new graph by adding all edges
and isolatedNodes
omitting duplicates. The new graph is upcasted if any of the arguments is an upcast of N
respectively E
. Use union
to concatenate all nodes and edges of another graph.
Creates a new graph by adding all edges
and isolatedNodes
omitting duplicates. The new graph is upcasted if any of the arguments is an upcast of N
respectively E
. Use union
to concatenate all nodes and edges of another graph.
Value parameters
- edges
-
to be concatenated.
- isolatedNodes
-
to be concatenated. Nodes that are implicitly defined by any edge in
edges
will be ignored.
Attributes
- Inherited from:
- GraphOps
Whether the given outer edge is contained in this graph.
Whether the given outer node is contained in this graph.
Computes a new graph with nodes satisfying nodeP
and edges satisfying edgeP
. If both nodeP
and edgeP
have default values the original graph is retained.
Computes a new graph with nodes satisfying nodeP
and edges satisfying edgeP
. If both nodeP
and edgeP
have default values the original graph is retained.
Attributes
- Inherited from:
- GraphOps
Searches this graph for an inner edge that wraps an outer edge equalling to the given outer edge.
Searches this graph for an inner edge that wraps an outer edge equalling to the given outer edge.
Attributes
- Inherited from:
- GraphOps
Searches this graph for an inner node that wraps an outer node equalling to the given outer node.
Searches this graph for an inner node that wraps an outer node equalling to the given outer node.
Attributes
- Inherited from:
- GraphOps
Creates a new graph with nodes and edges returned by fNode
respectively fEdge
.
Creates a new graph with nodes and edges returned by fNode
respectively fEdge
.
You can call this flavor only if this graph's edge type is generic. Otherwise see flatMapBound
.
Type parameters
- EC
-
The higher kind of the generic edge type parameter of this graph.
- NN
-
The node type of the resulting graph which may be unchanged or different from this graph's node type.
Value parameters
- fEdge
-
To apply to all edges of this graph. This function is passed the current inner edge and its ends after being mapped by
fNode
. Since the inner edge is passed you can also examine its context. Callouter
to get the outer edge of type E. - fNode
-
To apply to all nodes of this graph. Since the inner node is passed you can also examine the node context. Call
outer
to get the value of typeN
of the node.
Attributes
- Returns
-
A new graph of possibly changed node and edge types and of any new structure depending on your edge mapper(s).
- Inherited from:
- GraphOps
Creates a new graph with nodes returned by fNode
and an edge structure that remains intact where possible.
Creates a new graph with nodes returned by fNode
and an edge structure that remains intact where possible.
You can call this flavor only if this graph's edge type is generic. Otherwise see flatMapBound
.
If this graph also contains typed edges, the typed edge's partial map
function will be called to replace the ends. If the partial function is not defined, there will be an attempt to fall back to a generic edge. If that attempt also fails the edge will be dropped. So, if you have a mixed graph with generic and typed edges, prefer mapping edges directly to avoid leaving edges out.
Type parameters
- EC
-
The higher kind of the generic edge type parameter of this graph.
- NN
-
The node type of the resulting graph which may be unchanged or different from this graph's node type.
Value parameters
- fNode
-
To apply to all nodes of this graph. Since the inner node is passed you can also examine the node context. Call
outer
to get the value of typeN
of the node. IffNode
returns several new nodes with none equaling to the original node, the first new node is accepted to be the result of the node transformation. For more flexibility pass your own edge mapper to the overload.
Attributes
- Returns
-
A new graph of possibly changed node and edge types and of any new structure depending on your edge mapper(s).
- Inherited from:
- GraphOps
Creates a new graph with nodes and edges returned by fNode
respectively fEdge
.
Creates a new graph with nodes and edges returned by fNode
respectively fEdge
.
You can call this flavor only if this graph's edge type is typed. Otherwise see flatMap
.
Type parameters
- EC
-
The edge type parameter of this graph.
- NN
-
The node type of the resulting graph which may be unchanged or different from this graph's node type.
Value parameters
- fEdge
-
To apply to all edges of this graph. This function is passed the current inner edge and its ends after being mapped by
fNode
. Since the inner edge is passed you can also examine its context. Callouter
to get the outer edge of type E. - fNode
-
To apply to all nodes of this graph. Since the inner node is passed you can also examine the node context. Call
outer
to get the value of typeN
of the node.
Attributes
- Returns
-
A new graph of possibly changed node and edge types and of any new structure depending on your edge mapper(s).
- Inherited from:
- GraphOps
Creates a new graph with nodes returned by fNode
and an edge structure that remains intact where possible.
Creates a new graph with nodes returned by fNode
and an edge structure that remains intact where possible.
You can call this flavor only if this graph's edge type is typed. Otherwise see flatMap
.
Value parameters
- fNode
-
To apply to all nodes of this graph. Since the inner node is passed you can also examine the node context. Call
outer
to get the value of typeN
of the node. IffNode
returns several new nodes with none equaling to the original node, the first new node is accepted to be the result of the node transformation. For more flexibility pass your own edge mapper to the overload.
Attributes
- Inherited from:
- GraphOps
Creates a new graph with nodes and edges returned by fNode
respectively fEdge
.
Creates a new graph with nodes and edges returned by fNode
respectively fEdge
.
You can call this flavor only if this graph's edge type is generic. Otherwise see flatMapDiHyperBound
.
Type parameters
- EC
-
The higher kind of the generic edge type parameter of this graph.
- NN
-
The node type of the resulting graph which may be unchanged or different from this graph's node type.
Value parameters
- fDiHyperEdge
-
To apply to all directed hyperedges in this graph. This function is passed the existing inner directed hyperedge and its sources and targets after being mapped by
fNode
. Since the inner directed hyperedge is passed you can also examine the edge context. Callouter
to get the outer directed hyperedge of type E. - fEdge
-
To apply to any directed or undirected edge in this possibly mixed graph. If not present simple edges will be mapped by the mandatory edge mapper you supply. You are recommended supplying
Some
unless you know that the graph does not contain any simple edge. - fNode
-
To apply to all nodes of this graph. Since the inner node is passed you can also examine the node context. Call
outer
to get the value of typeN
of the node.
Attributes
- Returns
-
A new graph of possibly changed node and edge types and of any new structure depending on your edge mapper(s).
- Inherited from:
- GraphOps
Creates a new graph with nodes and edges returned by fNode
respectively fEdge
.
Creates a new graph with nodes and edges returned by fNode
respectively fEdge
.
You can call this flavor only if this graph's edge type is typed. Otherwise see flatMapDiHyper
.
Type parameters
- EC
-
The edge type parameter of this graph.
- NN
-
The node type of the resulting graph which may be unchanged or different from this graph's node type.
Value parameters
- fDiHyperEdge
-
To apply to all directed hyperedges in this graph. This function is passed the existing inner directed hyperedge and its sources and targets after being mapped by
fNode
. Since the inner directed hyperedge is passed you can also examine the edge context. Callouter
to get the outer directed hyperedge of type E. - fEdge
-
To apply to any directed or undirected edge in this possibly mixed graph. If not present simple edges will be mapped by the mandatory edge mapper you supply. You are recommended supplying
Some
unless you know that the graph does not contain any simple edge. - fNode
-
To apply to all nodes of this graph. Since the inner node is passed you can also examine the node context. Call
outer
to get the value of typeN
of the node.
Attributes
- Returns
-
A new graph of possibly changed node and edge types and of any new structure depending on your edge mapper(s).
- Inherited from:
- GraphOps
Creates a new graph with nodes and edges returned by fNode
respectively fEdge
.
Creates a new graph with nodes and edges returned by fNode
respectively fEdge
.
You can call this flavor only if this graph's edge type is generic. Otherwise see flatMapHyperBound
.
Type parameters
- EC
-
The higher kind of the generic edge type parameter of this graph.
- NN
-
The node type of the resulting graph which may be unchanged or different from this graph's node type.
Value parameters
- fDiHyperEdge
-
To apply to any directed hyperedge in this possibly mixed graph. If not present directed hyperedges will be mapped by the mandatory
fDiHyperEdge
. You are recommended supplyingSome
unless you know that the graph does not contain any directed hyperedge. - fEdge
-
To apply to any directed or undirected edge in this possibly mixed graph. If not present simple edges will be mapped by the mandatory edge mapper you supply. You are recommended supplying
Some
unless you know that the graph does not contain any simple edge. - fHyperEdge
-
To apply to all hyperedges in this graph. This function is passed the current inner hyperedge and its ends after being mapped by
fNode
. Since the inner hyperedge is passed you can also examine its context. Callouter
to get the outer hyperedge of type E. - fNode
-
To apply to all nodes of this graph. Since the inner node is passed you can also examine the node context. Call
outer
to get the value of typeN
of the node.
Attributes
- Returns
-
A new graph of possibly changed node and edge types and of any new structure depending on your edge mapper(s).
- Inherited from:
- GraphOps
Creates a new graph with nodes and edges returned by fNode
respectively fEdge
.
Creates a new graph with nodes and edges returned by fNode
respectively fEdge
.
You can call this flavor only if this graph's edge type is typed. Otherwise see flatMapHyper
.
Type parameters
- EC
-
The edge type parameter of this graph.
- NN
-
The node type of the resulting graph which may be unchanged or different from this graph's node type.
Value parameters
- fDiHyperEdge
-
To apply to any directed hyperedge in this possibly mixed graph. If not present directed hyperedges will be mapped by the mandatory
fDiHyperEdge
. You are recommended supplyingSome
unless you know that the graph does not contain any directed hyperedge. - fEdge
-
To apply to any directed or undirected edge in this possibly mixed graph. If not present simple edges will be mapped by the mandatory edge mapper you supply. You are recommended supplying
Some
unless you know that the graph does not contain any simple edge. - fHyperEdge
-
To apply to all hyperedges in this graph. This function is passed the current inner hyperedge and its ends after being mapped by
fNode
. Since the inner hyperedge is passed you can also examine its context. Callouter
to get the outer hyperedge of type E. - fNode
-
To apply to all nodes of this graph. Since the inner node is passed you can also examine the node context. Call
outer
to get the value of typeN
of the node.
Attributes
- Returns
-
A new graph of possibly changed node and edge types and of any new structure depending on your edge mapper(s).
- Inherited from:
- GraphOps
Applies a node-specific and an edge-specific binary operator to a cumulated value. First opNode
is called for all nodes than opEdge
for all edges.
Applies a node-specific and an edge-specific binary operator to a cumulated value. First opNode
is called for all nodes than opEdge
for all edges.
Type parameters
- B
-
the result type of the binary operator.
Value parameters
- opEdge
-
the binary operator that is passed the cumulated value and an inner edge.
- opNode
-
the binary operator that is passed the cumulated value and an inner node.
- z
-
the start value that is passed to
opNode
the first time.
Attributes
- Returns
-
the cumulated value.
- Inherited from:
- GraphOps
Short for find(edge).get
.
Short for find(edge).get
.
Attributes
- Throws
-
NoSuchElementException
if the edge is not found.
- Inherited from:
- GraphOps
Short for find(node).get
.
Short for find(node).get
.
Attributes
- Throws
-
NoSuchElementException
if the node is not found.
- Inherited from:
- GraphOps
Whether all edges of this graph are directed.
Whether this graph contains at least one hyperedge.
Whether this graph contains at least one directed and one undirected edge.
Whether this graph contains at least one directed and one undirected edge.
Attributes
- Inherited from:
- GraphOps
Whether this graph contains at least one multi-edge. We defnie multi-edges by a. two or more directed edges having the same source and target a. two or more undirected edges connecting the same nodes a. two or more (directed) hyperedges that, after being decomposed into (directed) edges, yield any multy-edge as stipulated above.
Whether this graph contains at least one multi-edge. We defnie multi-edges by a. two or more directed edges having the same source and target a. two or more undirected edges connecting the same nodes a. two or more (directed) hyperedges that, after being decomposed into (directed) edges, yield any multy-edge as stipulated above.
Attributes
- Inherited from:
- GraphOps
Iterator over all inner nodes and edges.
Creates a new graph with nodes and edges that are computed by the supplied mapping functions.
Creates a new graph with nodes and edges that are computed by the supplied mapping functions.
You can call this flavor only if this graph's edge type is generic. Otherwise see mapBound
.
Type parameters
- EC
-
The higher kind of the generic edge type parameter of this graph.
- NN
-
The node type of the resulting graph which may be unchanged or different from this graph's node type.
Value parameters
- fEdge
-
To apply to all edges of this graph. This function is passed the current inner edge and its ends after being mapped by
fNode
. Since the inner edge is passed you can also examine its context. Callouter
to get the outer edge of type E. - fNode
-
To apply to all nodes of this graph. Since the inner node is passed you can also examine the node context. Call
outer
to get the value of typeN
of the node.
Attributes
- Returns
-
The mapped graph with possibly changed node and edge type parameters.
- Inherited from:
- GraphOps
Creates a new graph with nodes mapped by fNode
and with an untouched edge structure otherwise.
Creates a new graph with nodes mapped by fNode
and with an untouched edge structure otherwise.
You can call this flavor only if this graph's edge type is generic. Otherwise see mapBound
.
If this graph also contains typed edges, the typed edge's partial map
function will be called to replace the ends. If the partial function is not defined, there will be an attempt to fall back to a generic edge. If that attempt also fails the edge will be dropped. So, if you have a mixed graph with generic and typed edges, prefer mapping edges directly to avoid leaving edges out.
Type parameters
- EC
-
The higher kind of the generic edge type parameter of this graph.
- NN
-
The node type of the resulting graph which may be unchanged or different from this graph's node type.
Value parameters
- fNode
-
To apply to all nodes of this graph. Since the inner node is passed you can also examine the node context. Call
outer
to get the value of typeN
of the node.
Attributes
- Returns
-
The mapped graph with possibly changed node and edge type parameters.
- Inherited from:
- GraphOps
Creates a new graph with nodes and edges that are computed by the supplied mapping functions.
Creates a new graph with nodes and edges that are computed by the supplied mapping functions.
You can call this flavor only if this graph's edge type is typed. Otherwise see map
.
Type parameters
- EC
-
The edge type parameter of this graph.
- NN
-
The node type of the resulting graph which may be unchanged or different from this graph's node type.
Value parameters
- fEdge
-
To apply to all edges of this graph. This function is passed the current inner edge and its ends after being mapped by
fNode
. Since the inner edge is passed you can also examine its context. Callouter
to get the outer edge of type E. - fNode
-
To apply to all nodes of this graph. Since the inner node is passed you can also examine the node context. Call
outer
to get the value of typeN
of the node.
Attributes
- Returns
-
The mapped graph with possibly changed node and edge type parameters.
- Inherited from:
- GraphOps
Creates a new graph with nodes mapped by fNode
and with an untouched edge structure otherwise.
Creates a new graph with nodes mapped by fNode
and with an untouched edge structure otherwise.
You can call this flavor only if this graph's edge type is typed. Otherwise see map
.
Value parameters
- fNode
-
To apply to all nodes of this graph. Since the inner node is passed you can also examine the node context. Call
outer
to get the value of typeN
of the node.
Attributes
- Returns
-
The mapped graph with possibly changed node and edge type parameters.
- Inherited from:
- GraphOps
Creates a new graph with nodes and edges that are computed by the supplied mapping functions.
Creates a new graph with nodes and edges that are computed by the supplied mapping functions.
You can call this flavor only if this graph's edge type is generic. Otherwise see mapDiHyperBound
.
Type parameters
- EC
-
The higher kind of the generic edge type parameter of this graph.
- NN
-
The node type of the resulting graph which may be unchanged or different from this graph's node type.
Value parameters
- fDiHyperEdge
-
To apply to all directed hyperedges in this graph. This function is passed the existing inner directed hyperedge and its sources and targets after being mapped by
fNode
. Since the inner directed hyperedge is passed you can also examine the edge context. Callouter
to get the outer directed hyperedge of type E. - fEdge
-
To apply to any directed or undirected edge in this possibly mixed graph. If not present simple edges will be mapped by the mandatory edge mapper you supply. You are recommended supplying
Some
unless you know that the graph does not contain any simple edge. - fNode
-
To apply to all nodes of this graph. Since the inner node is passed you can also examine the node context. Call
outer
to get the value of typeN
of the node.
Attributes
- Returns
-
The mapped graph with possibly changed node and edge type parameters.
- Inherited from:
- GraphOps
Creates a new graph with nodes and edges that are computed by the supplied mapping functions.
Creates a new graph with nodes and edges that are computed by the supplied mapping functions.
You can call this flavor only if this graph's edge type is typed. Otherwise see mapDiHyper
.
Type parameters
- EC
-
The edge type parameter of this graph.
- NN
-
The node type of the resulting graph which may be unchanged or different from this graph's node type.
Value parameters
- fDiHyperEdge
-
To apply to all directed hyperedges in this graph. This function is passed the existing inner directed hyperedge and its sources and targets after being mapped by
fNode
. Since the inner directed hyperedge is passed you can also examine the edge context. Callouter
to get the outer directed hyperedge of type E. - fEdge
-
To apply to any directed or undirected edge in this possibly mixed graph. If not present simple edges will be mapped by the mandatory edge mapper you supply. You are recommended supplying
Some
unless you know that the graph does not contain any simple edge. - fNode
-
To apply to all nodes of this graph. Since the inner node is passed you can also examine the node context. Call
outer
to get the value of typeN
of the node.
Attributes
- Returns
-
The mapped graph with possibly changed node and edge type parameters.
- Inherited from:
- GraphOps
Creates a new graph with nodes and edges that are computed by the supplied mapping functions.
Creates a new graph with nodes and edges that are computed by the supplied mapping functions.
You can call this flavor only if this graph's edge type is generic. Otherwise see mapHyperBound
.
Type parameters
- EC
-
The higher kind of the generic edge type parameter of this graph.
- NN
-
The node type of the resulting graph which may be unchanged or different from this graph's node type.
Value parameters
- fDiHyperEdge
-
To apply to any directed hyperedge in this possibly mixed graph. If not present directed hyperedges will be mapped by the mandatory
fDiHyperEdge
. You are recommended supplyingSome
unless you know that the graph does not contain any directed hyperedge. - fEdge
-
To apply to any directed or undirected edge in this possibly mixed graph. If not present simple edges will be mapped by the mandatory edge mapper you supply. You are recommended supplying
Some
unless you know that the graph does not contain any simple edge. - fHyperEdge
-
To apply to all hyperedges in this graph. This function is passed the current inner hyperedge and its ends after being mapped by
fNode
. Since the inner hyperedge is passed you can also examine its context. Callouter
to get the outer hyperedge of type E. - fNode
-
To apply to all nodes of this graph. Since the inner node is passed you can also examine the node context. Call
outer
to get the value of typeN
of the node.
Attributes
- Returns
-
The mapped graph with possibly changed node and edge type parameters.
- Inherited from:
- GraphOps
Creates a new graph with nodes and edges that are computed by the supplied mapping functions.
Creates a new graph with nodes and edges that are computed by the supplied mapping functions.
You can call this flavor only if this graph's edge type is typed. Otherwise see mapHyper
.
Type parameters
- EC
-
The edge type parameter of this graph.
- NN
-
The node type of the resulting graph which may be unchanged or different from this graph's node type.
Value parameters
- fDiHyperEdge
-
To apply to any directed hyperedge in this possibly mixed graph. If not present directed hyperedges will be mapped by the mandatory
fDiHyperEdge
. You are recommended supplyingSome
unless you know that the graph does not contain any directed hyperedge. - fEdge
-
To apply to any directed or undirected edge in this possibly mixed graph. If not present simple edges will be mapped by the mandatory edge mapper you supply. You are recommended supplying
Some
unless you know that the graph does not contain any simple edge. - fHyperEdge
-
To apply to all hyperedges in this graph. This function is passed the current inner hyperedge and its ends after being mapped by
fNode
. Since the inner hyperedge is passed you can also examine its context. Callouter
to get the outer hyperedge of type E. - fNode
-
To apply to all nodes of this graph. Since the inner node is passed you can also examine the node context. Call
outer
to get the value of typeN
of the node.
Attributes
- Returns
-
The mapped graph with possibly changed node and edge type parameters.
- Inherited from:
- GraphOps
Iterator over all inner nodes and edges.
Attributes
- Inherited from:
- GraphOps
Iterable over all nodes and edges.
Iterable over all nodes and edges.
Concrete fields
Default edge filter letting path all edges (non-filter).
Default edge filter letting path all edges (non-filter).
Attributes
Default node filter letting traverse all nodes (non-filter).
Default node filter letting traverse all nodes (non-filter).
Attributes
Edge predicate always returning false
.
Edge predicate always returning false
.
Attributes
Node predicate always returning false
.
Node predicate always returning false
.