Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/algorithm/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Algorithm Axiom系统:返回类型的东西_Algorithm_Math_Optimization - Fatal编程技术网

Algorithm Axiom系统:返回类型的东西

Algorithm Axiom系统:返回类型的东西,algorithm,math,optimization,Algorithm,Math,Optimization,这里Axiom是一种数学语言,而不是java库。它就像枫树或数学。 它是否存在某种返回Axiom中类型1对象的方式,我可以这样做 q1:= if typeOf q= bohType then 1 else 0 ?? 有一个地方列出了所有的Axiom类型,这样我就可以在上面输入正确的字符串了? 多谢各位 看到没人回答。。。 我没有找到一种方法来知道两个obj的类型是否相等,或者一个obj是否有一个指定的类型;但是重新考虑一下:我只想知道列表和流之间的区别,为了安全起见,使用maxIndex函数。

这里Axiom是一种数学语言,而不是java库。它就像枫树或数学。 它是否存在某种返回Axiom中类型1对象的方式,我可以这样做

q1:= if typeOf q= bohType then 1 else 0
?? 有一个地方列出了所有的Axiom类型,这样我就可以在上面输入正确的字符串了? 多谢各位

看到没人回答。。。 我没有找到一种方法来知道两个obj的类型是否相等,或者一个obj是否有一个指定的类型;但是重新考虑一下:我只想知道列表和流之间的区别,为了安全起见,使用maxIndex函数。。。这很简单,明白吗?可以作为list(其中使用maxIndex)和stream的参数,如果list返回0,Streams返回1(其中没有max索引,所以我可以选择它)(最后看起来是这样)。所以问题解决了。。。早上好

我想我已经找到了解决这个问题的办法 似乎此函数可以找到类型是否相同

f(a,b)==(if tex domainOf a=tex domainOf b then return 1 else return 0)
一些测试:

(5) -> f(a,b)==(if tex domainOf a=tex domainOf b then return 1 else return 0)
                                                               Type: Void
                                                              Time: 0 sec
(6) -> f(33, 99)
Compiling function f with type (PositiveInteger,PositiveInteger) ->
  NonNegativeInteger

(6)  1
                                                    Type: PositiveInteger
                                   Time: 0.02 (IN) + 0.02 (EV) = 0.03 sec
(7) -> f(33, -99)
Compiling function f with type (PositiveInteger,Integer) ->
  NonNegativeInteger

(7)  0
                                                 Type: NonNegativeInteger
                                               Time: 0.02 (IN) = 0.02 sec
(8) -> f(4*x,x^2)
   Compiling function f with type (Polynomial Integer,Polynomial
   Integer) -> NonNegativeInteger

(8)  1
                                                    Type: PositiveInteger
                                   Time: 0.03 (IN) + 0.10 (OT) = 0.13 sec

请正确对齐有问题的代码部分,以便更好地理解如果typeOf(a)::String=“List”然后是1或0。似乎不正常…请正确对齐有问题的代码部分,以便更好地理解如果typeOf(a)::String=“List”然后是1或0。看起来不太好。。。