Ejemplo n.º 1
0
        public static SpinResolved_DoubleMatrix operator -(SpinResolved_DoubleMatrix mat_1, SpinResolved_DoubleMatrix mat_2)
        {
            // check if lengths are the same
            if (mat_1.Nx != mat_2.Nx || mat_1.Ny != mat_2.Ny)
            {
                throw new ArrayTypeMismatchException();
            }

            SpinResolved_DoubleMatrix result = new SpinResolved_DoubleMatrix(mat_1.Nx, mat_1.Ny);

            result.Spin_Up   = mat_1.Spin_Up - mat_2.Spin_Up;
            result.Spin_Down = mat_1.Spin_Down - mat_2.Spin_Down;

            return(result);
        }
Ejemplo n.º 2
0
        public static SpinResolved_DoubleMatrix operator -(SpinResolved_DoubleMatrix mat_1, SpinResolved_DoubleMatrix mat_2)
        {
            // check if lengths are the same
            if (mat_1.Nx != mat_2.Nx || mat_1.Ny != mat_2.Ny)
                throw new ArrayTypeMismatchException();

            SpinResolved_DoubleMatrix result = new SpinResolved_DoubleMatrix(mat_1.Nx, mat_1.Ny);
            result.Spin_Up = mat_1.Spin_Up - mat_2.Spin_Up;
            result.Spin_Down = mat_1.Spin_Down - mat_2.Spin_Down;

            return result;
        }