Java Code Examples for org.apache.flink.graph.Edge#reverse()
The following examples show how to use
org.apache.flink.graph.Edge#reverse() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TriangleEnumerator.java From Flink-CEPplus with Apache License 2.0 | 5 votes |
@Override public Edge<K, NullValue> map(Edge<K, NullValue> inEdge) throws Exception { // flip vertices if necessary if (inEdge.getSource().compareTo(inEdge.getTarget()) > 0) { inEdge = inEdge.reverse(); } return inEdge; }
Example 2
Source File: TriangleEnumerator.java From flink with Apache License 2.0 | 5 votes |
@Override public Edge<K, NullValue> map(Edge<K, NullValue> inEdge) throws Exception { // flip vertices if necessary if (inEdge.getSource().compareTo(inEdge.getTarget()) > 0) { inEdge = inEdge.reverse(); } return inEdge; }
Example 3
Source File: TriangleEnumerator.java From flink with Apache License 2.0 | 5 votes |
@Override public Edge<K, NullValue> map(Edge<K, NullValue> inEdge) throws Exception { // flip vertices if necessary if (inEdge.getSource().compareTo(inEdge.getTarget()) > 0) { inEdge = inEdge.reverse(); } return inEdge; }
Example 4
Source File: TriangleEnumerator.java From Flink-CEPplus with Apache License 2.0 | 4 votes |
@Override public void flatMap(Edge<K, EV> edge, Collector<Edge<K, EV>> out) throws Exception { out.collect(edge); Edge<K, EV> reversed = edge.reverse(); out.collect(reversed); }
Example 5
Source File: TriangleEnumerator.java From flink with Apache License 2.0 | 4 votes |
@Override public void flatMap(Edge<K, EV> edge, Collector<Edge<K, EV>> out) throws Exception { out.collect(edge); Edge<K, EV> reversed = edge.reverse(); out.collect(reversed); }
Example 6
Source File: SimpleEdgeStream.java From gelly-streaming with Apache License 2.0 | 4 votes |
@Override public Edge<K, EV> map(Edge<K, EV> edge) throws Exception { return edge.reverse(); }
Example 7
Source File: TriangleEnumerator.java From flink with Apache License 2.0 | 4 votes |
@Override public void flatMap(Edge<K, EV> edge, Collector<Edge<K, EV>> out) throws Exception { out.collect(edge); Edge<K, EV> reversed = edge.reverse(); out.collect(reversed); }