Class KShortestPathsProc


  • public class KShortestPathsProc
    extends org.neo4j.graphalgo.AlgoBaseProc<org.neo4j.graphalgo.impl.shortestpaths.YensKShortestPaths,​org.neo4j.graphalgo.impl.shortestpaths.YensKShortestPaths,​org.neo4j.graphalgo.impl.shortestpaths.YensKShortestPathsConfig>
    Yen's K shortest paths algorithm. Computes multiple shortest paths from a given start to a goal node in the desired direction. The paths are written to the graph using new relationships named by prefix + index.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  KShortestPathsProc.KspResult  
      static class  KShortestPathsProc.KspStreamResult  
      • Nested classes/interfaces inherited from class org.neo4j.graphalgo.AlgoBaseProc

        org.neo4j.graphalgo.AlgoBaseProc.ComputationResult<A extends org.neo4j.graphalgo.Algorithm<A,​RESULT>,​RESULT extends java.lang.Object,​CONFIG extends org.neo4j.graphalgo.config.AlgoBaseConfig>
      • Nested classes/interfaces inherited from class org.neo4j.graphalgo.BaseProc

        org.neo4j.graphalgo.BaseProc.FreeMemoryInspector
    • Field Summary

      • Fields inherited from class org.neo4j.graphalgo.AlgoBaseProc

        SIGNATURE_PROPERTY, STATS_DESCRIPTION
      • Fields inherited from class org.neo4j.graphalgo.BaseProc

        api, callContext, ESTIMATE_DESCRIPTION, log, procedureTransaction, tracker, transaction
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected org.neo4j.graphalgo.AlgorithmFactory<org.neo4j.graphalgo.impl.shortestpaths.YensKShortestPaths,​org.neo4j.graphalgo.impl.shortestpaths.YensKShortestPathsConfig> algorithmFactory()  
      org.neo4j.graphalgo.api.Graph createGraph​(org.eclipse.collections.api.tuple.Pair<org.neo4j.graphalgo.impl.shortestpaths.YensKShortestPathsConfig,​java.util.Optional<java.lang.String>> configAndName)  
      protected org.neo4j.graphalgo.impl.shortestpaths.YensKShortestPathsConfig newConfig​(java.lang.String username, java.util.Optional<java.lang.String> graphName, java.util.Optional<org.neo4j.graphalgo.config.GraphCreateConfig> maybeImplicitCreate, org.neo4j.graphalgo.core.CypherMapWrapper config)  
      org.eclipse.collections.api.tuple.Pair<org.neo4j.graphalgo.impl.shortestpaths.YensKShortestPathsConfig,​java.util.Optional<java.lang.String>> processInput​(java.lang.Object graphNameOrConfig, java.util.Map<java.lang.String,​java.lang.Object> configuration)  
      java.util.stream.Stream<KShortestPathsProc.KspStreamResult> stream​(java.lang.Object graphNameOrConfig, java.util.Map<java.lang.String,​java.lang.Object> configuration)  
      java.util.stream.Stream<KShortestPathsProc.KspResult> write​(java.lang.Object graphNameOrConfig, java.util.Map<java.lang.String,​java.lang.Object> configuration)  
      • Methods inherited from class org.neo4j.graphalgo.AlgoBaseProc

        algoName, compute, compute, computeEstimate, getOrCreateGraphStore, newConfig, nodeProperties, validateConfigs, validateConfigsAndGraphStore, validateGraphStore
      • Methods inherited from class org.neo4j.graphalgo.BaseProc

        allocationTracker, databaseId, estimateGraphCreate, newLoader, runWithExceptionLogging, runWithExceptionLogging, tryValidateMemoryUsage, tryValidateMemoryUsage, username, validateConfig, validateGraphName
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • KShortestPathsProc

        public KShortestPathsProc()
    • Method Detail

      • stream

        public java.util.stream.Stream<KShortestPathsProc.KspStreamResult> stream​(java.lang.Object graphNameOrConfig,
                                                                                  java.util.Map<java.lang.String,​java.lang.Object> configuration)
      • processInput

        public org.eclipse.collections.api.tuple.Pair<org.neo4j.graphalgo.impl.shortestpaths.YensKShortestPathsConfig,​java.util.Optional<java.lang.String>> processInput​(java.lang.Object graphNameOrConfig,
                                                                                                                                                                               java.util.Map<java.lang.String,​java.lang.Object> configuration)
        Overrides:
        processInput in class org.neo4j.graphalgo.AlgoBaseProc<org.neo4j.graphalgo.impl.shortestpaths.YensKShortestPaths,​org.neo4j.graphalgo.impl.shortestpaths.YensKShortestPaths,​org.neo4j.graphalgo.impl.shortestpaths.YensKShortestPathsConfig>
      • write

        public java.util.stream.Stream<KShortestPathsProc.KspResult> write​(java.lang.Object graphNameOrConfig,
                                                                           java.util.Map<java.lang.String,​java.lang.Object> configuration)
      • newConfig

        protected org.neo4j.graphalgo.impl.shortestpaths.YensKShortestPathsConfig newConfig​(java.lang.String username,
                                                                                            java.util.Optional<java.lang.String> graphName,
                                                                                            java.util.Optional<org.neo4j.graphalgo.config.GraphCreateConfig> maybeImplicitCreate,
                                                                                            org.neo4j.graphalgo.core.CypherMapWrapper config)
        Specified by:
        newConfig in class org.neo4j.graphalgo.AlgoBaseProc<org.neo4j.graphalgo.impl.shortestpaths.YensKShortestPaths,​org.neo4j.graphalgo.impl.shortestpaths.YensKShortestPaths,​org.neo4j.graphalgo.impl.shortestpaths.YensKShortestPathsConfig>
      • createGraph

        public org.neo4j.graphalgo.api.Graph createGraph​(org.eclipse.collections.api.tuple.Pair<org.neo4j.graphalgo.impl.shortestpaths.YensKShortestPathsConfig,​java.util.Optional<java.lang.String>> configAndName)
        Overrides:
        createGraph in class org.neo4j.graphalgo.AlgoBaseProc<org.neo4j.graphalgo.impl.shortestpaths.YensKShortestPaths,​org.neo4j.graphalgo.impl.shortestpaths.YensKShortestPaths,​org.neo4j.graphalgo.impl.shortestpaths.YensKShortestPathsConfig>
      • algorithmFactory

        protected org.neo4j.graphalgo.AlgorithmFactory<org.neo4j.graphalgo.impl.shortestpaths.YensKShortestPaths,​org.neo4j.graphalgo.impl.shortestpaths.YensKShortestPathsConfig> algorithmFactory()
        Specified by:
        algorithmFactory in class org.neo4j.graphalgo.AlgoBaseProc<org.neo4j.graphalgo.impl.shortestpaths.YensKShortestPaths,​org.neo4j.graphalgo.impl.shortestpaths.YensKShortestPaths,​org.neo4j.graphalgo.impl.shortestpaths.YensKShortestPathsConfig>