本文整理了Java中gnu.trove.map.hash.TObjectIntHashMap.()
方法的一些代码示例,展示了TObjectIntHashMap.()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TObjectIntHashMap.()
方法的具体详情如下:
包路径:gnu.trove.map.hash.TObjectIntHashMap
类名称:TObjectIntHashMap
方法名:
TObjectIntHashMap.介绍
[英]Creates a new TObjectIntHashMap
instance with the default capacity and load factor.
[中]使用默认容量和负载系数创建新的TObjectIntHashMap
实例。
代码示例
代码示例来源:origin: opentripplanner/OpenTripPlanner
public PathDiscardingRaptorStateStore(int rounds, int maxTime) {
this.maxTime = maxTime;
matrix = new TObjectIntMap[rounds];
for (int i = 0; i matrix[i] = new TObjectIntHashMap(1000, 0.75f, Integer.MAX_VALUE);
}
bestStops = new TObjectIntHashMap(1000, 0.75f, Integer.MAX_VALUE);
}
代码示例来源:origin: opentripplanner/OpenTripPlanner
public SingleProfileStateStore () {
minUpperBounds = new TObjectIntHashMap(5000, 0.75f, Integer.MAX_VALUE);
}
代码示例来源:origin: opentripplanner/OpenTripPlanner
public MultiProfileStateStore () {
minUpperBounds = new TObjectIntHashMap(5000, 0.75f, Integer.MAX_VALUE);
}
代码示例来源:origin: FudanNLP/fnlp
public LabelAlphabet() {
data = new TObjectIntHashMap(DEFAULT_CAPACITY,DEFAULT_LOAD_FACTOR,noEntryValue);
frozen = false;
index = new TIntObjectHashMap();
}
代码示例来源:origin: opentripplanner/OpenTripPlanner
/**
* 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(this.capacity, 1f, -1);
for (int i = 0; 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;
}
}
代码示例来源:origin: opentripplanner/OpenTripPlanner
TObjectIntMap minBoardTime = new TObjectIntHashMap(100, 0.75f, Integer.MAX_VALUE);
代码示例来源:origin: opentripplanner/OpenTripPlanner
TObjectIntMap patternCount = new TObjectIntHashMap<>(5, 0.75f, 0);
group.forEach(tt -> patternCount.adjustOrPutValue(graph.index.patternForTrip.get(tt.trip), 1, 1));
代码示例来源:origin: opentripplanner/OpenTripPlanner
TObjectIntHashMap minBoardTime = new TObjectIntHashMap(1000, .75f, Integer.MAX_VALUE);
Map optimalBoardState = Maps.newHashMap();
代码示例来源:origin: opentripplanner/OpenTripPlanner
timetablesForPattern = new ArrayList(totalPatterns);
List patternForIndex = Lists.newArrayList(totalPatterns);
TObjectIntMap 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);
代码示例来源:origin: Vazkii/Botania
if(!receivingPlayers.containsKey(player)) {
add = true;
receivingStacks = new TObjectIntHashMap<>();
} else receivingStacks = receivingPlayers.get(player);
代码示例来源:origin: de.lmu.ifi.dbs.elki/elki
/**
* Constructor.
*
* @param format Input format
*/
public SimpleTransactionParser(CSVReaderFormat format) {
super(format);
keymap = new TObjectIntHashMap<>(1001, .5f, -1);
}
代码示例来源:origin: fozziethebeat/S-Space
/**
* Creates an empty {@code Counter}.
*/
public ObjectCounter() {
counts = new TObjectIntHashMap();
sum = 0;
}
代码示例来源:origin: openimaj/openimaj
/**
* empty words and 0 tweets
*/
public TweetCountWordMap() {
ntweets = 0;
wordMap = new TObjectIntHashMap();
}
/**
代码示例来源:origin: edu.ucla.sspace/sspace-wordsi
/**
* Creates an empty {@code Counter}.
*/
public ObjectCounter() {
counts = new TObjectIntHashMap();
sum = 0;
}
代码示例来源:origin: fozziethebeat/S-Space
/**
* Creates an empty graph with node edges
*/
public WeightedDirectedMultigraph() {
typeCounts = new TObjectIntHashMap();
vertexToEdges = new TIntObjectHashMap>();
subgraphs = new ArrayList>();
size = 0;
}
代码示例来源:origin: org.btrplace/scheduler-choco
/**
* 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<>();
}
代码示例来源:origin: edu.illinois.cs.cogcomp/illinois-core-utilities
private void preprocess(List pattern) {
badCharSkip = new TObjectIntHashMap<>();
defaultBadCharSkip = pattern.size();
for (int scan = 0; scan badCharSkip.put(pattern.get(scan), pattern.size() - scan - 1);
}
}
代码示例来源:origin: zavtech/morpheus-core
/**
* 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 this.codeMap.put(currencies[i], i);
}
}
代码示例来源:origin: GregTechCE/GregTech
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);
}
代码示例来源:origin: chocoteam/choco-solver
public FiniteAutomaton() {
this.representedBy = new Automaton();
this.stateToIndex = new TObjectIntHashMap<>();
this.states = new ArrayList<>();
this.alphabet = new TIntHashSet();
}