/// <summary> /// Negates the elements of the array <paramref name="value"/> /// </summary> /// <param name="value">The array to negates</param> /// <param name="result">The result of negates</param> /// <param name="length">A 32-bit integer that represents the number of elements to negates</param> /// <param name="valueIndex">A 32-bit integer that represents the index in the <paramref name="value"/> array at which negates begins</param> /// <param name="resultIndex">A 32-bit integer that represents the index in the <paramref name="result"/> array at which copying result begins</param> /// <remarks>If the <paramref name="result"/> array is null, operation result copying to the <paramref name="value1"/></remarks> unsafe public override void Negation(Block2x2[] value, Block2x2[] result = null, int length = int.MaxValue, int valueIndex = 0, int resultIndex = 0) { Th.ThrowOneValueWithNullableResult(value, ref result, ref length, valueIndex, resultIndex); fixed(Block2x2 *valuePtr = value, resultPtr = result) DoubleArrayHelper.Negate((double *)valuePtr, (double *)resultPtr, length * 4, valueIndex * 4, resultIndex * 4); }
/// <summary> /// Adds the number <paramref name="value2"/> and the elements of array <paramref name="value1"/> /// </summary> /// <param name="value1">The array to addition</param> /// <param name="value2">The number, which will be addition with <paramref name="value1"/> array</param> /// <param name="result">The result of addition</param> /// <param name="length">A 32-bit integer that represents the number of elements to addition</param> /// <param name="value1Index">A 32-bit integer that represents the index in the <paramref name="value1"/> array at which addition begins</param> /// <param name="value2Index">A 32-bit integer that represents the index in the <paramref name="value2"/> array at which addition begins</param> /// <param name="resultIndex">A 32-bit integer that represents the index in the <paramref name="result"/> array at which copying result begins</param> /// <remarks>If the <paramref name="result"/> array is null, operation result copying to the <paramref name="value1"/></remarks> unsafe public override void Addition(Block2x2[] value1, Block2x2 value2, Block2x2[] result = null, int length = int.MaxValue, int value1Index = 0, int resultIndex = 0) { Th.ThrowOneValueWithNullableResult(value1, ref result, ref length, value1Index, resultIndex); fixed(Block2x2 *value1Ptr = value1, resultPtr = result) DoubleArrayHelper.Addition((double *)value1Ptr, value2.f00, value2.f01, value2.f10, value2.f11, (double *)resultPtr, length * 4, value1Index * 4, resultIndex * 4); }
/// <summary> /// Substraction second array from first /// </summary> /// <param name="value1">The minuend array</param> /// <param name="value2">The subtrahend array</param> /// <param name="result">The difference of arrays substraction</param> /// <param name="length">A 32-bit integer that represents the number of elements to substraction</param> /// <param name="value1Index">A 32-bit integer that represents the index in the <paramref name="value1"/> array at which substraction begins</param> /// <param name="value2Index">A 32-bit integer that represents the index in the <paramref name="value2"/> array at which substraction begins</param> /// <param name="resultIndex">A 32-bit integer that represents the index in the <paramref name="result"/> array at which copying result begins</param> /// <remarks>If the <paramref name="result"/> array is null, operation result copying to the <paramref name="value1"/></remarks> unsafe public override void Substraction(Block2x2[] value1, Block2x2[] value2, Block2x2[] result = null, int length = int.MaxValue, int value1Index = 0, int value2Index = 0, int resultIndex = 0) { Th.ThrowIfTwoValuesWithNullableResult(value1, value2, ref result, ref length, value1Index, value2Index, resultIndex); fixed(Block2x2 *value1Ptr = value1, value2Ptr = value2, resultPtr = result) DoubleArrayHelper.Substraction((double *)value1Ptr, (double *)value2Ptr, (double *)resultPtr, length * 4, value1Index * 4, value2Index * 4, resultIndex * 4); }
/// <summary> /// Adds the number <paramref name="value2"/> and the elements of array <paramref name="value1"/> /// </summary> /// <param name="value1">The array to addition</param> /// <param name="value2">The number, which will be addition with <paramref name="value1"/> array</param> /// <param name="result">The result of addition</param> /// <param name="length">A 32-bit integer that represents the number of elements to addition</param> /// <param name="value1Index">A 32-bit integer that represents the index in the <paramref name="value1"/> array at which addition begins</param> /// <param name="value2Index">A 32-bit integer that represents the index in the <paramref name="value2"/> array at which addition begins</param> /// <param name="resultIndex">A 32-bit integer that represents the index in the <paramref name="result"/> array at which copying result begins</param> /// <remarks>If the <paramref name="result"/> array is null, operation result copying to the <paramref name="value1"/></remarks> unsafe public override void Addition(Complex[] value1, Complex value2, Complex[] result = null, int length = int.MaxValue, int value1Index = 0, int resultIndex = 0) { Th.ThrowOneValueWithNullableResult(value1, ref result, ref length, value1Index, resultIndex); fixed(Complex *value1Ptr = value1, resultPtr = result) DoubleArrayHelper.Addition((double *)value1Ptr, value2.Real, value2.Imaginary, (double *)resultPtr, length * 2, value1Index * 2, resultIndex * 2); }
/// <summary> /// Invert the elements of array <paramref name="value"/>/> /// </summary> /// <param name="value">The array will be invert</param> /// <param name="result">The result of inverting</param> /// <param name="length">A 32-bit integer that represents the number of elements to invert</param> /// <param name="valueIndex">A 32-bit integer that represents the index in the <paramref name="value"/> array at which inverting begins</param> /// <param name="resultIndex">A 32-bit integer that represents the index in the <paramref name="result"/> array at which copying result begins</param> /// <remarks>If the <paramref name="result"/> array is null, operation result copying to the <paramref name="value1"/></remarks> unsafe public override void Inversion(double[] value, double[] result = null, int length = int.MaxValue, int valueIndex = 0, int resultIndex = 0) { Th.ThrowOneValueWithNullableResult(value, ref result, ref length, valueIndex, resultIndex); fixed(double *valuePtr = value, resultPtr = result) DoubleArrayHelper.Inverse(valuePtr, resultPtr, length, valueIndex, resultIndex); }
/// <summary> /// Division the elements of array <paramref name="value1"/> by elements of the array <paramref name="value2"/> /// </summary> /// <param name="value1">The dividend array</param> /// <param name="value2">The divisor array</param> /// <param name="result">The result of division</param> /// <param name="length">A 32-bit integer that represents the number of elements to division</param> /// <param name="value1Index">A 32-bit integer that represents the index in the <paramref name="value1"/> array at which division begins</param> /// <param name="value2Index">A 32-bit integer that represents the index in the <paramref name="value2"/> array at which division begins</param> /// <param name="resultIndex">A 32-bit integer that represents the index in the <paramref name="result"/> array at which copying result begins</param> /// <remarks>If the <paramref name="result"/> array is null, operation result copying to the <paramref name="value1"/></remarks> unsafe public override void Division(double[] value1, double[] value2, double[] result = null, int length = int.MaxValue, int value1Index = 0, int value2Index = 0, int resultIndex = 0) { Th.ThrowIfTwoValuesWithNullableResult(value1, value2, ref result, ref length, value1Index, value2Index, resultIndex); fixed(double *value1Ptr = value1, value2Ptr = value2, resultPtr = result) DoubleArrayHelper.Division(value1Ptr, value2Ptr, resultPtr, length, value1Index, value2Index, resultIndex); }
/// <summary> /// Multiplies the elements of array <paramref name="value1"/> to the <paramref name="value2"/> /// </summary> /// <param name="value1">The array to multiply</param> /// <param name="value2">The number, which will be multiply to the <paramref name="value1"/> array</param> /// <param name="result">The result of multiply</param> /// <param name="length">A 32-bit integer that represents the number of elements to multiply</param> /// <param name="value1Index">A 32-bit integer that represents the index in the <paramref name="value1"/> array at which multiply begins</param> /// <param name="resultIndex">A 32-bit integer that represents the index in the <paramref name="result"/> array at which copying result begins</param> /// <remarks>If the <paramref name="result"/> array is null, operation result copying to the <paramref name="value1"/></remarks> unsafe public override void Multiply(double[] value1, double value2, double[] result = null, int length = int.MaxValue, int value1Index = 0, int resultIndex = 0) { Th.ThrowOneValueWithNullableResult(value1, ref result, ref length, value1Index, resultIndex); fixed(double *value1Ptr = value1, resultPtr = result) DoubleArrayHelper.Multiply(value1Ptr, value2, resultPtr, length, value1Index, resultIndex); }
/// <summary> /// Comparison of two arrays /// </summary> /// <param name="value1">The first array to comparison</param> /// <param name="value2">The second array to comparison</param> /// <param name="length">A 32-bit integer that represents the number of elements to comparison</param> /// <param name="value1Index">A 32-bit integer that represents the index in the <paramref name="value1"/> array at which comparison begins</param> /// <param name="value2Index">A 32-bit integer that represents the index in the <paramref name="value2"/> array at which comparison begins</param> unsafe public override bool Equality(Block2x2[] value1, Block2x2[] value2, int length = int.MaxValue, int value1Index = 0, int value2Index = 0) { Th.ThrowIfTwoValues(value1, value2, ref length, value1Index, value2Index); bool returnValue; fixed(Block2x2 *value1Ptr = value1, value2Ptr = value2) returnValue = DoubleArrayHelper.Equal((double *)value1Ptr, (double *)value2Ptr, length * 4, value1Index * 4, value2Index * 4); return(returnValue); }
/// <summary> /// Summarizes the elements of the array <paramref name="value"/> /// </summary> /// <param name="value">The array to summariez</param> /// <param name="length">A 32-bit integer that represents the number of elements to summariez</param> /// <param name="valueIndex">A 32-bit integer that represents the index in the <paramref name="value"/> array at which summariez begins</param> /// <returns>Result of the elements summariez</returns> unsafe public override double Summary(double[] value, int length = int.MaxValue, int valueIndex = 0) { Th.ThrowIfOneValue(value, ref length, valueIndex); double returnValue = 0; fixed(double *valuePtr = value) returnValue = DoubleArrayHelper.Summary(valuePtr, length, valueIndex); return(returnValue); }