January 20, 2022 Learn » Re: automate tuple creation | |||
|---|---|---|---|
| |||
Don't make them random then, but use an incrementor. If you can have ids... | |||
January 20, 2022 Learn » Re: automate tuple creation | |||
|---|---|---|---|
| |||
all done ;-) // --- module test; import std.stdio : writeln; import std.range : iota, isForwardRange, hasSlicing, hasLength... | |||
January 20, 2022 Learn » Re: automate tuple creation | |||
|---|---|---|---|
| |||
arrg!
what was i thinking! ;-)
// ---
void makeUniqueIDs(ref uint[] arr, size_t sz)
{
arr.reserve... | |||
January 20, 2022 Learn » Re: automate tuple creation | |||
|---|---|---|---|
| |||
...matrix consisting of 5 tuples,
// with each tuple containing 3 random bools (0 or 1... | |||
January 20, 2022 Learn » Re: Using getSymbolsByUDA in a static foreach loop | |||
|---|---|---|---|
| |||
...getAttributes, member)` call always returns an empty tuple. Calling `__traits(getAttributes, Manager.subsystem)` manually works... | |||
January 19, 2022 Learn » Re: automate tuple creation | |||
|---|---|---|---|
| |||
Do the id's have to be unique? If not, std.random.uniform() would do... | |||
January 20, 2022 Learn » Re: automate tuple creation | |||
|---|---|---|---|
| |||
...number of bool values contained within each tuple. e.g. createBoolMatrix(mArrBool,3, 2); [[1... | |||
January 19, 2022 Learn » Re: automate tuple creation | |||
|---|---|---|---|
| |||
...not use a struct or std.typecons.Tuple instead? > > Premature optimization. ;-) Not in this case... | |||
January 19, 2022 Learn » Re: automate tuple creation | |||
|---|---|---|---|
| |||
...matrix consisting of 5 tuples, with each tuple containing 3 random bools (0 or 1... | |||
January 19, 2022 Learn » Re: automate tuple creation | |||
|---|---|---|---|
| |||
...matrix consisting of 5 tuples, with each tuple containing 3 random bools (0 or 1... | |||
Copyright © 1999-2021 by the D Language Foundation