Ejemplo n.º 1
0
        public override bool UnifyExplicitProperty(EqGoal goal)
        {
            var goalLabel = goal.Lhs.ToString();

            Debug.Assert(goalLabel != null);
            if (Shape.Concrete)
            {
                return(false);
            }

            var iType = Shape.GetInputType() as LineType?;

            Debug.Assert(iType != null);

            if (iType == LineType.GeneralForm)
            {
                if (SymA != null && SymA.Equals(goalLabel))
                {
                    return(true);
                }
                if (SymB != null && SymB.Equals(goalLabel))
                {
                    return(true);
                }
                if (SymC != null && SymC.Equals(goalLabel))
                {
                    return(true);
                }
            }

            if (iType == LineType.SlopeIntercept)
            {
                if (SymSlope != null && SymSlope.Equals(goalLabel))
                {
                    return(true);
                }
                if (SymIntercept != null && SymIntercept.Equals(goalLabel))
                {
                    return(true);
                }
            }

            return(false);
        }
Ejemplo n.º 2
0
 public static Expression SingleSymbol(SymA sym)
 {
     return(sym);
 }