/// <summary> /// Are less to the array /// </summary> /// <param name="a">source</param> /// <param name="b">array</param> /// <returns></returns> public static HypArrayBase <bool> AreLess(this HypArrayBase <double> a, HypArrayBase <double> b) { HypArrayBase <bool> outArray = new HypArrayBase <bool>(a.GetDimensions()); Parallel.For(0, a.GetNumberOfElements(), i => { if (a.Data[i] < b.Data[i]) { outArray.Data[i] = true; } }); return(outArray); }
/// <summary> /// Area equal to the scalar /// </summary> /// <param name="a">source</param> /// <param name="b">scalar</param> /// <returns></returns> public static HypArrayBase <bool> AreEqual(this HypArrayBase <float> a, float b) { HypArrayBase <bool> outArray = new HypArrayBase <bool>(a.GetDimensions()); Parallel.For(0, a.GetNumberOfElements(), i => { if (a.Data[i] == b) { outArray.Data[i] = true; } }); return(outArray); }
/// <summary> /// Area greater of equal to the scalar /// </summary> /// <param name="a">source</param> /// <param name="b">scalar</param> public static HypArrayBase <bool> AreGreaterOrEqual(this HypArrayBase <double> a, double b) { HypArrayBase <bool> outArray = new HypArrayBase <bool>(a.GetDimensions()); Parallel.For(0, a.GetNumberOfElements(), i => { if (a.Data[i] >= b) { outArray.Data[i] = true; } }); return(outArray); }