Examples of buildGraph()


Examples of org.grouplens.lenskit.inject.RecommenderGraphBuilder.buildGraph()

        for (Pair<LenskitConfiguration,ModelDisposition> cfg: configurations) {
            rgb.addConfiguration(cfg.getLeft());
        }
        RecommenderInstantiator inst;
        try {
            inst = RecommenderInstantiator.create(rgb.buildGraph());
        } catch (ResolutionException e) {
            throw new RecommenderBuildException("Cannot resolve recommender graph", e);
        }
        DAGNode<Component, Dependency> graph = inst.instantiate();
View Full Code Here

Examples of org.grouplens.lenskit.inject.RecommenderGraphBuilder.buildGraph()

        RecommenderGraphBuilder rgb = new RecommenderGraphBuilder();
        rgb.addConfiguration(daoConfig);
        rgb.addConfiguration(algorithm.getConfig());
        DAGNode<Component,Dependency> graph = null;
        try {
            graph = rgb.buildGraph();
        } catch (ResolutionException e) {
            throw new TaskExecutionException("Cannot resolve graph", e);
        }

        logger.info("dumping graph {}", getName());
View Full Code Here

Examples of org.grouplens.lenskit.inject.RecommenderGraphBuilder.buildGraph()

        for (LenskitConfiguration config: environment.loadConfigurations(getConfigFiles())) {
            rgb.addConfiguration(config);
        }

        try {
            return rgb.buildGraph();
        } catch (ResolutionException e) {
            throw new RecommenderConfigurationException("Cannot configure recommender", e);
        }
    }
View Full Code Here

Examples of org.opentripplanner.graph_builder.impl.GtfsGraphBuilderImpl.buildGraph()

        GtfsBundles bundles = new GtfsBundles();
        bundles.setBundles(bundleList);
        gtfsBuilder.setGtfsBundles(bundles);

        HashMap<Class<?>, Object> extra = new HashMap<Class<?>, Object>();
        gtfsBuilder.buildGraph(graph, extra);

        TransitToStreetNetworkGraphBuilderImpl linker =
                new TransitToStreetNetworkGraphBuilderImpl();
        linker.buildGraph(graph, extra);
View Full Code Here

Examples of org.opentripplanner.graph_builder.impl.GtfsGraphBuilderImpl.buildGraph()

        GtfsGraphBuilderImpl gtfsGraphBuilderImpl = new GtfsGraphBuilderImpl(gtfsBundleList);

        alertsUpdateHandler = new AlertsUpdateHandler();
        graph = new Graph();
        gtfsBundle.setTransfersTxtDefinesStationPaths(true);
        gtfsGraphBuilderImpl.buildGraph(graph, null);
        // Set the agency ID to be used for tests to the first one in the feed.
        agencyId = graph.getAgencyIds().iterator().next();
        System.out.printf("Set the agency ID for this test to %s\n", agencyId);
        graph.index(new DefaultStreetVertexIndexFactory());
        timetableSnapshotSource = new TimetableSnapshotSource(graph);
View Full Code Here

Examples of org.opentripplanner.graph_builder.impl.TransitToStreetNetworkGraphBuilderImpl.buildGraph()

        HashMap<Class<?>, Object> extra = new HashMap<Class<?>, Object>();
        gtfsBuilder.buildGraph(graph, extra);

        TransitToStreetNetworkGraphBuilderImpl linker =
                new TransitToStreetNetworkGraphBuilderImpl();
        linker.buildGraph(graph, extra);

    }

    private void initBikeRental() {
        BikeRentalStationService service = graph.getService(BikeRentalStationService.class, true);
View Full Code Here

Examples of org.opentripplanner.graph_builder.impl.osm.OpenStreetMapGraphBuilderImpl.buildGraph()

        File file = new File(URLDecoder.decode(TriangleInequalityTest.class.getResource("NYC_small.osm.gz").getFile(), "UTF-8"));

        provider.setPath(file);
        loader.setProvider(provider);
        loader.buildGraph(_graph, extra);

        // Need to set up the index because buildGraph doesn't do it.
        _graph.rebuildVertexAndEdgeIndices();
    }
   
View Full Code Here

Examples of org.opentripplanner.graph_builder.impl.osm.OpenStreetMapGraphBuilderImpl.buildGraph()

        URL osmDataUrl = getClass().getResource("bridge_construction.osm.pbf");
        File osmDataFile = new File(URLDecoder.decode(osmDataUrl.getFile(), "UTF-8"));
        provider.setPath(osmDataFile);
        osmBuilder.setProvider(provider);
        HashMap<Class<?>, Object> extra = Maps.newHashMap();
        osmBuilder.buildGraph(graph, extra); // TODO get rid of this "extra" thing
     }

    /**
     * Search for a path across the Willamette river. This OSM data includes a bridge that is not yet built and is
     * therefore tagged highway=construction.
View Full Code Here

Examples of org.opentripplanner.graph_builder.impl.shapefile.ShapefileStreetGraphBuilderImpl.buildGraph()

        // as a test, use prefixes ("NE", SE", etc) as an alert
        schema.setNoteConverter(new AttributeFeatureConverter<String>("PREFIX"));

        builder.setSchema(schema);
        builder.buildGraph(graph, new HashMap<Class<?>, Object>());
        initTransit();

        initBikeRental();
        graph.index(new DefaultStreetVertexIndexFactory());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.