YAMP.EigValFunction.Function C# (CSharp) Method

Function() private method

private Function ( MatrixValue M ) : MatrixValue
M MatrixValue
return MatrixValue
        public MatrixValue Function(MatrixValue M)
        {
            var ev = new Eigenvalues(M as MatrixValue);
            var m = new MatrixValue(ev.RealEigenvalues.Length, 1);

            for (var i = 1; i <= ev.RealEigenvalues.Length; i++)
            {
                m[i, 1] = new ScalarValue(ev.RealEigenvalues[i - 1], ev.ImagEigenvalues[i - 1]);
            }

            return m;
        }
EigValFunction