示例#1
0
 /// <summary>Initializes a new instance of the <see cref="T:System.Object"></see> class.</summary>
 public ArrayRollingWindow(int outputCount, int properties, string name = null)
 {
     OutputCount     = outputCount;
     InputProperties = Properties = properties;
     Current         = new DoubleArray2DManaged(OutputCount, Properties);
     Name            = name ?? $"WINDOW({OutputCount}, {Properties})";
 }
示例#2
0
        /// <summary>
        ///     Clones current DoubleArray.
        /// </summary>
        /// <returns>A new copy of this.</returns>
        public override unsafe DoubleArray Clone()
        {
            var ret = new DoubleArray2DManaged(Count, Properties);

            fixed(double *src = internalArray, dst = ret)
            Unsafe.CopyBlock(dst, src + start, (uint)(sizeof(double) * LinearLength));

            return(ret);
        }
示例#3
0
 /// <param name="values">The structure value that'll be wrapped.</param>
 /// <remarks>This constructor copies given <paramref name="values"/> to a double[Count, Properties]</remarks>
 public DoubleArrayPinned2DManaged(double[][] values) : this(DoubleArray2DManaged.ToMultiDimArray(values))
 {
 }