Hello,
I want to fill an array with random numbers without resorting to
loops, i.e. by doing something like the following, if it were
possible:
fill!(function double(){ return uniform(0.0, 1.0);})(x[]);
Is there a simple way of doing this?
Thank you,
Dominic Jones
P.S. I am aware of the
e. without using foreach)? And
will such statements one day be possible?
The section in http://dlang.org/arrays.html on rectangular arrays
offers no use cases to follow.
Thank you,
Dominic Jones
/src, what I found didn't offer any
help.
-Dominic Jones
looking at function literals,
I can't work out what he had in mind with this suggestion. May someone present
a succinct
complete example to demonstrate how solve this?
Many thanks,
Dominic Jones
To conclude the matter regarding the absence of a FIFO stack in the
standard library and the not so good alternative of arrays (in
particular where there are a significant number of push-pops and the
maximum length is not initially known):
Does anyone in-the-know know if something like "DList" (a
> Also an plain array is a good stack. :)
I'd rather not use a plain array because (I assume) that when I push
or pop using arrays, a swap array is created to resize the original.
If this is not the case, then an array will certainly do.
-Dominic
you,
Dominic Jones
, to compile and run C/MPI programs, wrapper commands
are used, such as mpicc and mpirun. What would be done in D?
Thank you,
Dominic Jones
Hello,
Is there a library function for min/max for integers. I would rather not use
the ?-operator, it's rather clumsy. I looked in the standard lib and only
found f(min|max).
Thank you,
Dominic Jones
== Quote from bearophile (bearophileh...@lycos.com)'s article
> Dominic Jones:
> > I have a list of strings and I want to determine whether or not a particular
> > string in the is in that list.
> What about using:
> size_t[sting] yourStringSet;
> Bye,
> bearophile
documentation for it has no
examples. May someone offer an example of how to use it?
Thank you,
Dominic Jones
Hello,
I want to allocate the "int[]" array for a particular key in
int[][string] list;
by doing
list[key].length = list[key].length + 1;
but it does not work. I get an array bounds error. I am using gdc 4.3.5. Any
suggestions?
Thank you,
Dominic Jones
12 matches
Mail list logo