/// <summary> /// Copies the given array to a new <see cref="DynamicArray{T}"/>. /// Each element is copied at the same indexes using the /// <see cref="DynamicArray{T}.Item"/> indexer. /// </summary> /// <param name="arr"> The array to convert to a dynamic array. </param> /// <typeparam name="T"> The type of the elements of the DynamicArray to create. </typeparam> /// <returns> The resulting new <see cref="DynamicArray{T}"/>. </returns> internal static DynamicArray <T> ToDynamic <T>(Array arr) { var copyToAction = new CopyToDynamicArrayAction <T>(arr.Rank); RecursiveArrayEnumerator.Iterate(arr, copyToAction.Enumerate); return(copyToAction.DArray); }
private static void TestRange(IterationData itdata) { var ienum = new IndexesEnumerator(itdata.End, itdata.Start, itdata.Reverse); RecursiveArrayEnumerator.Iterate( null, itdata.Start, itdata.End, new IndexesEnumeratorTestAction(ienum).Iterate, itdata.Reverse); }
public static void Included <T>(DynamicArray <T> dynarray, Array arr, int[] position, int[] lower, int[] upper) { RecursiveArrayEnumerator.Iterate(arr, lower, upper, new Inclusion <T>(dynarray, position, lower).Enumerate, false); }
public static void Included <T>(DynamicArray <T> dynarray, Array arr, params int[] position) { RecursiveArrayEnumerator.Iterate(arr, new Inclusion <T>(dynarray, position).Enumerate); }
internal ArrayHelper FillWith(string prefix) { RecursiveArrayEnumerator.Iterate(this.result, new FillAction(prefix).Enumerate); return(this); }