Thread overview | |||||
---|---|---|---|---|---|
|
December 26, 2017 Difference in reduce in std and mir | ||||
---|---|---|---|---|
| ||||
Hi All, What is the difference between std.algorithm.reduce and mir.ndslice.algorithm.reduce. From, Vino.B |
December 26, 2017 Re: Difference in reduce in std and mir | ||||
---|---|---|---|---|
| ||||
Posted in reply to Vino | On Tuesday, 26 December 2017 at 15:56:19 UTC, Vino wrote: > Hi All, > > What is the difference between std.algorithm.reduce and mir.ndslice.algorithm.reduce. > > > > From, > Vino.B Mir's reduce works on Slices whereas Phobos's reduce works on Arrays/Ranges. See also: http://docs.algorithm.dlang.io/latest/mir_ndslice_slice.html |
December 29, 2017 Re: Difference in reduce in std and mir | ||||
---|---|---|---|---|
| ||||
Posted in reply to Seb | On Tuesday, 26 December 2017 at 16:12:07 UTC, Seb wrote:
> On Tuesday, 26 December 2017 at 15:56:19 UTC, Vino wrote:
>> Hi All,
>>
>> What is the difference between std.algorithm.reduce and mir.ndslice.algorithm.reduce.
>>
>>
>>
>> From,
>> Vino.B
>
> Mir's reduce works on Slices whereas Phobos's reduce works on Arrays/Ranges.
>
> See also: http://docs.algorithm.dlang.io/latest/mir_ndslice_slice.html
Mir's reduce works for arrays and ranges too. The difference it that how it works for Slices: it reduces all dimensions of top dimension pack. -- Ilya
|
Copyright © 1999-2021 by the D Language Foundation