• And then hash character takes in any string or character, single character, gives me back a number. Notice what I do.

    然后哈希接受任何字符串或字母,单个字符,返回给我一个数字,注意我要做什么。

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

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

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

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

  • For those perhaps familiar with some of the jargon do we introduce what we call link lists and hash tables and tries, increasingly sophisticated data structures, that allow us to solve problems that are much bigger and much more interesting than the very familiar one that we started with here.

    那些对编程的术语较熟悉的同学,我们会教授,链接列表,哈希表,以及日益复杂的数据结构,以便帮助我们解决其他的,比现在所学的更大也更有趣的问题。

    哈佛公开课 - 计算机科学课程节选

  • The last thing I want to say about hashes are that they're actually really hard to create.

    最后我想说的是哈希函数非常难以创立,在过去的时间里。

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

  • 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.

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

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

  • And then, if I want to find out if something's there, I do the same thing. But notice now, hash is converting the input into an integer.

    然后,我想查找出某些元素是否在列表中,我做同样的事,但是现在注意,哈希是将输入转化成一个整数,所以,其思想是什么?

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

  • 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.

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

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

  • The good news is the elements in any one spot in a hash table are likely to be a small number, three, four, five.

    好的一点是在哈希表中,任何一个存贮点上的元素数据是很小的,三个,四个,五个。

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

  • So let's look at the second example, all right, I keep doing that -- this piece of code from here to here gives me a way of now creating a hash table of size 256.

    所以让我们来看一下第二个例子,好的,我继续做那件事,这段代码中从这里到这里,是创建一个大小为256的哈希表。

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

  • So what in the world is hashing?

    所以哈希到底是什么样的?

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

  • 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?

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

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

  • I think one of the classic ones for strings is called the Rabin-Karp algorithm. And it's simply the same idea that you have a mapping from your import into a set of integers.

    我认为字符串哈希,最经典的是Rabin-Karp算法,它只是简单的相同概念,你有一个映射关系将你的输入映射成一组数字。

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

  • I may not want to do the full range of this, but I may decide I have to use a lot of gigabytes of space in order to do a trade off.

    哈希成一个整数,我不想完整的去做这件事,但是我可以想像我需要用许多G的空间,去完成空间和时间之间的权衡。

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

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

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

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