• Characters are simple. Suppose you want to represent sets of strings, well you basically just generalize the hash function.

    字母是是很简单的,如果你想表示一组字符串,基本上你要做的就是归纳出哈希函数。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • Well the idea of a hash, in fact, what's called a hash function is to have some way of mapping any kind of data into integers.

    我要怎么做?实际上想法还是哈希,通过一个哈希函数,把任何种类的数据都映射成整数。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • There's been a lot of work done on these over the years, but in fact, it's pretty hard to invent a good hash function. So my advice to you is, if you want to use something was a hash, go to a library. Look up a good hash function.

    已经做过了很多的尝试和努力,但是事实是,很难发明出一个好的哈希函数,所以我给你们的建议是,如果你们想使用哈希功能,到函数库中查找一个好的哈希函数。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • So, what's the idea? If I know what my hash function does, it maps, in this case characters into a range zero to 256, which is zero to 255, I create a list that long, and I simply mark things.

    我知道我的哈希函数做什么,在这个例子中,它将字母,映射成0到255的256个数字,我创建了一个这么长的列表,并且我只是简单的标志这些东西。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • You try to design actually I'm going to come back to that in a second. It's like you're trying to use a hash function that spread things out pretty evenly. But the places you store into in those lists may have to themselves have a small list in there, and when you go to check something, you may have to do a linear search through the elements in that list.

    你尝试着去设计,实际上过会儿我会回头讲解这个问题,类似于你需要用一个哈希函数,非常平均的将物体分发出去,但是在列表中你数据,映射到的地方可能会有自己的一小段列表,当你回头查找数据的时候,你可能需要在那一小段列表中做线性查找。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • The answer is I can't. OK, in the simple case of integers I can, but in the case of something more complex like faces or fingerprints or passwords for that matter, it's hard to design a hash function that has completely even distribution, meaning that it takes any input into exactly one output spot.

    答案是我不能,好吧,在简单的整数的例子中,我可以做到,但是在一些更复杂的场景中,比如面部,指纹,密码相关的问题中,很难设计一个哈希函数具备完全平均的分配,也就是说,做到对任一输入,可以准确地得到相应的唯一输出,因此在一个哈希问题中。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • That in many cases, I can gain efficiency if I'm willing to give up space. Having said that though, there may still be a problem, or there ought to be a problem that may be bugging you slightly, which is how do I guarantee that my hash function takes any input into exactly one spot in the storage space?

    普遍存在的增益和权衡,在许多的例子中,可以通过牺牲空间而得到效率方面的增加,话说回来,仍然存在一个问题,或者应该会有一个问题困扰着你,就是我如何保证我的哈希函数能够准确将,任一输入映射到相应的唯一的存贮空间中去?

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • You've got a picture of somebody's face, it's a million pixels. Each pixel has a range of values from zero to 256. I want to hash a face with some function into an integer.

    你有一个人的脸部照片,它有一百万个像素,每个像素的值范围在0到256之间,我想用某个函数将一张脸部照片。

    麻省理工公开课 - 计算机科学及编程导论课程节选

$firstVoiceSent
- 来自原声例句
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定