Skip to content

Commit

Permalink
[gelly] renamed IncrementalSSSPExample -> IncrementalSSSP to match th…
Browse files Browse the repository at this point in the history
…e new examples naming scheme
  • Loading branch information
vasia committed May 19, 2015
1 parent a067d59 commit 912f8d9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,14 @@
* 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 {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
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;
Expand Down Expand Up @@ -78,8 +78,8 @@ public void before() throws Exception {
}

@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;
Expand All @@ -103,15 +103,15 @@ public void testIncrementalSSSPNonSPEdge() throws Exception {
// 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();
Expand Down

0 comments on commit 912f8d9

Please sign in to comment.