@@ -0,0 +1,2898 @@
+/*%0AThis class is written following the format in the Oracle PGX core demo%0A*/%0Aimport static oracle.pgx.api.algorithms.Argument.createGraphArg;%0A%0Aimport java.util.List;%0Aimport java.util.Map;%0A%0Aimport oracle.pgx.api.Core;%0Aimport oracle.pgx.api.InvocationResult;%0Aimport oracle.pgx.api.LoadingResult;%0Aimport oracle.pgx.api.admin.Control;%0Aimport oracle.pgx.api.admin.Pgx;%0Aimport oracle.pgx.api.algorithms.Argument;%0Aimport oracle.pgx.api.algorithms.BuiltinAlgorithms;%0Aimport oracle.pgx.api.analyst.PropertyProxy;%0Aimport oracle.pgx.api.config.GraphConfig;%0Aimport oracle.pgx.common.Types.PropertyType;%0A%0Apublic class SSSP %7B%0A%0A  public static void main(String%5B%5D argv) throws Exception %7B%0A%0A    if (argv.length != 4) %7B%0A      System.err.println(%22usage: %22 + SSSP.class.getName() + %22 %3Cgraph config path%3E%22%0A                          + %22 %3CcostPropName in the .json file%3E %22 + %22%3Csrc node name%3E%22 %0A                          + %22%3Cdest node name%3E%22);%0A      System.exit(-1);%0A    %7D%0A    GraphConfig cfg = GraphConfig.fromPath(argv%5B0%5D);%0A%0A    String sessionId = null;%0A    Core core = null;%0A    try %7B%0A      core = Pgx.getCore();%0A      sessionId = core.createSession(%22my-session%22).get();%0A      LoadingResult graph = core.loadGraphWithProperties(sessionId, cfg).get();%0A      String graphName = graph.getGraphName();%0A%0A      %7B%0A        String parentName = core.createNodeProperty(sessionId, graphName, PropertyType.NODE).get();%0A        String parentEdgeName = core.createNodeProperty(sessionId, graphName, PropertyType.EDGE).get();%0A        String sssp = BuiltinAlgorithms.Type.PGX_BUILTIN_P1a_SINGLE_SOURCE_SINGLE_DESTINATION_DIJKSTRA.getAnalysisName();%0A        Argument%5B%5D args = new Argument%5B%5D %7B%0A          Argument.createGraphArg(graphName), %0A          Argument.createEdgePropertyArg(argv%5B1%5D),%0A          Argument.createNodeKeyArg(Integer.parseInt(argv%5B2%5D)),%0A          Argument.createNodeKeyArg(Integer.parseInt(argv%5B3%5D)),%0A          Argument.createNodePropertyArg(parentName),%0A          Argument.createNodePropertyArg(parentEdgeName)%0A        %7D;%0A%0A        InvocationResult%3CBoolean%3E ir = core.runAnalysis(sessionId, sssp, args, Boolean.class).get();%0A        if (ir.isSuccess()) %7B%0A          Boolean result = ir.getReturnValue();%0A          System.out.println(%22SSSP computed in %22 + ir.getExecutionTimeMs() + %22 milliseconds%22);%0A          if (result) %7B%0A            System.out.println(%22There is a path between %22 + Integer.parseInt(argv%5B2%5D) + %22 and %22 + Integer.parseInt(argv%5B3%5D));%0A          %7D else %7B%0A            System.out.println(%22There is not a path between %22 + Integer.parseInt(argv%5B2%5D) + %22 and %22 + Integer.parseInt(argv%5B3%5D));%0A          %7D%0A        %7D else %7B%0A          ir.getException().printStackTrace();%0A        %7D%0A      %7D%0A%0A    %7D finally %7B%0A%0A      Control ctrl = Pgx.getControl();%0A      if (ctrl.isRunning()) %7B%0A        if (sessionId != null) %7B%0A          core.destroySession(sessionId).get();%0A        %7D%0A        ctrl.shutdownNow();%0A      %7D%0A    %7D%0A  %7D%0A%0A%7D%0A

Create SSSP.java