www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Forward Difference Algorithm

reply =?UTF-8?B?Ik5vcmRsw7Z3Ig==?= <per.nordlow gmail.com> writes:
Is/Are there a function(s) in `std.algorithm` or `std.range` with 
which to lazily compute a forward difference? I need this to 
differentially pack sorted elements (integers) in a range. The 
integers happen to be `SysTime` timestamps.
Jan 08 2014
next sibling parent =?UTF-8?B?QWxpIMOHZWhyZWxp?= <acehreli yahoo.com> writes:
On 01/08/2014 11:40 AM, "Nordlöw" wrote:
 Is/Are there a function(s) in `std.algorithm` or `std.range` with which
 to lazily compute a forward difference? I need this to differentially
 pack sorted elements (integers) in a range. The integers happen to be
 `SysTime` timestamps.
There is a forward difference page on Rosetta Code: http://rosettacode.org/wiki/Forward_difference#D Ali
Jan 08 2014
prev sibling parent =?UTF-8?B?Ik5vcmRsw7Z3Ig==?= <per.nordlow gmail.com> writes:
On Wednesday, 8 January 2014 at 19:40:34 UTC, Nordlöw wrote:
 Is/Are there a function(s) in `std.algorithm` or `std.range` 
 with which to lazily compute a forward difference? I need this 
 to differentially pack sorted elements (integers) in a range. 
 The integers happen to be `SysTime` timestamps.
See also: https://stackoverflow.com/questions/21004944/forward-difference-algorithm
Jan 08 2014