提交 912f8d90 编写于 作者: V vasia

[gelly] renamed IncrementalSSSPExample -> IncrementalSSSP to match the new examples naming scheme

上级 a067d59c
......@@ -60,14 +60,14 @@ import org.apache.flink.graph.utils.Tuple3ToEdgeMap;
* The propagation stops when a vertex with an alternative shortest path is reached
* or when we reach a vertex with no SP-in-neighbors.
*
* Usage <code>IncrementalSSSPExample &lt;vertex path&gt; &lt;edge path&gt; &lt;edges in SSSP&gt;
* Usage <code>IncrementalSSSP &lt;vertex path&gt; &lt;edge path&gt; &lt;edges in SSSP&gt;
* &lt;src id edge to be removed&gt; &lt;trg id edge to be removed&gt; &lt;val edge to be removed&gt;
* &lt;result path&gt; &lt;number of iterations&gt;</code><br>
* If no parameters are provided, the program is run with default data from
* {@link org.apache.flink.graph.example.utils.IncrementalSSSPData}
*/
@SuppressWarnings("serial")
public class IncrementalSSSPExample implements ProgramDescription {
public class IncrementalSSSP implements ProgramDescription {
public static void main(String [] args) throws Exception {
......
......@@ -26,7 +26,7 @@ import org.apache.flink.graph.Edge;
import org.apache.flink.graph.EdgeDirection;
import org.apache.flink.graph.Graph;
import org.apache.flink.graph.Vertex;
import org.apache.flink.graph.example.IncrementalSSSPExample;
import org.apache.flink.graph.example.IncrementalSSSP;
import org.apache.flink.graph.example.utils.IncrementalSSSPData;
import org.apache.flink.graph.spargel.VertexCentricConfiguration;
import org.apache.flink.test.util.MultipleProgramsTestBase;
......@@ -78,8 +78,8 @@ public class IncrementalSSSPITCase extends MultipleProgramsTestBase {
}
@Test
public void testIncrementalSSSPExample() throws Exception {
IncrementalSSSPExample.main(new String[]{verticesPath, edgesPath, edgesInSSSPPath,
public void testIncrementalSSSP() throws Exception {
IncrementalSSSP.main(new String[]{verticesPath, edgesPath, edgesInSSSPPath,
IncrementalSSSPData.SRC_EDGE_TO_BE_REMOVED, IncrementalSSSPData.TRG_EDGE_TO_BE_REMOVED,
IncrementalSSSPData.VAL_EDGE_TO_BE_REMOVED,resultPath, IncrementalSSSPData.NUM_VERTICES + ""});
expected = IncrementalSSSPData.RESULTED_VERTICES;
......@@ -103,15 +103,15 @@ public class IncrementalSSSPITCase extends MultipleProgramsTestBase {
// configure the iteration
VertexCentricConfiguration parameters = new VertexCentricConfiguration();
if(IncrementalSSSPExample.isInSSSP(edgeToBeRemoved, edgesInSSSP)) {
if(IncrementalSSSP.isInSSSP(edgeToBeRemoved, edgesInSSSP)) {
parameters.setDirection(EdgeDirection.IN);
parameters.setOptDegrees(true);
// run the vertex centric iteration to propagate info
Graph<Long, Double, Double> result = ssspGraph.runVertexCentricIteration(
new IncrementalSSSPExample.VertexDistanceUpdater(),
new IncrementalSSSPExample.InvalidateMessenger(edgeToBeRemoved),
new IncrementalSSSP.VertexDistanceUpdater(),
new IncrementalSSSP.InvalidateMessenger(edgeToBeRemoved),
IncrementalSSSPData.NUM_VERTICES, parameters);
DataSet<Vertex<Long, Double>> resultedVertices = result.getVertices();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册