MattCodr wrote:
> I have a doubt about the best way to insert and move (not
> replace) some data on an array.
I have the vision, that a mapping from a dense range of integers to
some value type and wast (i.e. Theta( n)) changes of this mapping are a
severe hint for a maldesign.
-manfred
On 02/14/2012 12:34 AM, James Miller wrote:
On 14 February 2012 06:25, Timon Gehr wrote:
On 02/13/2012 03:19 PM, James Miller wrote:
On 11 February 2012 10:45, Jonathan M Daviswrote:
On Friday, February 10, 2012 13:32:56 Marco Leise wrote:
I know that feeling. I had no exposure to fun
On Tuesday, February 14, 2012 13:02:43 James Miller wrote:
> On 14 February 2012 12:45, Ali Çehreli wrote:
> > On 02/13/2012 03:34 PM, James Miller wrote:
> >> Saying "it is not quicksort as much as it may conceptually resemble
> >> quicksort" is kinda odd, its like saying "it is not a car, as muc
On 14 February 2012 12:45, Ali Çehreli wrote:
> On 02/13/2012 03:34 PM, James Miller wrote:
>
>> Saying "it is not quicksort as much as it may conceptually resemble
>> quicksort" is kinda odd, its like saying "it is not a car, as much as
>> it may conceptually resemble a car" because it doesn't ru
On 02/13/2012 03:34 PM, James Miller wrote:
> Saying "it is not quicksort as much as it may conceptually resemble
> quicksort" is kinda odd, its like saying "it is not a car, as much as
> it may conceptually resemble a car" because it doesn't run on petrol
> or gas, but instead runs on environmen
On 14 February 2012 06:25, Timon Gehr wrote:
> On 02/13/2012 03:19 PM, James Miller wrote:
>>
>> On 11 February 2012 10:45, Jonathan M Davis wrote:
>>>
>>> On Friday, February 10, 2012 13:32:56 Marco Leise wrote:
>>>
I know that feeling. I had no exposure to functional programming and
o
On 02/13/2012 03:19 PM, James Miller wrote:
On 11 February 2012 10:45, Jonathan M Davis wrote:
On Friday, February 10, 2012 13:32:56 Marco Leise wrote:
I know that feeling. I had no exposure to functional programming and
options like chain never come to my head. Although "map" is a concept tha
On 11 February 2012 10:45, Jonathan M Davis wrote:
> On Friday, February 10, 2012 13:32:56 Marco Leise wrote:
>> I know that feeling. I had no exposure to functional programming and
>> options like chain never come to my head. Although "map" is a concept that
>> I made friends with early.
>
> It w
On Friday, February 10, 2012 13:32:56 Marco Leise wrote:
> I know that feeling. I had no exposure to functional programming and
> options like chain never come to my head. Although "map" is a concept that
> I made friends with early.
It would benefit your programming in general to learn a function
Am 09.02.2012, 22:03 Uhr, schrieb MattCodr :
On Thursday, 9 February 2012 at 19:49:43 UTC, Timon Gehr wrote:
Note that this code does the same, but is more efficient if you don't
actually need the array:
Yes I know, In fact I need re-think the way I code with this new
features of D, like r
On Thursday, 9 February 2012 at 19:49:43 UTC, Timon Gehr wrote:
Note that this code does the same, but is more efficient if you
don't actually need the array:
Yes I know, In fact I need re-think the way I code with this new
features of D, like ranges for example.
Thanks,
Matheus.
On 02/09/2012 08:20 PM, MattCodr wrote:
On Thursday, 9 February 2012 at 18:30:22 UTC, Ali Çehreli wrote:
On 02/09/2012 03:47 AM, MattCodr wrote:
I have a doubt about the best way to insert and move (not replace) some
data on an array.
For example,
In some cases if I want to do action above, I
On 02/09/2012 11:03 AM, H. S. Teoh wrote:
> On Thu, Feb 09, 2012 at 10:30:22AM -0800, Ali Çehreli wrote:
> [...]
>> But if you don't actually want to modify the data, you can merely
>> access the elements in-place by std.range.chain:
>>
>> import std.stdio;
>> import std.range;
>>
>> void main()
>
On Thursday, 9 February 2012 at 18:30:22 UTC, Ali Çehreli wrote:
On 02/09/2012 03:47 AM, MattCodr wrote:
I have a doubt about the best way to insert and move (not
replace) some
data on an array.
For example,
In some cases if I want to do action above, I do a loop moving
the data
until the po
On Thu, Feb 09, 2012 at 10:30:22AM -0800, Ali Çehreli wrote:
[...]
> But if you don't actually want to modify the data, you can merely
> access the elements in-place by std.range.chain:
>
> import std.stdio;
> import std.range;
>
> void main()
> {
> int[] arr = [0,1,2,3,4,5,6,7,8,9];
> im
On 02/09/2012 03:47 AM, MattCodr wrote:
I have a doubt about the best way to insert and move (not replace) some
data on an array.
For example,
In some cases if I want to do action above, I do a loop moving the data
until the point that I want and finally I insert the new data there.
In D I di
On Thursday, 9 February 2012 at 12:51:09 UTC, Pedro Lacerda wrote:
I __believe__ that insertInPlace doesn't shift the elements,
Yes, It appears that it really doesn't shift the array,
insertInPlace just returns a new array with a new element in n
position.
Maybe this function do what you
I __believe__ that insertInPlace doesn't shift the elements, but use an
appender allocating another array instead.
Maybe this function do what you want.
int[] arr = [0,1,2,3,4,5,6,7,8,9];
void maybe(T)(T[] arr, size_t pos, T value) {
size_t i;
for (i = arr.length - 1; i >
18 matches
Mail list logo