public HikeFlagEncoder(PMap properties) { this((int) properties.getLong("speedBits", 4), properties.getDouble("speedFactor", 1)); this.properties = properties; this.setBlockFords(properties.getBool("block_fords", false)); }
public FootFlagEncoder(PMap properties) { this((int) properties.getLong("speedBits", 4), properties.getDouble("speedFactor", 1)); this.properties = properties; this.setBlockFords(properties.getBool("block_fords", true)); }
static List<FlagEncoder> parseEncoderString(FlagEncoderFactory factory, String encoderList) { if (encoderList.contains(":")) throw new IllegalArgumentException("EncodingManager does no longer use reflection instantiate encoders directly."); if (!encoderList.equals(toLowerCase(encoderList))) throw new IllegalArgumentException("Since 0.7 EncodingManager does no longer accept upper case profiles: " + encoderList); String[] entries = encoderList.split(","); List<FlagEncoder> resultEncoders = new ArrayList<>(); for (String entry : entries) { entry = toLowerCase(entry.trim()); if (entry.isEmpty()) continue; String entryVal = ""; if (entry.contains("|")) { entryVal = entry; entry = entry.split("\\|")[0]; } PMap configuration = new PMap(entryVal); FlagEncoder fe = factory.createFlagEncoder(entry, configuration); if (configuration.has("version") && fe.getVersion() != configuration.getInt("version", -1)) throw new IllegalArgumentException("Encoder " + entry + " was used in version " + configuration.getLong("version", -1) + ", but current version is " + fe.getVersion()); resultEncoders.add(fe); } return resultEncoders; }
public MountainBikeFlagEncoder(PMap properties) { this( (int) properties.getLong("speed_bits", 4), properties.getDouble("speed_factor", 2), properties.getBool("turn_costs", false) ? 1 : 0 ); this.properties = properties; this.setBlockFords(properties.getBool("block_fords", true)); }
public MotorcycleFlagEncoder(PMap properties) { this( (int) properties.getLong("speed_bits", 5), properties.getDouble("speed_factor", 5), properties.getBool("turn_costs", false) ? 1 : 0 ); this.properties = properties; this.setBlockFords(properties.getBool("block_fords", true)); }
public RacingBikeFlagEncoder(PMap properties) { this( (int) properties.getLong("speed_bits", 4), properties.getDouble("speed_factor", 2), properties.getBool("turn_costs", false) ? 1 : 0 ); this.properties = properties; this.setBlockFords(properties.getBool("block_fords", true)); }
public CarFlagEncoder(PMap properties) { this((int) properties.getLong("speed_bits", 5), properties.getDouble("speed_factor", 5), properties.getBool("turn_costs", false) ? 1 : 0); this.properties = properties; this.setBlockFords(properties.getBool("block_fords", true)); this.setBlockByDefault(properties.getBool("block_barriers", true)); }
visitedNodesSum.addAndGet(rsp.getHints().getLong("visited_nodes.sum", 0)); long dist = (long) arsp.getDistance(); distSum.addAndGet(dist);
public DataFlagEncoder(PMap properties) { this((int) properties.getLong("speed_bits", 5), properties.getDouble("speed_factor", 5), properties.getBool("turn_costs", false) ? 1 : 0); this.properties = properties; this.setStoreHeight(properties.getBool("store_height", false)); this.setStoreWeight(properties.getBool("store_weight", false)); this.setStoreWidth(properties.getBool("store_width", false)); }
public FootFlagEncoder(PMap properties) { this((int) properties.getLong("speedBits", 4), properties.getDouble("speedFactor", 1)); this.properties = properties; this.setBlockFords(properties.getBool("block_fords", true)); }
public HikeFlagEncoder( PMap properties ) { this((int) properties.getLong("speedBits", 4), properties.getDouble("speedFactor", 1)); this.properties = properties; this.setBlockFords(properties.getBool("blockFords", true)); }
public CarFlagEncoder( PMap properties ) { this((int) properties.getLong("speed_bits", 5), properties.getDouble("speed_factor", 5), properties.getBool("turn_costs", false) ? 1 : 0); this.properties = properties; this.setBlockFords(properties.getBool("block_fords", true)); }
public MountainBikeFlagEncoder(PMap properties) { this( (int) properties.getLong("speed_bits", 4), properties.getDouble("speed_factor", 2), properties.getBool("turn_costs", false) ? 1 : 0 ); this.properties = properties; this.setBlockFords(properties.getBool("block_fords", true)); }
public MotorcycleFlagEncoder(PMap properties) { this( (int) properties.getLong("speed_bits", 5), properties.getDouble("speed_factor", 5), properties.getBool("turn_costs", false) ? 1 : 0 ); this.properties = properties; this.setBlockFords(properties.getBool("block_fords", true)); }
public CarFlagEncoder(PMap properties) { this((int) properties.getLong("speed_bits", 5), properties.getDouble("speed_factor", 5), properties.getBool("turn_costs", false) ? 1 : 0); this.properties = properties; this.setBlockFords(properties.getBool("block_fords", true)); this.setBlockByDefault(properties.getBool("block_barriers", true)); }
public CarFlagEncoder(PMap properties) { this((int) properties.getLong("speed_bits", 5), properties.getDouble("speed_factor", 5), properties.getBool("turn_costs", false) ? 1 : 0); this.properties = properties; this.setBlockFords(properties.getBool("block_fords", true)); this.setBlockByDefault(properties.getBool("block_barriers", true)); }
public DataFlagEncoder(PMap properties) { this((int) properties.getLong("speed_bits", 5), properties.getDouble("speed_factor", 5), properties.getBool("turn_costs", false) ? 1 : 0); this.properties = properties; this.setStoreHeight(properties.getBool("store_height", false)); this.setStoreWeight(properties.getBool("store_weight", false)); this.setStoreWidth(properties.getBool("store_width", false)); this.setSpatialRules(properties.getInt("spatial_rules", 0)); }