public static ref BlockVector <N, T> or <N, T>(BlockVector <N, T> x, BlockVector <N, T> y, ref BlockVector <N, T> dst) where N : ITypeNat, new() where T : unmanaged { gbitspan.or(x.Data, y.Data, dst.Data); return(ref dst); }
public static ref BlockVector <N, T> sub <N, T>(BlockVector <N, T> x, BlockVector <N, T> y, ref BlockVector <N, T> z) where N : ITypeNat, new() where T : unmanaged { ginx.sub(x.Data, y.Data, z.Data); return(ref z); }
public static ref BlockVector <T> sub <T>(BlockVector <T> x, BlockVector <T> y, ref BlockVector <T> z) where T : unmanaged { mathspan.sub(x.Unblocked, y.Unblocked, z.Unblocked); return(ref z); }
public static Span <N, bool> eq <N, T>(BlockVector <N, T> lhs, BlockVector <N, T> rhs) where N : ITypeNat, new() where T : unmanaged => mathspan.eq <T>(lhs.Unsized, rhs.Unsized).ToNatural <N, bool>();
public static Span <bool> eq <T>(BlockVector <T> lhs, in BlockVector <T> rhs)
public static BlockVector <N, T> Load <N, T>(Span <T> src, N n = default) where N : ITypeNat, new() where T : struct => BlockVector <N, T> .LoadAligned(Span256.Load(src));
public static string Fomat <N, T>(this BlockVector <N, T> src) where T : struct where N : ITypeNat, new() => src.Unsized.FormatList();
public static ref BlockVector <N, T> add <N, T>(BlockVector <N, T> x, BlockVector <N, T> y, ref BlockVector <N, T> dst) where N : ITypeNat, new() where T : unmanaged { ginx.add(x.Data, y.Data, dst.Data); return(ref dst); }
public static ref BlockVector <N, T> srl <N, T>(BlockVector <N, T> src, byte offset, ref BlockVector <N, T> dst) where N : ITypeNat, new() where T : unmanaged { gbitspan.srl(src.Data, offset, dst.Data); return(ref dst); }
public static void Fill <N, T>(this IPolyrand random, ref BlockVector <N, T> vector, N n = default) where T : struct where N : ITypeNat, new() => random.StreamTo <T>(nati <N>(), ref vector.Unsized[0]);
public static ref BlockVector <N, T> add <N, T>(BlockVector <N, T> src, T scalar, ref BlockVector <N, T> dst) where N : ITypeNat, new() where T : unmanaged { src.Data.CopyTo(dst.Data); mathspan.add(dst.Unsized, scalar); return(ref dst); }
/// <summary> /// Effects a component-wise contraction on the source vector on a source vector of unsigned primal type, /// dst[i] = src[i].Contract(max[i]) /// </summary> /// <param name="src">The vector to contract</param> /// <param name="max">The upper bound</param> /// <typeparam name="N">The length type</typeparam> /// <typeparam name="T">The unsigned primal type</typeparam> public static BlockVector <N, T> Contract <N, T>(this BlockVector <N, T> src, BlockVector <N, T> max) where N : ITypeNat, new() where T : struct { var dst = NatSpan.Alloc <N, T>(); for (var i = 0; i < dst.Length; i++) { dst[i] = Contractors.Contract(src[i], max[i]); } return(dst); }
public static T dot <N, T>(BlockVector <N, T> x, BlockVector <N, T> y) where N : ITypeNat, new() where T : unmanaged => mathspan.dot <T>(x.Unsized, y.Unsized);
public static T dot <T>(BlockVector <T> x, BlockVector <T> y) where T : unmanaged => mathspan.dot <T>(x.Unblocked, y.Unblocked);
public static ref BlockVector <T> div <T>(ref BlockVector <T> lhs, in BlockVector <T> rhs)
public static ref BlockVector <N, T> and <N, T>(BlockVector <N, T> lhs, BlockVector <N, T> rhs, ref BlockVector <N, T> dst) where N : ITypeNat, new() where T : unmanaged { gbitspan.and <T>(lhs.Data, rhs.Data, dst); return(ref dst); }
public static BlockVector <N, T> Alloc <N, T>(N n, T fill) where N : ITypeNat, new() where T : struct => BlockVector <N, T> .LoadAligned(Span256.Alloc <N, T>(fill));
public static ref BlockVector <N, T> and <N, T>(BlockVector <N, T> lhs, T rhs, ref BlockVector <N, T> dst) where N : ITypeNat, new() where T : unmanaged { lhs.Data.CopyTo(dst.Data); gbitspan.and(dst.Data, rhs); return(ref dst); }
public static BlockVector <N, T> Load <N, T>(N length, params T[] src) where N : ITypeNat, new() where T : struct => BlockVector <N, T> .LoadAligned(Span256.Load <T>(src));
public static ref BlockVector <T> negate <T>(ref BlockVector <T> src) where T : unmanaged { mathspan.negate(src.Unblocked); return(ref src); }