Esempio n. 1
0
 public T Invoke(T val)
 {
     return(NumOps <double, T> .Convert(Math.Sqrt(NumOps <T, double> .Convert(val))));
 }
Esempio n. 2
0
 static NumOps()
 {
     One = NumOps <int, T> .Convert(1);
 }
Esempio n. 3
0
 public static T Average <F1, F2>(ReadOnlySpan <T> span, F1 vSelector, F2 selector)
     where F1 : struct, IFunc <Vector <T>, Vector <T> >
     where F2 : struct, IFunc <T, T>
 {
     return(NumOps <T> .Divide(Sum(span, vSelector, selector), NumOps <int, T> .Convert(span.Length)));
 }