Now I have the ability to say, I've got a new class, I can create instances of a line segment, and it's elements are themselves instances of points. OK?
这就是我们要讲模块化的地方了,现在我可以说,我创建了一个新类,我可以创建线段的实例了,这些实例的元素?
And I would be able to simply bury away the details of how those other instances are created from how I want to use them by simply calling methods on the classes.
也就是一些线段的组合,我还可以把怎么实现那些,实例的细节包装起来,把它和调用实例分开来,我们下次还会接着讲这个。
So these distances are the lengths of these line segments.
这些线段的长度就是距离
You can either think of it as an arrow and imagine the arrow, or you can reduce it to a pair of numbers, x and y.
你既可以用有向线段来表示,也可以用一组数字来表示,x 和 y
This is the payoff to Player I of choosing Middle against Right, and the line in between, this line here, is the expected payoff to Player I of choosing Middle as a function of the probability that other people choose Right.
这条表示对手选右时参与人选中的收益,两个端点中间的线段部分,表示参与人I选右的预期收益,它是对手选右概率的一个方程
So an easy thing to do in planar geometry is I want to make a line segment.
在平面几何里比较容易的一件事,就是做一个线段。
There's a line segment, it's got a starting point and ending point.
做一个线段,需要一个,开始点和一个结束点。
I might want to get the length of the segment.
用这些线段来做什么呢?
And I could now extend that.
我现在可以建立线段了。
Well, it's Pythagoras, right?
怎么求线段的长度呢?
It says if I want to get the length of a segment, going to pass in that instance, it says from that instance, get the start point, that's the thing I just found.
它的意思是如果我想要,得到一个线段的长度,首先要把这个实例传进来,然后对于这个实例,从开始点,取得x坐标,然后通过同样的操作。
应用推荐