Example #1
0
 /// <summary>
 /// Samples values over an S-domain, transforms the sample into a T-domain and from this transformed
 /// sample constructs a square matrix of natural order
 /// </summary>
 /// <param name="random">The random source</param>
 /// <param name="domain">The sample domain</param>
 /// <param name="m">The row count</param>
 /// <param name="n">The column count</param>
 /// <param name="rep">A scalar representative</param>
 /// <typeparam name="N">The order type type</typeparam>
 /// <typeparam name="S">The sample type</typeparam>
 /// <typeparam name="T">The matrix element type</typeparam>
 public static BlockMatrix <N, T> BlockMatrix <N, S, T>(this IPolyrand random, Interval <S>?domain = null, N n = default, T rep = default)
     where N : ITypeNat, new()
     where T : struct
     where S : struct
 => random.BlockMatrix <N, S>(domain).Convert <T>();
Example #2
0
 public static BlockMatrix <N, float> BlockMatrixF32 <N, S, T>(this IPolyrand random, int?min = null, int?max = null, N n = default)
     where T : struct
     where S : struct
     where N : ITypeNat, new()
 => random.BlockMatrix <N, int, float>(closed(min ?? -25, max ?? 25));
Example #3
0
 public static BlockMatrix <M, N, double> BlockMatrixF64 <M, N, S, T>(this IPolyrand random, long?min = null, long?max = null, M m = default, N n = default)
     where T : struct
     where S : struct
     where M : ITypeNat, new()
     where N : ITypeNat, new()
 => random.BlockMatrix <M, N, long, double>(closed(min ?? -25L, max ?? 25L));