public FVec GetChannel(uint channel) { ThrowIfDisposed(); using (var output = new FVec(Length)) { NativeMethods.fmat_get_channel(this, channel, output); var target = new FVec(output.Length); output.Copy(target); return(target); } }
public void Copy([NotNull] FVec target) { ThrowIfDisposed(); if (target == null) { throw new ArgumentNullException(nameof(target)); } if (target.Length != Length) { throw new ArgumentOutOfRangeException(nameof(target)); } NativeMethods.fvec_copy(this, target); }
public void WeightedCopy([NotNull] FVec weight, [NotNull] FVec target) { ThrowIfDisposed(); if (weight == null) { throw new ArgumentNullException(nameof(weight)); } if (target == null) { throw new ArgumentNullException(nameof(target)); } NativeMethods.fvec_weighted_copy(this, weight, target); }
public FVec VecMul([NotNull] FVec scale) { ThrowIfDisposed(); if (scale == null) { throw new ArgumentNullException(nameof(scale)); } if (scale.Length != Length) { throw new ArgumentOutOfRangeException(nameof(scale)); } var output = new FVec(Height); NativeMethods.fmat_vecmul(this, scale, output); return(output); }