由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Java版 - hash function question
相关主题
问一个特别土的问题Can Web Services return Hash or Object?
How to represent n:n relationship in Java?Is this a Bug or not?
Why HttpServletRequest extends Object implements ServletRequestHelp.?How to implement Math function?
immutable list新手问一个:如何找.jar文件里都有什么class?
Question: reflection and genericscan applet implements runnable?
一个event model的概念级的问题Timer and TimerTask
state::update的用法是Java 8吗 (转载)jvm是怎么implement monitor的?
Re: Can Web Services return Hash or Objeinterface和implementation class
相关话题的讨论汇总
话题: hash话题: function话题: object话题: int话题: following
进入Java版参与讨论
1 (共1页)
h******3
发帖数: 351
1
hash function is important in implementing hash table. I know that in java
Object has its hash code, which might be generated from weak hash function.
Following is one snippet that is "supplement hash function"
static int hash(Object x) {
int h = x.hashCode();
h += ~(h << 9);
h ^= (h >>> 14);
h += (h << 4);
h ^= (h >>> 10);
return h;
}
Can anybody help to explain what is the fundamental idea of a hash algorithm
? to generate non-duplicate
1 (共1页)
进入Java版参与讨论
相关主题
interface和implementation classQuestion: reflection and generics
Re: [转载] create gif/png image in C or ja一个event model的概念级的问题
库里有一个函数名也叫Timestate::update的用法是Java 8吗 (转载)
Only definition is showed with F3 in Eclipse?Re: Can Web Services return Hash or Obje
问一个特别土的问题Can Web Services return Hash or Object?
How to represent n:n relationship in Java?Is this a Bug or not?
Why HttpServletRequest extends Object implements ServletRequestHelp.?How to implement Math function?
immutable list新手问一个:如何找.jar文件里都有什么class?
相关话题的讨论汇总
话题: hash话题: function话题: object话题: int话题: following