我试图理解Java中HashMap的实现方式。我决定尝试理解该类中每一行代码和注释,但很快就遇到了阻力。以下代码片段来自HashMap类并讨论泊松分布:
Ideally, under random hashCodes, the frequency of
nodes in bins follows a Poisson distribution
(http://en.wikipedia.org/wiki/Poisson_distribution) with a
parameter of about 0.5 on average for the default resizing
threshold of 0.75, although with a large variance because of
resizing granularity. Ignoring variance, the expected
occurrences of list size k are (exp(-0.5) * pow(0.5, k) /
factorial(k)). The first values are:
0: 0.60653066
1: 0.30326533
2: 0.07581633
3: 0.01263606
4: 0.00157952
5: 0.00015795
6: 0.00001316
7: 0.00000094
8: 0.00000006
more: less than 1 in ten million
我在数学方面是个普通人,必须先理解什么是泊松分布。感谢那个简单的视频向我解释了它。
现在即使我理解如何使用泊松分布计算概率,我仍然无法理解上面所描述的内容。
有人能否用更简单的语言解释一下,并且如果可能的话附带一个例子?这将使我的任务更加有趣。