Example #1
0
        public void EnumerateDifferenceAt(int offsetLength, int timeIndex, NaiadList <Weighted <S> > toFill)
        {
            if (toFill.Count == 0)
            {
                var temp = new OffsetLength(offsetLength);


                var accum = new CollectionTraceWithAggregationIncrement <S>();

                var handle = increments.Dereference(temp);
                for (int i = 0; i < handle.Length && !handle.Array[handle.Offset + i].IsEmpty(isZero); i++)
                {
                    if (handle.Array[handle.Offset + i].TimeIndex == timeIndex)
                    {
                        accum.Add(handle.Array[handle.Offset + i], axpy);
                    }
                }

                if (!accum.IsEmpty(isZero))
                {
                    toFill.Add(new Weighted <S>(accum.Value, 1));
                }
            }
            else
            {
                throw new NotImplementedException();
            }
        }