public PathDiscardingRaptorStateStore(int rounds, int maxTime) { this.maxTime = maxTime; matrix = new TObjectIntMap[rounds]; for (int i = 0; i < rounds; i++) { matrix[i] = new TObjectIntHashMap<TransitStop>(1000, 0.75f, Integer.MAX_VALUE); } bestStops = new TObjectIntHashMap<TransitStop>(1000, 0.75f, Integer.MAX_VALUE); }
public SingleProfileStateStore () { minUpperBounds = new TObjectIntHashMap<TransitStop>(5000, 0.75f, Integer.MAX_VALUE); }
public MultiProfileStateStore () { minUpperBounds = new TObjectIntHashMap<TransitStop>(5000, 0.75f, Integer.MAX_VALUE); }
public LabelAlphabet() { data = new TObjectIntHashMap<String>(DEFAULT_CAPACITY,DEFAULT_LOAD_FACTOR,noEntryValue); frozen = false; index = new TIntObjectHashMap<String>(); }
/** * Build the ID - Index map if needed. */ private synchronized void buildIdIndexMapIfNeeded () { // we check again if the map has been built. It's possible that it would have been built // by this method in another thread while this instantiation was blocked. if (idIndexMap == null) { // make a local object, don't expose to public view until it's built TObjectIntMap idIndexMap = new TObjectIntHashMap<String>(this.capacity, 1f, -1); for (int i = 0; i < this.capacity; i++) { if (ids[i] != null) { if (idIndexMap.containsKey(ids[i])) { LOG.error("Duplicate ID {} in pointset.", ids[i]); } else { idIndexMap.put(ids[i], i); } } } // now expose to public view; reference assignment is an atomic operation this.idIndexMap = idIndexMap; } }
TObjectIntMap<TripPattern> minBoardTime = new TObjectIntHashMap<TripPattern>(100, 0.75f, Integer.MAX_VALUE);
TObjectIntMap<TripPattern> patternCount = new TObjectIntHashMap<>(5, 0.75f, 0); group.forEach(tt -> patternCount.adjustOrPutValue(graph.index.patternForTrip.get(tt.trip), 1, 1));
TObjectIntHashMap<TripPattern> minBoardTime = new TObjectIntHashMap<TripPattern>(1000, .75f, Integer.MAX_VALUE); Map<TripPattern, ProfileState> optimalBoardState = Maps.newHashMap();
timetablesForPattern = new ArrayList<RaptorWorkerTimetable>(totalPatterns); List<TripPattern> patternForIndex = Lists.newArrayList(totalPatterns); TObjectIntMap<TripPattern> indexForPattern = new TObjectIntHashMap<>(totalPatterns, 0.75f, -1); indexForStop = new TIntIntHashMap(totalStops, 0.75f, Integer.MIN_VALUE, -1); TIntList stopForIndex = new TIntArrayList(totalStops, Integer.MIN_VALUE);
if(!receivingPlayers.containsKey(player)) { add = true; receivingStacks = new TObjectIntHashMap<>(); } else receivingStacks = receivingPlayers.get(player);
/** * Constructor. * * @param format Input format */ public SimpleTransactionParser(CSVReaderFormat format) { super(format); keymap = new TObjectIntHashMap<>(1001, .5f, -1); }
/** * Creates an empty {@code Counter}. */ public ObjectCounter() { counts = new TObjectIntHashMap<T>(); sum = 0; }
/** * empty words and 0 tweets */ public TweetCountWordMap() { ntweets = 0; wordMap = new TObjectIntHashMap<String>(); } /**
/** * Creates an empty {@code Counter}. */ public ObjectCounter() { counts = new TObjectIntHashMap<T>(); sum = 0; }
/** * Creates an empty graph with node edges */ public WeightedDirectedMultigraph() { typeCounts = new TObjectIntHashMap<T>(); vertexToEdges = new TIntObjectHashMap<SparseWeightedDirectedTypedEdgeSet<T>>(); subgraphs = new ArrayList<WeakReference<Subgraph>>(); size = 0; }
/** * Make a new mapping. * * @param r the resource to consider */ public CShareableResource(ShareableResource r) throws SchedulerException { this.rc = r; this.id = r.getIdentifier(); wantedCapacity = new TObjectIntHashMap<>(); wantedAmount = new TObjectIntHashMap<>(); wantedRatios = new TObjectDoubleHashMap<>(); }
private void preprocess(List<E> pattern) { badCharSkip = new TObjectIntHashMap<>(); defaultBadCharSkip = pattern.size(); for (int scan = 0; scan < pattern.size() - 1; scan++) { badCharSkip.put(pattern.get(scan), pattern.size() - scan - 1); } }
/** * Constructor */ public OfCurrency() { super(Currency.class); this.currencies = Currency.getAvailableCurrencies().stream().toArray(Currency[]::new); this.codeMap = new TObjectIntHashMap<>(currencies.length, 0.5f, -1); Arrays.sort(currencies, (c1, c2) -> c1.getCurrencyCode().compareTo(c2.getCurrencyCode())); for (int i = 0; i< currencies.length; ++i) { this.codeMap.put(currencies[i], i); } }
protected RecipeBuilder() { this.inputs = NonNullList.create(); this.outputs = NonNullList.create(); this.chancedOutputs = new TObjectIntHashMap<>(0); this.fluidInputs = new ArrayList<>(0); this.fluidOutputs = new ArrayList<>(0); }
public FiniteAutomaton() { this.representedBy = new Automaton(); this.stateToIndex = new TObjectIntHashMap<>(); this.states = new ArrayList<>(); this.alphabet = new TIntHashSet(); }