コード例 #1
0
ファイル: Spans.cs プロジェクト: 0xCM/arrows
 public static Span <N, T> Span <N, T>(this IPolyrand random, N length = default, Interval <T>?domain = null, Func <T, bool> filter = null)
     where T : struct
     where N : ITypeNat, new()
 => NatSpan.Load <N, T>(random.Span <T>((int)length.value, domain, filter));
コード例 #2
0
ファイル: Spans.cs プロジェクト: 0xCM/arrows
 public static Span <M, N, T> Span <M, N, T>(this IPolyrand random, M rows = default, N cols = default)
     where T : struct
     where M : ITypeNat, new()
     where N : ITypeNat, new()
 => NatSpan.Load <M, N, T>(random.Span <T>(nfunc.muli(rows, cols)), rows, cols);
コード例 #3
0
ファイル: Spans.cs プロジェクト: 0xCM/arrows
 public static Span <M, N, T> Span <M, N, T>(this IPolyrand random, M rows, N cols, Interval <T> domain)
     where T : struct
     where M : ITypeNat, new()
     where N : ITypeNat, new()
 => NatSpan.Load <M, N, T>(random.Span <T>(nfunc.muli(rows, cols), domain), rows, cols);