- Timestamp:
- 03/02/20 15:04:46 (5 years ago)
- Location:
- branches/3040_VectorBasedGP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4
- Files:
-
- 4 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/3040_VectorBasedGP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/TypeCoherentVectorExpressionGrammar.cs
r17460 r17463 35 35 private const string TrigonometricFunctionsName = "Trigonometric Functions"; 36 36 private const string ExponentialFunctionsName = "Exponential and Logarithmic Functions"; 37 private const string PowerFunctionsName = "Power Functions"; 38 private const string TerminalsName = "Terminals"; 39 private const string VectorAggregationName = "Aggregations"; 40 private const string ScalarSymbolsName = "Scalar Symbols"; 41 42 private const string VectorArithmeticFunctionsName = "Vector Arithmetic Functions"; 43 private const string VectorTrigonometricFunctionsName = "Vector Trigonometric Functions"; 44 private const string VectorExponentialFunctionsName = "Vector Exponential and Logarithmic Functions"; 45 private const string VectorPowerFunctionsName = "Vector Power Functions"; 46 private const string VectorTerminalsName = "Vector Terminals"; 47 private const string VectorSymbolsName = "Vector Symbols"; 48 37 49 private const string RealValuedSymbolsName = "Real Valued Symbols"; 38 private const string TerminalsName = "Terminals";39 private const string PowerFunctionsName = "Power Functions";40 private const string ConditionsName = "Conditions";41 private const string ComparisonsName = "Comparisons";42 private const string BooleanOperatorsName = "Boolean Operators";43 private const string ConditionalSymbolsName = "ConditionalSymbols";44 private const string SpecialFunctionsName = "Special Functions";45 private const string TimeSeriesSymbolsName = "Time Series Symbols";46 50 47 51 [StorableConstructor] … … 57 61 58 62 private void Initialize() { 59 #region s ymbol declaration63 #region scalar symbol declaration 60 64 var add = new Addition(); 61 65 var sub = new Subtraction(); 62 66 var mul = new Multiplication(); 63 67 var div = new Division(); 64 var mean = new Average(); 68 65 69 var sin = new Sine(); 66 70 var cos = new Cosine(); 67 71 var tan = new Tangent(); 72 73 var exp = new Exponential(); 68 74 var log = new Logarithm(); 69 var pow = new Power(); 75 70 76 var square = new Square(); 71 var root = new Root();72 77 var sqrt = new SquareRoot(); 73 78 var cube = new Cube(); 74 79 var cubeRoot = new CubeRoot(); 75 var exp = new Exponential(); 76 var abs = new Absolute(); 77 78 var airyA = new AiryA(); 79 var airyB = new AiryB(); 80 var bessel = new Bessel(); 81 var cosineIntegral = new CosineIntegral(); 82 var dawson = new Dawson(); 83 var erf = new Erf(); 84 var expIntegralEi = new ExponentialIntegralEi(); 85 var fresnelCosineIntegral = new FresnelCosineIntegral(); 86 var fresnelSineIntegral = new FresnelSineIntegral(); 87 var gamma = new Gamma(); 88 var hypCosineIntegral = new HyperbolicCosineIntegral(); 89 var tanh = new HyperbolicTangent(); 90 var hypSineIntegral = new HyperbolicSineIntegral(); 91 var norm = new Norm(); 92 var psi = new Psi(); 93 var sineIntegral = new SineIntegral(); 94 var analyticalQuotient = new AnalyticQuotient(); 95 96 var @if = new IfThenElse(); 97 var gt = new GreaterThan(); 98 var lt = new LessThan(); 99 var and = new And(); 100 var or = new Or(); 101 var not = new Not(); 102 var xor = new Xor(); 103 var variableCondition = new VariableCondition(); 104 105 var timeLag = new TimeLag(); 106 var integral = new Integral(); 107 var derivative = new Derivative(); 108 109 var constant = new Constant(); 110 constant.MinValue = -20; 111 constant.MaxValue = 20; 112 var variableSymbol = new Variable(); 80 var power = new Power(); 81 var root = new Root(); 82 83 var constant = new Constant { MinValue = -20, MaxValue = 20 }; 84 var variable = new Variable(); 113 85 var binFactorVariable = new BinaryFactorVariable(); 114 86 var factorVariable = new FactorVariable(); 115 var laggedVariable = new LaggedVariable(); 116 var autoregressiveVariable = new AutoregressiveTargetVariable(); 87 88 var sum = new Sum(); 89 var mean = new Average { Name = "Mean" }; 90 var sd = new StandardDeviation(); 91 #endregion 92 93 #region vector symbol declaration 94 var vectoradd = new Addition() { Name = "Vector Addition" }; 95 var vectorsub = new Subtraction() { Name = "Vector Subtraction" }; 96 var vectormul = new Multiplication() { Name = "Vector Multiplication" }; 97 var vectordiv = new Division() { Name = "Vector Division" }; 98 99 var vectorsin = new Sine() { Name = "Vector Sine" }; 100 var vectorcos = new Cosine() { Name = "Vector Cosine" }; 101 var vectortan = new Tangent() { Name = "Vector Tangent" }; 102 103 var vectorexp = new Exponential() { Name = "Vector Exponential" }; 104 var vectorlog = new Logarithm() { Name = "Vector Logarithm" }; 105 106 var vectorsquare = new Square() { Name = "Vector Square" }; 107 var vectorsqrt = new SquareRoot() { Name = "Vector SquareRoot" }; 108 var vectorcube = new Cube() { Name = "Vector Cube" }; 109 var vectorcubeRoot = new CubeRoot() { Name = "Vector CubeRoot" }; 110 var vectorpower = new Power() { Name = "Vector Power" }; 111 var vectorroot = new Root() { Name = "Vector Root" }; 112 113 var vectorvariable = new Variable() { Name = "Vector Variable" }; 117 114 #endregion 118 115 119 116 #region group symbol declaration 120 var arithmeticSymbols = new GroupSymbol(ArithmeticFunctionsName, new List<ISymbol>() { add, sub, mul, div , mean});121 var trigonometricSymbols = new GroupSymbol(TrigonometricFunctionsName, new List<ISymbol>() { sin, cos, tan , tanh});117 var arithmeticSymbols = new GroupSymbol(ArithmeticFunctionsName, new List<ISymbol>() { add, sub, mul, div }); 118 var trigonometricSymbols = new GroupSymbol(TrigonometricFunctionsName, new List<ISymbol>() { sin, cos, tan }); 122 119 var exponentialAndLogarithmicSymbols = new GroupSymbol(ExponentialFunctionsName, new List<ISymbol> { exp, log }); 123 var specialFunctions = new GroupSymbol(SpecialFunctionsName, new List<ISymbol> { abs, airyA, airyB, bessel, cosineIntegral, dawson, erf, expIntegralEi, 124 fresnelCosineIntegral,fresnelSineIntegral,gamma,hypCosineIntegral,hypSineIntegral,norm, psi, sineIntegral, analyticalQuotient}); 125 var terminalSymbols = new GroupSymbol(TerminalsName, new List<ISymbol> { constant, variableSymbol, binFactorVariable, factorVariable }); 126 var realValuedSymbols = new GroupSymbol(RealValuedSymbolsName, new List<ISymbol>() { arithmeticSymbols, trigonometricSymbols, exponentialAndLogarithmicSymbols, specialFunctions, terminalSymbols }); 127 128 var powerSymbols = new GroupSymbol(PowerFunctionsName, new List<ISymbol> { square, pow, sqrt, root, cube, cubeRoot }); 129 130 var conditionSymbols = new GroupSymbol(ConditionsName, new List<ISymbol> { @if, variableCondition }); 131 var comparisonSymbols = new GroupSymbol(ComparisonsName, new List<ISymbol> { gt, lt }); 132 var booleanOperationSymbols = new GroupSymbol(BooleanOperatorsName, new List<ISymbol> { and, or, not, xor }); 133 var conditionalSymbols = new GroupSymbol(ConditionalSymbolsName, new List<ISymbol> { conditionSymbols, comparisonSymbols, booleanOperationSymbols }); 134 135 var timeSeriesSymbols = new GroupSymbol(TimeSeriesSymbolsName, new List<ISymbol> { timeLag, integral, derivative, laggedVariable, autoregressiveVariable }); 136 #endregion 137 138 AddSymbol(realValuedSymbols); 139 AddSymbol(powerSymbols); 140 AddSymbol(conditionalSymbols); 141 AddSymbol(timeSeriesSymbols); 120 var powerSymbols = new GroupSymbol(PowerFunctionsName, new List<ISymbol> { square, sqrt, cube, cubeRoot, power, root }); 121 var terminalSymbols = new GroupSymbol(TerminalsName, new List<ISymbol> { constant, variable, binFactorVariable, factorVariable }); 122 var aggregationSymbols = new GroupSymbol(VectorAggregationName, new List<ISymbol> { sum, mean, sd }); 123 var scalarSymbols = new GroupSymbol(ScalarSymbolsName, new List<ISymbol>() { arithmeticSymbols, trigonometricSymbols, exponentialAndLogarithmicSymbols, powerSymbols, terminalSymbols, aggregationSymbols }); 124 125 var vectorarithmeticSymbols = new GroupSymbol(VectorArithmeticFunctionsName, new List<ISymbol>() { vectoradd, vectorsub, vectormul, vectordiv }); 126 var vectortrigonometricSymbols = new GroupSymbol(VectorTrigonometricFunctionsName, new List<ISymbol>() { vectorsin, vectorcos, vectortan }); 127 var vectorexponentialAndLogarithmicSymbols = new GroupSymbol(VectorExponentialFunctionsName, new List<ISymbol> { vectorexp, vectorlog }); 128 var vectorpowerSymbols = new GroupSymbol(VectorPowerFunctionsName, new List<ISymbol> { vectorsquare, vectorsqrt, vectorcube, vectorcubeRoot, vectorpower, vectorroot }); 129 var vectorterminalSymbols = new GroupSymbol(VectorTerminalsName, new List<ISymbol> { vectorvariable }); 130 var vectorSymbols = new GroupSymbol(VectorSymbolsName, new List<ISymbol>() { vectorarithmeticSymbols, vectortrigonometricSymbols, vectorexponentialAndLogarithmicSymbols, vectorpowerSymbols, vectorterminalSymbols }); 131 132 //var realValuedSymbols = new GroupSymbol(RealValuedSymbolsName, new List<ISymbol> { scalarSymbols, vectorSymbols }); 133 134 135 #endregion 136 137 //AddSymbol(realValuedSymbols); 138 AddSymbol(scalarSymbols); 139 AddSymbol(vectorSymbols); 142 140 143 141 #region subtree count configuration 144 142 SetSubtreeCount(arithmeticSymbols, 2, 2); 145 143 SetSubtreeCount(trigonometricSymbols, 1, 1); 146 SetSubtreeCount(pow, 2, 2); 144 SetSubtreeCount(exponentialAndLogarithmicSymbols, 1, 1); 145 SetSubtreeCount(square, 1, 1); 146 SetSubtreeCount(sqrt, 1, 1); 147 SetSubtreeCount(cube, 1, 1); 148 SetSubtreeCount(cubeRoot, 1, 1); 149 SetSubtreeCount(power, 2, 2); 147 150 SetSubtreeCount(root, 2, 2); 148 SetSubtreeCount(square, 1, 1);149 SetSubtreeCount(cube, 1, 1);150 SetSubtreeCount(sqrt, 1, 1);151 SetSubtreeCount(cubeRoot, 1, 1);152 151 SetSubtreeCount(exponentialAndLogarithmicSymbols, 1, 1); 153 foreach (var sy in specialFunctions.Symbols.Except(new[] { analyticalQuotient })) {154 SetSubtreeCount(sy, 1, 1);155 }156 SetSubtreeCount(analyticalQuotient, 2, 2);157 158 152 SetSubtreeCount(terminalSymbols, 0, 0); 159 160 SetSubtreeCount(@if, 3, 3); 161 SetSubtreeCount(variableCondition, 2, 2); 162 SetSubtreeCount(comparisonSymbols, 2, 2); 163 SetSubtreeCount(and, 2, 2); 164 SetSubtreeCount(or, 2, 2); 165 SetSubtreeCount(not, 1, 1); 166 SetSubtreeCount(xor, 2, 2); 167 168 SetSubtreeCount(timeLag, 1, 1); 169 SetSubtreeCount(integral, 1, 1); 170 SetSubtreeCount(derivative, 1, 1); 171 SetSubtreeCount(laggedVariable, 0, 0); 172 SetSubtreeCount(autoregressiveVariable, 0, 0); 153 SetSubtreeCount(aggregationSymbols, 1, 1); 154 155 SetSubtreeCount(vectorarithmeticSymbols, 2, 2); 156 SetSubtreeCount(vectortrigonometricSymbols, 1, 1); 157 SetSubtreeCount(vectorexponentialAndLogarithmicSymbols, 1, 1); 158 SetSubtreeCount(vectorsquare, 1, 1); 159 SetSubtreeCount(vectorsqrt, 1, 1); 160 SetSubtreeCount(vectorcube, 1, 1); 161 SetSubtreeCount(vectorcubeRoot, 1, 1); 162 SetSubtreeCount(vectorpower, 2, 2); 163 SetSubtreeCount(vectorroot, 2, 2); 164 SetSubtreeCount(vectorexponentialAndLogarithmicSymbols, 1, 1); 165 SetSubtreeCount(vectorterminalSymbols, 0, 0); 173 166 #endregion 174 167 175 168 #region allowed child symbols configuration 176 AddAllowedChildSymbol(StartSymbol, realValuedSymbols); 177 AddAllowedChildSymbol(StartSymbol, powerSymbols); 178 AddAllowedChildSymbol(StartSymbol, conditionSymbols); 179 AddAllowedChildSymbol(StartSymbol, timeSeriesSymbols); 180 AddAllowedChildSymbol(StartSymbol, specialFunctions); 181 182 AddAllowedChildSymbol(DefunSymbol, realValuedSymbols); 183 AddAllowedChildSymbol(DefunSymbol, powerSymbols); 184 AddAllowedChildSymbol(DefunSymbol, conditionSymbols); 185 AddAllowedChildSymbol(DefunSymbol, timeSeriesSymbols); 186 AddAllowedChildSymbol(DefunSymbol, specialFunctions); 187 188 AddAllowedChildSymbol(realValuedSymbols, realValuedSymbols); 189 AddAllowedChildSymbol(realValuedSymbols, powerSymbols); 190 AddAllowedChildSymbol(realValuedSymbols, conditionSymbols); 191 AddAllowedChildSymbol(realValuedSymbols, timeSeriesSymbols); 192 AddAllowedChildSymbol(realValuedSymbols, specialFunctions); 193 194 AddAllowedChildSymbol(powerSymbols, variableSymbol, 0); 195 AddAllowedChildSymbol(powerSymbols, laggedVariable, 0); 196 AddAllowedChildSymbol(powerSymbols, autoregressiveVariable, 0); 197 AddAllowedChildSymbol(powerSymbols, constant, 1); 198 199 AddAllowedChildSymbol(square, realValuedSymbols, 0); 200 AddAllowedChildSymbol(square, conditionSymbols, 0); 201 AddAllowedChildSymbol(square, timeSeriesSymbols, 0); 202 203 AddAllowedChildSymbol(sqrt, realValuedSymbols, 0); 204 AddAllowedChildSymbol(sqrt, conditionSymbols, 0); 205 AddAllowedChildSymbol(sqrt, timeSeriesSymbols, 0); 206 207 AddAllowedChildSymbol(@if, comparisonSymbols, 0); 208 AddAllowedChildSymbol(@if, booleanOperationSymbols, 0); 209 AddAllowedChildSymbol(@if, conditionSymbols, 1); 210 AddAllowedChildSymbol(@if, realValuedSymbols, 1); 211 AddAllowedChildSymbol(@if, powerSymbols, 1); 212 AddAllowedChildSymbol(@if, timeSeriesSymbols, 1); 213 AddAllowedChildSymbol(@if, conditionSymbols, 2); 214 AddAllowedChildSymbol(@if, realValuedSymbols, 2); 215 AddAllowedChildSymbol(@if, powerSymbols, 2); 216 AddAllowedChildSymbol(@if, timeSeriesSymbols, 2); 217 218 AddAllowedChildSymbol(booleanOperationSymbols, comparisonSymbols); 219 AddAllowedChildSymbol(comparisonSymbols, realValuedSymbols); 220 AddAllowedChildSymbol(comparisonSymbols, powerSymbols); 221 AddAllowedChildSymbol(comparisonSymbols, conditionSymbols); 222 AddAllowedChildSymbol(comparisonSymbols, timeSeriesSymbols); 223 224 AddAllowedChildSymbol(variableCondition, realValuedSymbols); 225 AddAllowedChildSymbol(variableCondition, powerSymbols); 226 AddAllowedChildSymbol(variableCondition, conditionSymbols); 227 AddAllowedChildSymbol(variableCondition, timeSeriesSymbols); 228 229 230 AddAllowedChildSymbol(timeLag, realValuedSymbols); 231 AddAllowedChildSymbol(timeLag, powerSymbols); 232 AddAllowedChildSymbol(timeLag, conditionSymbols); 233 234 AddAllowedChildSymbol(integral, realValuedSymbols); 235 AddAllowedChildSymbol(integral, powerSymbols); 236 AddAllowedChildSymbol(integral, conditionSymbols); 237 238 AddAllowedChildSymbol(derivative, realValuedSymbols); 239 AddAllowedChildSymbol(derivative, powerSymbols); 240 AddAllowedChildSymbol(derivative, conditionSymbols); 169 AddAllowedChildSymbol(StartSymbol, scalarSymbols); 170 171 AddAllowedChildSymbol(arithmeticSymbols, scalarSymbols); 172 AddAllowedChildSymbol(trigonometricSymbols, scalarSymbols); 173 AddAllowedChildSymbol(exponentialAndLogarithmicSymbols, scalarSymbols); 174 AddAllowedChildSymbol(powerSymbols, scalarSymbols, 0); 175 AddAllowedChildSymbol(power, constant, 1); 176 AddAllowedChildSymbol(root, constant, 1); 177 AddAllowedChildSymbol(aggregationSymbols, vectorSymbols); 178 179 AddAllowedChildSymbol(vectorarithmeticSymbols, vectorSymbols); 180 AddAllowedChildSymbol(vectorarithmeticSymbols, scalarSymbols); 181 AddAllowedChildSymbol(vectortrigonometricSymbols, vectorSymbols); 182 AddAllowedChildSymbol(vectorexponentialAndLogarithmicSymbols, vectorSymbols); 183 AddAllowedChildSymbol(vectorpowerSymbols, vectorSymbols, 0); 184 AddAllowedChildSymbol(vectorpower, constant, 1); 185 AddAllowedChildSymbol(vectorroot, constant, 1); 241 186 #endregion 242 187 } -
branches/3040_VectorBasedGP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.csproj
r17460 r17463 231 231 <Compile Include="Symbols\And.cs" /> 232 232 <Compile Include="Symbols\AutoregressiveVariable.cs" /> 233 <Compile Include="Symbols\StandardDeviation.cs" /> 233 234 <Compile Include="Symbols\Sum.cs" /> 234 235 <Compile Include="Symbols\Average.cs" /> -
branches/3040_VectorBasedGP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/OpCodes.cs
r17460 r17463 78 78 CubeRoot = 51, 79 79 Tanh = 52, 80 Sum = 53 80 Sum = 53, 81 Sd = 54 81 82 }; 82 83 public static class OpCodes { … … 135 136 public const byte Tanh = (byte)OpCode.Tanh; 136 137 public const byte Sum = (byte)OpCode.Sum; 138 public const byte StandardDeviation = (byte)OpCode.Sd; 137 139 138 140 private static Dictionary<Type, byte> symbolToOpcode = new Dictionary<Type, byte>() { … … 190 192 { typeof(Cube), OpCodes.Cube }, 191 193 { typeof(CubeRoot), OpCodes.CubeRoot }, 192 { typeof(Sum), OpCodes.Sum } 194 { typeof(Sum), OpCodes.Sum }, 195 { typeof(StandardDeviation), OpCodes.StandardDeviation } 193 196 }; 194 197 -
branches/3040_VectorBasedGP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeVectorInterpreter.cs
r17460 r17463 105 105 int row = rowEnum; 106 106 var result = Evaluate(dataset, ref row, state); 107 if (!result.IsScalar) 108 throw new InvalidOperationException("Result of the tree is not a scalar."); 109 yield return result.Scalar; 107 if (result.IsScalar) 108 yield return result.Scalar; 109 else 110 yield return double.NaN; 111 //if (!result.IsScalar) 112 // throw new InvalidOperationException("Result of the tree is not a scalar."); 113 //yield return result.Scalar; 110 114 state.Reset(); 111 115 } … … 148 152 149 153 public DoubleVector Vector { get; } 150 public bool IsVector => !(Vector.Count == 1 && double.IsNaN(Vector[0])); 154 public bool IsVector => Vector != null; 155 //public bool IsVector => !(Vector.Count == 1 && double.IsNaN(Vector[0])); 151 156 152 157 public bool IsNaN => !IsScalar && !IsVector; … … 154 159 public EvaluationResult(double scalar) { 155 160 Scalar = scalar; 156 Vector = NaNVector; 161 //Vector = NaNVector; 162 Vector = null; 157 163 } 158 164 public EvaluationResult(DoubleVector vector) { 165 if (vector == null) throw new ArgumentNullException(nameof(vector)); 159 166 Vector = vector; 160 167 Scalar = double.NaN; … … 168 175 169 176 public static readonly EvaluationResult NaN = new EvaluationResult(double.NaN); 170 private static readonly DoubleVector NaNVector = DoubleVector.Build.Dense(1, double.NaN);177 //private static readonly DoubleVector NaNVector = DoubleVector.Build.Dense(1, double.NaN); 171 178 } 172 179 … … 180 187 if (lhs.IsVector && rhs.IsScalar && vsFunc != null) return new EvaluationResult(vsFunc(lhs.Vector, rhs.Scalar)); 181 188 if (lhs.IsVector && rhs.IsVector && vvFunc != null) return new EvaluationResult(vvFunc(lhs.Vector, rhs.Vector)); 182 throw new NotSupportedException($"Unsupported combination of argument types: ({lhs}) / ({rhs})"); 189 return EvaluationResult.NaN; 190 //throw new NotSupportedException($"Unsupported combination of argument types: ({lhs}) / ({rhs})"); 183 191 } 184 192 … … 188 196 if (val.IsScalar && sFunc != null) return new EvaluationResult(sFunc(val.Scalar)); 189 197 if (val.IsVector && vFunc != null) return new EvaluationResult(vFunc(val.Vector)); 190 throw new NotSupportedException($"Unsupported argument type ({val})"); 198 return EvaluationResult.NaN; 199 //throw new NotSupportedException($"Unsupported argument type ({val})"); 191 200 } 192 201 private static EvaluationResult AggregateApply(EvaluationResult val, … … 195 204 if (val.IsScalar && sFunc != null) return new EvaluationResult(sFunc(val.Scalar)); 196 205 if (val.IsVector && vFunc != null) return new EvaluationResult(vFunc(val.Vector)); 197 throw new NotSupportedException($"Unsupported argument type ({val})"); 206 return EvaluationResult.NaN; 207 //throw new NotSupportedException($"Unsupported argument type ({val})"); 198 208 } 199 209 … … 335 345 v => v.Mean()); 336 346 } 347 case OpCodes.StandardDeviation: { 348 var cur = Evaluate(dataset, ref row, state); 349 return AggregateApply(cur, 350 s => 0, 351 v => v.Count > 1 ? Statistics.StandardDeviation(v) : 0); 352 } 337 353 case OpCodes.Variable: { 338 354 if (row < 0 || row >= dataset.Rows) return EvaluationResult.NaN; -
branches/3040_VectorBasedGP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/StandardDeviation.cs
r17455 r17463 25 25 using HEAL.Attic; 26 26 namespace HeuristicLab.Problems.DataAnalysis.Symbolic { 27 [StorableType(" 459E521B-A921-4A0F-B63D-B298DA2CDD11")]28 [Item(" Average", "Symbol that represents the average (arithmetic mean)function.")]29 public sealed class Average: Symbol {27 [StorableType("615033EC-6A76-4DE7-B55F-BB228D6A8166")] 28 [Item("StandardDeviation", "Symbol that represents the standard deviation function.")] 29 public sealed class StandardDeviation : Symbol { 30 30 private const int minimumArity = 1; 31 31 private const int maximumArity = byte.MaxValue; … … 39 39 40 40 [StorableConstructor] 41 private Average(StorableConstructorFlag _) : base(_) { }42 private Average(Averageoriginal, Cloner cloner) : base(original, cloner) { }41 private StandardDeviation(StorableConstructorFlag _) : base(_) { } 42 private StandardDeviation(StandardDeviation original, Cloner cloner) : base(original, cloner) { } 43 43 public override IDeepCloneable Clone(Cloner cloner) { 44 return new Average(this, cloner);44 return new StandardDeviation(this, cloner); 45 45 } 46 public Average() : base("Average", "Symbol that represents the average (arithmetic mean)function.") { }46 public StandardDeviation() : base("StandardDeviation", "Symbol that represents the standard deviation function.") { } 47 47 } 48 48 }
Note: See TracChangeset
for help on using the changeset viewer.