/// <summary>read the boolean value</summary> /// <exception cref="System.IO.IOException"/> internal static bool ReadBoolean(DataInput @in) { BooleanWritable uBoolean = TlData.Get().UBoolean; uBoolean.ReadFields(@in); return(uBoolean.Get()); }
/// <summary>Accumulate number of points inside/outside results from the mappers.</summary> /// <param name="isInside">Is the points inside?</param> /// <param name="values">An iterator to a list of point counts</param> /// <param name="context">dummy, not used here.</param> /// <exception cref="System.IO.IOException"/> /// <exception cref="System.Exception"/> protected override void Reduce(BooleanWritable isInside, IEnumerable <LongWritable > values, Reducer.Context context) { if (isInside.Get()) { foreach (LongWritable val in values) { numInside += val.Get(); } } else { foreach (LongWritable val in values) { numOutside += val.Get(); } } }