VOA: standard.other
chi Y This is lower case chi. I will take chi X minus chi Y.
我用chi,X减去。
For example, F x y z if I have an equation that looks like this, f of x, y, z.
打个比方,我有个这样的方程。
When I call this class definition, it calls init, init and I give it an x and a y value.
我说过,当我们,调用这个类的定义的时候,它会去调用。
It was awkward teaching an introduction Y and probably for that reason while I was teaching Lit 300, which was then called Lit Y, Z Paul de Man was teaching Lit Z.
教入门课非常尴尬,也许正因为这样,我教文学300时,当时它还叫文学,保罗,德,曼教教文学。
I'm simply saying swap X with Y, but this 2 won't work, because where are X and Y defined?
我只简单地说交换X和Y,但是这两行不起作用,因为X和Y是在哪里定义的呢?
if I think it's more likely than this crossing point Y I think it's very likely they're going to choose Right.
如果我觉得对手选右的概率,会在交点Y的右方
If I do that, I would like to call the coordinate y, then I will write the same thing.
如果是那种情形,我会把坐标记为y,然后写出一样的式子
All right, c p 1 dot y, x I've said assign that to the value 2, 2,0. So now c p 1 has inside of it an x and y value.
一个特定的版本,我现在命名了一个内置变量,并给它赋值了,我刚刚做的也就是给它。
The power of linearity is F=k1+k2 if I come across f of x, y, z equals k1 plus k2, if it is a linear equation, I don't have to go and solve it all over again.
线性的威力是,一个方程,如果它是个线性方程,那么我就不用再去解他了。
XYZ I might as well do it as x, y, z because we are talking about something that is going in three space.
我最好设成,因为我们在讨论,三维的事物。
x y z And I have another equation f of x, y, z.
若我有另一个方程。
I was expecting to compare x- and y- values, not radius and angle.
噢,发生了什么?,好吧有错误了。
Y Why don't I say int temp gets X. Let's say Y oh, sorry, X gets Y and then Y gets temp, this 2 would fail.
为什么我不说明,int,temp,=,X,让我们说明,哦,对不起,X=Y,然后,Y=temp,这两行将失败的。
3 >> Okay. I'll just go over here to y and get the number 13 set up and then take the wand of dereferencing and just, whoa.
>,好的,我将到y这里,然后存储数字,然后使用魔杖,哇哦。
If its in Cartesian form I'll pass in an x and y and compute what a radius and angle is.
来得到的这个点,我都可以得到这个点的,全部的这种信息。
self y Notice what I also do here, I create self dot y, give it a value, and then, oh cool, I can also set up what's the radius and angle for this point, by just doing a little bit of work.
我创建了,然后给它赋值,然后,噢太酷了,通过做一点额外的工作,就可以得到点的半径和角度了,好,实际上如果。
OK, as I said, I want equality in the case of points to be, are the x- and y- coordinates the same?
好,正如我所说,我想要这个例子中的,点相等的意思是?
Right now it's a simple template, but it's a template for creating what a class looks like, and I now have an x- and y- value associated with each instance of this.
那么大家明白了为什么,我说类是一个模板了,对不对?,现在它只是一个简单的模板,但是它是一个用来-,创建形成一个类的模板。
It says, if I want to print out something I built in Cartesian form up here, says, again, I'm going to pass it in a pointer to the instance, that self thing, and then I'm going to return a string that I combine together with an open self and close paren, a comma in the middle, and getting the x-value and the y-value and converting them into strings before I put the whole thing together.
这不仅仅是个列表,它是怎么来做的?,流程是:如果我想要返回,一些已经在笛卡尔模式下建好的值,好,再说一遍,我首先要传入一个,指向实例的指针,也就是,然后我会返回一个,由开括号,闭括号,中间的一个逗号,以及提前转换为字符串格式的。
Y I'm not passing an x and I'm not passing a Y, &y I'm passing an ampersand x and ampersand y and can you take a guess as to what the ampersand operator must mean?
我不是传递X,也不是传递,我传递的是&x和,你们可以猜一猜,这个&符号是什么意思?
I'm going to say, gee, p2 is the x value the same in both of them, and if it is, and the y value's the same, then this is the same point, I'm going to return true.
这样的数据对象,我会把它们命名为p1和,我会去查看,看看两个对象中,的x值是不是相同,如果相同的话,就去查看y值是否相同。
OK, for example, I might say point p1 is that list, x is 1, y is 2.
和y坐标的数组是很简单的1,那么,例如,我可能会说点。
y A square it's called X, another square it's called y and now this time I'm doing pointers to int not points to char.
一个叫做x,另外一个叫做,这一次是int型指针,不是char型指针。
If you solve for that, you find y-y0=v0^/, and if you put in the v_0 I gave you, which was what, 10?
如果你解这个式子,你会得到y-y0=v0^/,如果再把我给你的v0代入,那个数是多少 10
I take the time and put it in the y equation and demand that the y I get, agrees with this y.
然后我把时间代入 y 的方程,令得到的 y 的表达式等于这一段的 y
Initially, its location as a function of time is equal to i times x plus j times y.
初始时刻,它的位移作为时间的函数等于,i ? x + j ? y
And I'll give it an x value of 3 3 and a y value of 4.
一个笛卡尔坐标3,然后给p2的x坐标赋值为。
And actually, if I don't want to clobber, as we say, overwrite the value of my variable, ; I could declare another one and store the return value in Y; Y so now I have two ints in memory; X and Y, 3 one with two, one with three.
实际上,如果你不想彻底清除,像我们说的,覆盖那个变量的值,我可以申明另一个变量Y,并在Y中保存那个返回值;,现在内存中有两个int数,X和,一个的值为2,一个为。
Then, I gave you one other very important example of a particle moving in the x-y plane.
下面我再拿一个重要的例子,质点在 x-y 平面内的运动
应用推荐