public interface Graph
Modifier and Type | Method and Description |
---|---|
java.util.Collection<Edge> |
getEdges()
Return an unmodifiable view of all edges in this graph.
|
java.util.Collection<Vertex<? extends Oplet<?,?>,?,?>> |
getVertices()
Return an unmodifiable view of all vertices in this graph.
|
<N extends Oplet<C,P>,C,P> |
insert(N oplet,
int inputs,
int outputs)
Add a new unconnected
Vertex into the graph. |
void |
peekAll(Supplier<? extends Peek<?>> supplier,
Predicate<Vertex<?,?,?>> select)
Insert Peek oplets returned by the specified
Supplier into
the outputs of all of the oplets which satisfy the specified
Predicate and where the output's Connector.isConnected()
is true. |
<N extends Oplet<C,P>,C,P> |
pipe(Connector<C> output,
N oplet)
|
<N extends Source<P>,P> |
source(N oplet)
|
<N extends Oplet<C,P>,C,P> Vertex<N,C,P> insert(N oplet, int inputs, int outputs)
Vertex
into the graph.
N
- an Oplet typeC
- tuple type of input streamsP
- tuple type of output streamsoplet
- the oplet to associate with the new vertexinputs
- the number of input connectors for the new vertexoutputs
- the number of output connectors for the new vertexVertex
for the oplet<N extends Source<P>,P> Connector<P> source(N oplet)
Vertex
associated with the
specified source Oplet
.
The Vertex
for the oplet has 0 input connectors and one output connector.
N
- a Source typeP
- tuple typeoplet
- the source oplet<N extends Oplet<C,P>,C,P> Connector<P> pipe(Connector<C> output, N oplet)
Vertex
associated with the
specified Oplet
.
The new Vertex
has one input and one output Connector
.
An Edge
is created connecting the specified output connector to
the new vertice's input connector.
N
- an Oplet typeC
- tuple type of input streamsP
- tuple type of output streamsoutput
- the output connector to connect to the vertice's input connectoroplet
- the oplet to associate with the new Vertex
Vertex
void peekAll(Supplier<? extends Peek<?>> supplier, Predicate<Vertex<?,?,?>> select)
Supplier
into
the outputs of all of the oplets which satisfy the specified
Predicate
and where the output's Connector.isConnected()
is true.supplier
- Function which provides a Peek oplet to insertselect
- Vertex selection Predicatejava.util.Collection<Vertex<? extends Oplet<?,?>,?,?>> getVertices()
java.util.Collection<Edge> getEdges()
Copyright © 2016 The Apache Software Foundation. All Rights Reserved - bbe71fa-20161201-1641