All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.graphhopper.routing.ch.NodeOrderingProvider Maven / Gradle / Ivy

Go to download

GraphHopper is a fast and memory efficient Java road routing engine working seamlessly with OpenStreetMap data.

There is a newer version: 10.0
Show newest version
package com.graphhopper.routing.ch;

public interface NodeOrderingProvider {

    static NodeOrderingProvider identity(int nodes) {
        return new NodeOrderingProvider() {
            @Override
            public int getNodeIdForLevel(int level) {
                return level;
            }

            @Override
            public int getNumNodes() {
                return nodes;
            }
        };
    }

    static NodeOrderingProvider fromArray(int... nodes) {
        return new NodeOrderingProvider() {
            @Override
            public int getNodeIdForLevel(int level) {
                return nodes[level];
            }

            @Override
            public int getNumNodes() {
                return nodes.length;
            }
        };
    }

    int getNodeIdForLevel(int level);

    int getNumNodes();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy