private Matrix1D EstablishMatrixType(char type) { Matrix1D returnMatrix; if (type == 'M') { returnMatrix = new Matrix1D(MatrixType.Magnification, MagnificationSymbols.First()); MagnificationSymbols.Remove(MagnificationSymbols.First()); } else if (type == 'C') { returnMatrix = new Matrix1D(MatrixType.ChirpMultiplication, ChirpSymbols.First()); ChirpSymbols.Remove(ChirpSymbols.First()); } else { returnMatrix = new Matrix1D(MatrixType.FourierTransform, string.Empty); } return(returnMatrix); }
public static Matrix1D Inverse(this Matrix1D m) { return(new Matrix1D(m.D / m.Determinant(), -m.B / m.Determinant(), -m.C / m.Determinant(), m.A / m.Determinant())); }
public static MathObject Determinant(this Matrix1D m) { return(m.A * m.D - m.B * m.C); }
public static Matrix1D Transpose(this Matrix1D m) { return(new Matrix1D(m.A, m.C, m.B, m.D)); }
public static Matrix1D Multiply(this Matrix1D m, int constant) { return(new Matrix1D(m.A * constant, m.B * constant, m.C * constant, m.D * constant)); }
public static Matrix1D Multiply(this Matrix1D m, Matrix1D matrix) { return(new Matrix1D(m.A * matrix.A + m.B * matrix.C, m.A * matrix.B + m.B * matrix.D, m.C * matrix.A + m.D * matrix.C, m.C * matrix.B + m.D * matrix.D)); }
public static Matrix1D Add(this Matrix1D m, Matrix1D matrix) { return(new Matrix1D(m.A + matrix.A, m.B + matrix.B, m.C + matrix.C, m.D + matrix.D)); }