Esempio n. 1
0
        public static BooleanArray Compare(Series series, object value, Func <object, object, bool> comparer)
        {
            BooleanArray result = new BooleanArray(series.Count);

            for (int i = 0; i < result.Length; i++)
            {
                result[i] = comparer(series.data[i], value);
            }
            return(result);
        }
Esempio n. 2
0
        public static BooleanArray operator !=(Series series, object value)
        {
            BooleanArray result = new BooleanArray(series.Count);

            for (int i = 0; i < result.Length; i++)
            {
                result[i] = !object.Equals(series.data[i], value);
            }
            return(result);
        }
Esempio n. 3
0
        public static BooleanArray operator !(BooleanArray array)
        {
            var result = new BooleanArray(array.Length);

            for (int i = 0; i < result.array.Length; i++)
            {
                result.array[i] = !array.array[i];
            }
            return(result);
        }
Esempio n. 4
0
 public static BooleanArray operator |(BooleanArray arrayA, BooleanArray arrayB)
 {
     if (arrayA.Length == arrayB.Length)
     {
         var result = new BooleanArray(arrayA.Length);
         for (int i = 0; i < result.array.Length; i++)
         {
             result.array[i] = arrayA.array[i] | arrayB.array[i];
         }
         return(result);
     }
     else
     {
         throw new ArgumentOutOfRangeException("arrayB");
     }
 }
Esempio n. 5
0
 public DataFrame this [BooleanArray booleanArray]
 {
     get
     {
         if (this.rowCount == booleanArray.Length)
         {
             DataFrame newFrame = this.Clone();
             for (int i = 0; i < this.rowCount; i++)
             {
                 if (booleanArray[i])
                 {
                     DataFrameRow row = this.rows[i];
                     newFrame.ImportRowUnchecked(row);
                 }
             }
             return(newFrame);
         }
         else
         {
             throw new ArgumentOutOfRangeException("booleanArray");
         }
     }
 }