Energy is a traded commodity, but it is important also the political input we put into this project."
VOA: standard.2009.05.08
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.
然后,我想查找出某些元素是否在列表中,我做同样的事,但是现在注意,哈希是将输入转化成一个整数,所以,其思想是什么?
If you think about receptor ligand system as an input into the cell.
如果将受体-配体系统看作,细胞的一种输入机制的话
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.
答案是我不能,好吧,在简单的整数的例子中,我可以做到,但是在一些更复杂的场景中,比如面部,指纹,密码相关的问题中,很难设计一个哈希函数具备完全平均的分配,也就是说,做到对任一输入,可以准确地得到相应的唯一输出,因此在一个哈希问题中。
And conceptually, the idea of cubing a value feels like you could package that up into a little box, a little tool that takes input, a value, and returns output the answer A* so you don't have to constantly do A star, A*A So this program ,at the end of today, is pretty much the same thing.
概念上,算一个值的立方就像是,你可以把一个值打包放在一个小盒子里,一个用来接收输入的工具,一个值,然后返回一个答案,所以你并不需要一直使用,等等。,A,star,,A,,and,so,forth。,这个程序,最后,是一个差不多的东西。
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?
普遍存在的增益和权衡,在许多的例子中,可以通过牺牲空间而得到效率方面的增加,话说回来,仍然存在一个问题,或者应该会有一个问题困扰着你,就是我如何保证我的哈希函数能够准确将,任一输入映射到相应的唯一的存贮空间中去?
So STR, which I just typed up there, takes in parens, some input, and it converts it into a string, so that now I can use that John where I was expecting a string. John.
因此STR,也就是,我刚刚输入的,然后把这个输入变更为一个字符串,因此现在我就能,在需要用字符串的地方使用这个对象了。
Why is this much nice? Well, that's a handy piece of code. Because imagine I've got that now, and I can now store that away in some file name, input dot p y, and import into every one of my procedure functions, pardon me, my files of procedures, because it's a standard way of now giving me the input.
为什么这样很好呢?,这是一段很好用的代码,因为想象下如果我有了这段代码,我能把它用某个文件名保存起来,后缀是。py,导入到所有的处理函数中,抱歉,我的处理文件,因为这是一个标准的输入方法。
应用推荐