public GraphHopperStorage(List<? extends Weighting> chWeightings, Directory dir, final EncodingManager encodingManager, boolean withElevation, GraphExtension extendedStorage) { if (extendedStorage == null) throw new IllegalArgumentException("GraphExtension cannot be null, use NoOpExtension"); if (encodingManager == null) throw new IllegalArgumentException("EncodingManager needs to be non-null since 0.7. Create one using new EncodingManager or EncodingManager.create(flagEncoderFactory, ghLocation)"); this.encodingManager = encodingManager; this.dir = dir; this.properties = new StorableProperties(dir); InternalGraphEventListener listener = new InternalGraphEventListener() { @Override public void initStorage() { for (CHGraphImpl cg : chGraphs) { cg.initStorage(); } } @Override public void freeze() { for (CHGraphImpl cg : chGraphs) { cg._freeze(); } } }; this.baseGraph = new BaseGraph(dir, encodingManager, withElevation, listener, extendedStorage); for (Weighting w : chWeightings) { chGraphs.add(new CHGraphImpl(w, dir, this.baseGraph)); } }
public GraphHopperStorage(List<? extends Weighting> chWeightings, Directory dir, final EncodingManager encodingManager, boolean withElevation, GraphExtension extendedStorage) { if (extendedStorage == null) throw new IllegalArgumentException("GraphExtension cannot be null, use NoOpExtension"); if (encodingManager == null) throw new IllegalArgumentException("EncodingManager needs to be non-null since 0.7. Create one using new EncodingManager or EncodingManager.create(flagEncoderFactory, ghLocation)"); this.encodingManager = encodingManager; this.dir = dir; this.properties = new StorableProperties(dir); InternalGraphEventListener listener = new InternalGraphEventListener() { @Override public void initStorage() { for (CHGraphImpl cg : chGraphs) { cg.initStorage(); } } @Override public void freeze() { for (CHGraphImpl cg : chGraphs) { cg._freeze(); } } }; this.baseGraph = new BaseGraph(dir, encodingManager, withElevation, listener, extendedStorage); for (Weighting w : chWeightings) { chGraphs.add(new CHGraphImpl(w, dir, this.baseGraph)); } }
public GraphHopperStorage(List<? extends Weighting> chWeightings, Directory dir, final EncodingManager encodingManager, boolean withElevation, GraphExtension extendedStorage) { if (extendedStorage == null) throw new IllegalArgumentException("GraphExtension cannot be null, use NoOpExtension"); if (encodingManager == null) throw new IllegalArgumentException("EncodingManager needs to be non-null since 0.7. Create one using new EncodingManager or EncodingManager.create(flagEncoderFactory, ghLocation)"); this.encodingManager = encodingManager; this.dir = dir; this.properties = new StorableProperties(dir); InternalGraphEventListener listener = new InternalGraphEventListener() { @Override public void initStorage() { for (CHGraphImpl cg : chGraphs) { cg.initStorage(); } } @Override public void freeze() { for (CHGraphImpl cg : chGraphs) { cg._freeze(); } } }; this.baseGraph = new BaseGraph(dir, encodingManager, withElevation, listener, extendedStorage); for (Weighting w : chWeightings) { chGraphs.add(new CHGraphImpl(w, dir, this.baseGraph)); } }
for (Weighting w : chWeightings) chGraphs.add(new CHGraphImpl(w, dir, this.baseGraph));