예제 #1
0
 public bool IsRealConstant()
 {
     return(CasInterface.EvalTrueQ(
                Mfs.And[
                    Mfs.NumericQ[Expression],
                    Mfs.Element[Expression, DomainSymbols.Reals]
                ]
                ));
 }
예제 #2
0
 public bool IsNonZeroRealConstant()
 {
     return(CasInterface.EvalTrueQ(
                Mfs.And[
                    Mfs.NumericQ[MathExpr],
                    Mfs.Element[MathExpr, DomainSymbols.Reals],
                    Mfs.Not[Mfs.PossibleZeroQ[MathExpr]]
                ]
                ));
 }
예제 #3
0
        public bool IsOrthogonal()
        {
            if (!IsSquare())
            {
                return(false);
            }

            var e = Mfs.Equal[Mfs.Dot[MathExpr, Mfs.Transpose[MathExpr]], Mfs.IdentityMatrix[Mfs.Dimensions[MathExpr]]];

            return(CasInterface.EvalTrueQ(e));
        }
예제 #4
0
        public bool IsDiagonal()
        {
            if (!IsSquare())
            {
                return(false);
            }

            var e = Mfs.Equal[MathExpr, Mfs.DiagonalMatrix[Mfs.Diagonal[MathExpr]]];

            return(CasInterface.EvalTrueQ(e));
        }
예제 #5
0
        public bool IsIdentity()
        {
            if (!IsSquare())
            {
                return(false);
            }

            var e = Mfs.Equal[MathExpr, Mfs.IdentityMatrix[Mfs.Dimensions[MathExpr]]];

            return(CasInterface.EvalTrueQ(e));
        }
예제 #6
0
 public bool IsSymmetric()
 {
     return(IsSquare() && CasInterface.EvalTrueQ(Mfs.SymmetricMatrixQ[MathExpr]));
 }
예제 #7
0
        public bool IsZero()
        {
            var e = Mfs.Apply[Mfs.And.MathExpr, Mfs.Flatten[Mfs.PossibleZeroQ[MathExpr]]];

            return(CasInterface.EvalTrueQ(e));
        }
예제 #8
0
 public bool IsConstant()
 {
     return(CasInterface.EvalTrueQ(Mfs.NumericQ[MathExpr]));
 }
예제 #9
0
 //TODO: Add more overloads to accept integers
 public bool IsEqualScalar(MathematicaScalar expr)
 {
     return(CasInterface.EvalTrueQ(Mfs.Equal[MathExpr, expr.MathExpr]));
 }
예제 #10
0
 public bool IsEqualZero()
 {
     return(CasInterface.EvalTrueQ(Mfs.Equal[MathExpr, CasConstants.ExprZero]));
 }
예제 #11
0
 public bool IsConstant()
 {
     return(CasInterface.EvalTrueQ(Mfs.NumericQ[Expression]));
 }
예제 #12
0
 //TODO: Add more overloads to accept integers
 public bool IsEqualScalar(MathematicaScalar expr)
 {
     return(CasInterface.EvalTrueQ(Mfs.Equal[Expression, expr.Expression]));
 }