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 Sqrt : Symbol 00013 { 00017 protected static string NAME = "Sqrt"; 00018 00019 public Sqrt() 00020 : base(1, NAME) 00021 { 00022 } 00023 00024 public override float Value(float[] parameters, int startIndex) 00025 { 00026 return (float)(Math.Sqrt(Math.Abs(parameters[startIndex]))); 00027 } 00028 00033 public Sqrt(Sqrt symbol) 00034 : base(symbol) 00035 { 00036 } 00037 00038 public override GEP.Core.Common.Symbol Clone() 00039 { 00040 return new Sqrt(this); 00041 } 00042 } 00043 }