00001 using System; 00002 using System.Collections.Generic; 00003 using System.Linq; 00004 using System.Text; 00005 00006 namespace GEP.Core.Float.Functions 00007 { 00011 [Serializable] 00012 public class Power : Symbol 00013 { 00017 protected static string NAME = "Pow"; 00018 00022 public Power() 00023 : base(2, NAME) 00024 { 00025 } 00026 00037 public override float Value(float[] parameters, int startIndex) 00038 { 00039 return (float)(Math.Pow(Math.Abs(parameters[startIndex]), parameters[++startIndex])); 00040 } 00041 00046 public Power(Power symbol) 00047 :base(symbol) 00048 { 00049 } 00050 00051 public override GEP.Core.Common.Symbol Clone() 00052 { 00053 return new Power(this); 00054 } 00055 } 00056 } 00057