热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

gnu.trove.map.hash.TObjectIntHashMap.()方法的使用及代码示例

本文整理了Java中gnu.trove.map.hash.TObjectIntHashMap.<init>()方法的一些代码示例,展示了TObj

本文整理了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();
}

推荐阅读
  • 在Android开发中,使用Picasso库可以实现对网络图片的等比例缩放。本文介绍了使用Picasso库进行图片缩放的方法,并提供了具体的代码实现。通过获取图片的宽高,计算目标宽度和高度,并创建新图实现等比例缩放。 ... [详细]
  • 本文介绍了Redis的基础数据结构string的应用场景,并以面试的形式进行问答讲解,帮助读者更好地理解和应用Redis。同时,描述了一位面试者的心理状态和面试官的行为。 ... [详细]
  • 本文介绍了如何使用PHP向系统日历中添加事件的方法,通过使用PHP技术可以实现自动添加事件的功能,从而实现全局通知系统和迅速记录工具的自动化。同时还提到了系统exchange自带的日历具有同步感的特点,以及使用web技术实现自动添加事件的优势。 ... [详细]
  • Python实现变声器功能(萝莉音御姐音)的方法及步骤
    本文介绍了使用Python实现变声器功能(萝莉音御姐音)的方法及步骤。首先登录百度AL开发平台,选择语音合成,创建应用并填写应用信息,获取Appid、API Key和Secret Key。然后安装pythonsdk,可以通过pip install baidu-aip或python setup.py install进行安装。最后,书写代码实现变声器功能,使用AipSpeech库进行语音合成,可以设置音量等参数。 ... [详细]
  • SpringBoot uri统一权限管理的实现方法及步骤详解
    本文详细介绍了SpringBoot中实现uri统一权限管理的方法,包括表结构定义、自动统计URI并自动删除脏数据、程序启动加载等步骤。通过该方法可以提高系统的安全性,实现对系统任意接口的权限拦截验证。 ... [详细]
  • C# 7.0 新特性:基于Tuple的“多”返回值方法
    本文介绍了C# 7.0中基于Tuple的“多”返回值方法的使用。通过对C# 6.0及更早版本的做法进行回顾,提出了问题:如何使一个方法可返回多个返回值。然后详细介绍了C# 7.0中使用Tuple的写法,并给出了示例代码。最后,总结了该新特性的优点。 ... [详细]
  • 不同优化算法的比较分析及实验验证
    本文介绍了神经网络优化中常用的优化方法,包括学习率调整和梯度估计修正,并通过实验验证了不同优化算法的效果。实验结果表明,Adam算法在综合考虑学习率调整和梯度估计修正方面表现较好。该研究对于优化神经网络的训练过程具有指导意义。 ... [详细]
  • CF:3D City Model(小思维)问题解析和代码实现
    本文通过解析CF:3D City Model问题,介绍了问题的背景和要求,并给出了相应的代码实现。该问题涉及到在一个矩形的网格上建造城市的情景,每个网格单元可以作为建筑的基础,建筑由多个立方体叠加而成。文章详细讲解了问题的解决思路,并给出了相应的代码实现供读者参考。 ... [详细]
  • 本文介绍了iOS数据库Sqlite的SQL语句分类和常见约束关键字。SQL语句分为DDL、DML和DQL三种类型,其中DDL语句用于定义、删除和修改数据表,关键字包括create、drop和alter。常见约束关键字包括if not exists、if exists、primary key、autoincrement、not null和default。此外,还介绍了常见的数据库数据类型,包括integer、text和real。 ... [详细]
  • 本文介绍了Python爬虫技术基础篇面向对象高级编程(中)中的多重继承概念。通过继承,子类可以扩展父类的功能。文章以动物类层次的设计为例,讨论了按照不同分类方式设计类层次的复杂性和多重继承的优势。最后给出了哺乳动物和鸟类的设计示例,以及能跑、能飞、宠物类和非宠物类的增加对类数量的影响。 ... [详细]
  • 本文介绍了在iOS开发中使用UITextField实现字符限制的方法,包括利用代理方法和使用BNTextField-Limit库的实现策略。通过这些方法,开发者可以方便地限制UITextField的字符个数和输入规则。 ... [详细]
  • 本文介绍了使用Spark实现低配版高斯朴素贝叶斯模型的原因和原理。随着数据量的增大,单机上运行高斯朴素贝叶斯模型会变得很慢,因此考虑使用Spark来加速运行。然而,Spark的MLlib并没有实现高斯朴素贝叶斯模型,因此需要自己动手实现。文章还介绍了朴素贝叶斯的原理和公式,并对具有多个特征和类别的模型进行了讨论。最后,作者总结了实现低配版高斯朴素贝叶斯模型的步骤。 ... [详细]
  • 本文整理了315道Python基础题目及答案,帮助读者检验学习成果。文章介绍了学习Python的途径、Python与其他编程语言的对比、解释型和编译型编程语言的简述、Python解释器的种类和特点、位和字节的关系、以及至少5个PEP8规范。对于想要检验自己学习成果的读者,这些题目将是一个不错的选择。请注意,答案在视频中,本文不提供答案。 ... [详细]
  • 解决Sharepoint 2013运行状况分析出现的“一个或多个服务器未响应”问题的方法
    本文介绍了解决Sharepoint 2013运行状况分析中出现的“一个或多个服务器未响应”问题的方法。对于有高要求的客户来说,系统检测问题的存在是不可接受的。文章详细描述了解决该问题的步骤,包括删除服务器、处理分布式缓存留下的记录以及使用代码等方法。同时还提供了相关关键词和错误提示信息,以帮助读者更好地理解和解决该问题。 ... [详细]
  • 本文介绍了GTK+中的GObject对象系统,该系统是基于GLib和C语言完成的面向对象的框架,提供了灵活、可扩展且易于映射到其他语言的特性。其中最重要的是GType,它是GLib运行时类型认证和管理系统的基础,通过注册和管理基本数据类型、用户定义对象和界面类型来实现对象的继承。文章详细解释了GObject系统中对象的三个部分:唯一的ID标识、类结构和实例结构。 ... [详细]
author-avatar
哥这么好的人你去哪找
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有