29 string OperationType::typeName(
int type)
30 {
return enumKey<Type>(type);}
34 if (t<euler)
return general;
35 if (t<add)
return constop;
36 if (t<copy)
return binop;
37 if (t<sum)
return function;
38 if (t<runningSum)
return reduction;
39 if (t<innerProduct)
return scan;
40 if (t<mean)
return tensor;
45 namespace OperationTypeInfo
47 template <>
int numArguments<OperationType::constant>() {
return 0;}
48 template <>
int numArguments<OperationType::euler>() {
return 0;}
49 template <>
int numArguments<OperationType::pi>() {
return 0;}
50 template <>
int numArguments<OperationType::zero>() {
return 0;}
51 template <>
int numArguments<OperationType::one>() {
return 0;}
52 template <>
int numArguments<OperationType::inf>() {
return 0;}
53 template <>
int numArguments<OperationType::percent>() {
return 1;}
54 template <>
int numArguments<OperationType::add>() {
return 2;}
55 template <>
int numArguments<OperationType::subtract>() {
return 2;}
56 template <>
int numArguments<OperationType::multiply>() {
return 2;}
57 template <>
int numArguments<OperationType::divide>() {
return 2;}
58 template <>
int numArguments<OperationType::log>() {
return 2;}
59 template <>
int numArguments<OperationType::pow>() {
return 2;}
60 template <>
int numArguments<OperationType::polygamma>() {
return 2;}
61 template <>
int numArguments<OperationType::lt>() {
return 2;}
62 template <>
int numArguments<OperationType::le>() {
return 2;}
63 template <>
int numArguments<OperationType::eq>() {
return 2;}
64 template <>
int numArguments<OperationType::min>() {
return 2;}
65 template <>
int numArguments<OperationType::max>() {
return 2;}
66 template <>
int numArguments<OperationType::and_>() {
return 2;}
67 template <>
int numArguments<OperationType::or_>() {
return 2;}
68 template <>
int numArguments<OperationType::covariance>() {
return 2;}
69 template <>
int numArguments<OperationType::correlation>() {
return 2;}
70 template <>
int numArguments<OperationType::linearRegression>() {
return 2;}
71 template <>
int numArguments<OperationType::userFunction>() {
return 2;}
72 template <>
int numArguments<OperationType::not_>() {
return 1;}
73 template <>
int numArguments<OperationType::time>() {
return 0;}
74 template <>
int numArguments<OperationType::copy>() {
return 1;}
75 template <>
int numArguments<OperationType::integrate>() {
return 2;}
76 template <>
int numArguments<OperationType::differentiate>() {
return 1;}
77 template <>
int numArguments<OperationType::data>() {
return 1;}
78 template <>
int numArguments<OperationType::sqrt>() {
return 1;}
79 template <>
int numArguments<OperationType::exp>() {
return 1;}
80 template <>
int numArguments<OperationType::ln>() {
return 1;}
81 template <>
int numArguments<OperationType::sin>() {
return 1;}
82 template <>
int numArguments<OperationType::cos>() {
return 1;}
83 template <>
int numArguments<OperationType::tan>() {
return 1;}
84 template <>
int numArguments<OperationType::asin>() {
return 1;}
85 template <>
int numArguments<OperationType::acos>() {
return 1;}
86 template <>
int numArguments<OperationType::atan>() {
return 1;}
87 template <>
int numArguments<OperationType::sinh>() {
return 1;}
88 template <>
int numArguments<OperationType::cosh>() {
return 1;}
89 template <>
int numArguments<OperationType::tanh>() {
return 1;}
90 template <>
int numArguments<OperationType::abs>() {
return 1;}
91 template <>
int numArguments<OperationType::floor>() {
return 1;}
92 template <>
int numArguments<OperationType::frac>() {
return 1;}
93 template <>
int numArguments<OperationType::Gamma>() {
return 1;}
94 template <>
int numArguments<OperationType::fact>() {
return 1;}
95 template <>
int numArguments<OperationType::sum>() {
return 1;}
96 template <>
int numArguments<OperationType::product>() {
return 1;}
97 template <>
int numArguments<OperationType::infimum>() {
return 1;}
98 template <>
int numArguments<OperationType::supremum>() {
return 1;}
99 template <>
int numArguments<OperationType::infIndex>() {
return 1;}
100 template <>
int numArguments<OperationType::supIndex>() {
return 1;}
101 template <>
int numArguments<OperationType::size>() {
return 1;}
102 template <>
int numArguments<OperationType::shape>() {
return 1;}
103 template <>
int numArguments<OperationType::mean>() {
return 1;}
104 template <>
int numArguments<OperationType::median>() {
return 1;}
105 template <>
int numArguments<OperationType::stdDev>() {
return 1;}
106 template <>
int numArguments<OperationType::moment>() {
return 1;}
107 template <>
int numArguments<OperationType::histogram>() {
return 1;}
109 template <>
int numArguments<OperationType::any>() {
return 1;}
110 template <>
int numArguments<OperationType::all>() {
return 1;}
111 template <>
int numArguments<OperationType::runningSum>() {
return 1;}
112 template <>
int numArguments<OperationType::runningProduct>() {
return 1;}
113 template <>
int numArguments<OperationType::difference>() {
return 1;}
114 template <>
int numArguments<OperationType::differencePlus>() {
return 1;}
115 template <>
int numArguments<OperationType::innerProduct>() {
return 2;}
116 template <>
int numArguments<OperationType::outerProduct>() {
return 2;}
117 template <>
int numArguments<OperationType::index>() {
return 1;}
118 template <>
int numArguments<OperationType::gather>() {
return 2;}
119 template <>
int numArguments<OperationType::meld>() {
return 2;}
120 template <>
int numArguments<OperationType::merge>() {
return 2;}
121 template <>
int numArguments<OperationType::slice>() {
return 1;}
122 template <>
int numArguments<OperationType::ravel>() {
return 1;}
123 template <>
int numArguments<OperationType::numOps>() {
return -1;}
Creation and access to the minskyTCL_obj object, which has code to record whenever Minsky's state cha...