Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- point = startDate;
- stepTimeSpan = (endDate - startDate) / (maxSteps - 1); //will fail if maxSteps = 1
- for (i = 0; i < maxSteps; i++)
- {
- records.Add(getClosestTo(point));
- point = point + stepTimeSpan;
- }
- return records;
- bucketStart = startDate;
- bucketTimeSpan = (endDate - startDate) / maxSteps;
- for (i = 0; i < maxSteps; i++)
- {
- bucket = getRecordsBetween(bucketStart, bucketStart + bucketTimeSpan);
- records.Add( new Record( AvgDate(bucket), AvgValue(bucket) ) );
- bucketStart = bucketStart + bucketTimeSpan;
- }
- return records;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement