@@ -268,22 +268,6 @@ auto sliced(size_t N, Iterator)(Iterator iterator, size_t[N] lengths...)
268
268
}
269
269
}
270
270
271
- // / $(LINK2 https://en.wikipedia.org/wiki/Vandermonde_matrix, Vandermonde matrix)
272
- @safe pure nothrow version(mir_test) unittest
273
- {
274
- import mir.ndslice.filling: fillVandermonde;
275
- import mir.ndslice.allocation: uninitSlice;
276
- auto x = [1.0 , 2 , 3 , 4 , 5 ].sliced;
277
- auto v = uninitSlice! double (x.length, x.length);
278
- v.fillVandermonde(x);
279
- assert (v ==
280
- [[ 1.0 , 1 , 1 , 1 , 1 ],
281
- [ 1.0 , 2 , 4 , 8 , 16 ],
282
- [ 1.0 , 3 , 9 , 27 , 81 ],
283
- [ 1.0 , 4 , 16 , 64 , 256 ],
284
- [ 1.0 , 5 , 25 , 125 , 625 ]]);
285
- }
286
-
287
271
// / Random access range primitives for slices over user defined types
288
272
@safe pure nothrow @nogc version(mir_test) unittest
289
273
{
@@ -298,6 +282,7 @@ auto sliced(size_t N, Iterator)(Iterator iterator, size_t[N] lengths...)
298
282
auto lightConst ()() const @property { return MyIota(); }
299
283
auto lightImmutable ()() immutable @property { return MyIota(); }
300
284
}
285
+
301
286
import mir.ndslice.iterator: FieldIterator;
302
287
alias Iterator = FieldIterator! MyIota;
303
288
alias S = Slice! (Iterator, 2 );
0 commit comments