On Friday, 22 July 2022 at 05:17:49 UTC, anonymouse wrote:
On Wednesday, 20 July 2022 at 09:18:29 UTC, anonymouse wrote:
As for task 3, while I understand the concept of transposing a
matrix, I'm not sure how to even begin.
By not knowing how to begin, I mean that I don't know how to
On Wednesday, 20 July 2022 at 09:18:29 UTC, anonymouse wrote:
As for task 3, while I understand the concept of transposing a
matrix, I'm not sure how to even begin.
By not knowing how to begin, I mean that I don't know how to
generalize the algorithm so that it applies to an array of
On Wednesday, 20 July 2022 at 16:15:33 UTC, Salih Dincer wrote:
On Wednesday, 20 July 2022 at 09:18:29 UTC, anonymouse wrote:
Given an array of arbitrary dimensions, I would like to
accomplish three things:
1) verify that it is rectangular (e.g. all elements
have the same length,
On Wednesday, 20 July 2022 at 20:47:28 UTC, ag0aep6g wrote:
(Aside: You don't need that many backticks to mark code
fragments.)
Thought I was following the instructions but it looks like I got
a bit carried away. lol.
You've got a bug there. This should pass, but fails with your
version:
On 20.07.22 11:18, anonymouse wrote:
d
auto isRectangular(A)(A a) if (isArray!A)
{
bool result;
size_t length = a[0].length;
foreach (e; a) {
result = e.length == length;
}
return
On Wednesday, 20 July 2022 at 09:18:29 UTC, anonymouse wrote:
Given an array of arbitrary dimensions, I would like to
accomplish three things:
1) verify that it is rectangular (e.g. all elements
have the same length, all sub-elements have the same length,
etc.)
2) flatten
Given an array of arbitrary dimensions, I would like to
accomplish three things:
1) verify that it is rectangular (e.g. all elements have
the same length, all sub-elements have the same length, etc.)
2) flatten and return the flattened copy
3) transpose and return