예제 #1
0
 /// <summary>
 /// [Compares two ADDs for equality within tolerance.]
 /// Description [Compares two ADDs for equality within tolerance. Two
 /// ADDs are reported to be equal if the maximum difference between them
 /// (the sup norm of their difference) is less than or equal to the
 /// tolerance parameter.
 /// </summary>
 /// <param name="add1"></param>
 /// <param name="add2"></param>
 /// <returns></returns>
 public static bool IsEqual(CUDDNode add1, CUDDNode add2)
 {
     if (CUDD.TERMINATION_CRITERIA > 0)
     {
         return(PlatformInvoke.Cudd_EqualSupNormRel(manager, add1.Ptr, add2.Ptr, TERMINATION_EPSILON, 0) > 0);
     }
     else
     {
         return(PlatformInvoke.Cudd_EqualSupNorm(manager, add1.Ptr, add2.Ptr, TERMINATION_EPSILON, 0) > 0);
     }
 }