示例#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 IsInvertable()
 {
     return(IsSquare() && CasInterface.EvalFalseQ(Mfs.PossibleZeroQ[Mfs.Det[MathExpr]]));
 }
示例#7
0
 public bool IsSymmetric()
 {
     return(IsSquare() && CasInterface.EvalTrueQ(Mfs.SymmetricMatrixQ[MathExpr]));
 }
示例#8
0
        public bool IsZero()
        {
            var e = Mfs.Apply[Mfs.And.MathExpr, Mfs.Flatten[Mfs.PossibleZeroQ[MathExpr]]];

            return(CasInterface.EvalTrueQ(e));
        }
示例#9
0
 public bool IsConstant()
 {
     return(CasInterface.EvalTrueQ(Mfs.NumericQ[MathExpr]));
 }
示例#10
0
 //TODO: Add more overloads to accept integers
 public bool IsEqualScalar(MathematicaScalar expr)
 {
     return(CasInterface.EvalTrueQ(Mfs.Equal[MathExpr, expr.MathExpr]));
 }
示例#11
0
 public bool IsPossibleScalar(MathematicaScalar expr)
 {
     return(CasInterface.EvalIsTrue(Mfs.PossibleZeroQ[Mfs.Subtract[MathExpr, expr.MathExpr]]));
 }
示例#12
0
 public bool IsEqualZero()
 {
     return(CasInterface.EvalTrueQ(Mfs.Equal[MathExpr, CasConstants.ExprZero]));
 }
示例#13
0
 public bool IsPossibleZero()
 {
     return(CasInterface.EvalIsTrue(Mfs.PossibleZeroQ[MathExpr]));
 }
示例#14
0
 public bool IsConstant()
 {
     return(CasInterface.EvalTrueQ(Mfs.NumericQ[Expression]));
 }
示例#15
0
 //TODO: Add more overloads to accept integers
 public bool IsEqualScalar(MathematicaScalar expr)
 {
     return(CasInterface.EvalTrueQ(Mfs.Equal[Expression, expr.Expression]));
 }