Beispiel #1
0
 public static bool IsInteger(double x)
 {
     return(Utilities.CompareValues(x, (int)x));
 }
Beispiel #2
0
 //
 // Given a list of grounded clauses, add a new value which is structurally unique.
 //
 public static bool HasStructurally <T>(List <T> list, T t) where T : ConcreteAST.GroundedClause
 {
     return(Utilities.StructuralIndex <T>(list, t) != -1);
 }
Beispiel #3
0
 // -1 is an error
 public static int IntegerRatio(double x, double y)
 {
     return(Utilities.CompareValues(x / y, Math.Floor(x / y)) ? (int)Math.Floor(x / y) : -1);
 }