第3章TDC-3000和TPS/PKS集散控制系统 ②数组点(Array Point)是 APM 内部变量的逻辑组,可以用 于存储计算变量或批量控制的配方数据,也可作为控制策 略、本地数据采集和历史数据存储的数据源。
基于26个网页-相关网页
基本上,只要当一个方法的最后一个参数是一个对象数组,或者是一个有三个点的参数,你就可以向这个方法传入多重参数。
Basically, whenever the last argument of a method is an array of objects, or a parameter declaration with a triple dot, you can pass multiple parameters to this method.
不过,我们在这里构造的字节数组并不是很正确,我们将在下一节看到这一点。
However, the byte arrays we've constructed here aren't quite right, as we'll see in the next section.
为了展示这一点,假设您有两个双精度的数组 a 和 b,并且要创建第三个数组 x,比如 x=a+b。
To illustrate this, suppose you have two double arrays a and b and want to create a third array x such that x=a+b.
It says, well I'm going to print out first and last just so you can see it, and then I say, gee 2 if last minus first is less than 2, that is, if there's no more than two elements left in the list, then I can just check those two elements and return the answer.
然后它计算了尾点和开始点的差,如果小于2的话,也就是说数组中的元素小于等于,我对这两个元素进行比较,然后返回结果就可以了,否则的话,我们就去寻找中值点,注意它是怎么实现的,首先这个指向一个列表的开头。
So this first little piece of code right here says, ok you give me 2 points, I'll create another 1 of these lists and I'll simply take the x, sorry I shouldn't say x, I'm going to assume it's the x, the x-values are the two points, add them together, just right there, the y-values, add them together and return that list.
好,为了来认识到这一点,让我们来看一个简单的小例子,在你们的课堂手册上,你可以看到我写了一个小程序,它假设我得到了,这些点中的一些,我想对它们做一些操作,例如我想把它们加到一起,那么这里的第一小片,代码的意思是,好给我两个点,我会再创建一个数组。
And I keep cutting the problem down.
那么我应该选取数组中的哪个点呢?
应用推荐