Ejemplo n.º 1
0
        /// <summary>
        /// Backward sine transform.
        /// </summary>
        /// <param name="B">Array</param>
        /// <returns>Array</returns>
        public float[] Backward(float[] B)
        {
            int N = B.Length;

            float[,] U = SineTransform.Matrix(N);
            return(Matrice.Dot(B, U.Transponate()));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Forward sine transform.
        /// </summary>
        /// <param name="A">Array</param>
        /// <returns>Array</returns>
        public float[] Forward(float[] A)
        {
            int N = A.Length;

            float[,] U = SineTransform.Matrix(N);
            return(Matrice.Dot(A, U));
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Backward sine transform.
        /// </summary>
        /// <param name="B">Matrix</param>
        /// <returns>Matrix</returns>
        public Complex32[,] Backward(Complex32[,] B)
        {
            int N = B.GetLength(0), M = B.GetLength(1);

            float[,] U = SineTransform.Matrix(N);
            float[,] V = SineTransform.Matrix(M);

            if (direction == Direction.Both)
            {
                return(U.Transponate().Dot(B).Dot(V));
            }
            else if (direction == Direction.Vertical)
            {
                return(U.Transponate().Dot(B));
            }
            return(B.Dot(V));
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Forward sine transform.
        /// </summary>
        /// <param name="A">Matrix</param>
        /// <returns>Matrix</returns>
        public Complex32[,] Forward(Complex32[,] A)
        {
            int N = A.GetLength(0), M = A.GetLength(1);

            float[,] U = SineTransform.Matrix(N);
            float[,] V = SineTransform.Matrix(M);

            if (direction == Direction.Both)
            {
                return(U.Dot(A).Dot(V.Transponate()));
            }
            else if (direction == Direction.Vertical)
            {
                return(U.Dot(A));
            }
            return(A.Dot(V.Transponate()));
        }