Пример #1
0
 public static Equation MakeCycle(double[] data, double division)
 {
     return(InterpolationCustom(data, BaseTime.makeCycle(data.Length, division)));
 }
Пример #2
0
 //Interpolate the function on day time
 public static Equation InterpolationDay(double[] p_fx)
 {
     double[] fx = Weather.JoinEndToStart(p_fx);
     int[]    x  = Enumerable.Range(1, fx.Length).ToArray <int> ();
     return(t => Weather.LinearSpline(x, fx) (BaseTime.current_hours(t)));
 }
Пример #3
0
 //Create a cyclic function based on Sin of hour
 public static Equation Simple(double mediam, double amplitude)
 {
     return(t => (Math.Sin((BaseTime.t(t) / 86400000 * Math.PI * 2) + 180) * amplitude) + mediam);
 }