[PPL-devel] [GIT] ppl/ppl(master): Added a Java testcase for method drop_some_non_integer_points().
Enea Zaffanella
zaffanella at cs.unipr.it
Thu Aug 30 15:21:10 CEST 2012
Module: ppl/ppl
Branch: master
Commit: ec402f20b005730cac93521b9ce89718da352e00
URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=ec402f20b005730cac93521b9ce89718da352e00
Author: Enea Zaffanella <zaffanella at cs.unipr.it>
Date: Thu Aug 30 15:15:47 2012 +0200
Added a Java testcase for method drop_some_non_integer_points().
---
interfaces/Java/tests/C_Polyhedron_test1.java | 21 +++++++++++++++++++++
1 files changed, 21 insertions(+), 0 deletions(-)
diff --git a/interfaces/Java/tests/C_Polyhedron_test1.java b/interfaces/Java/tests/C_Polyhedron_test1.java
index 5859893..001b339 100644
--- a/interfaces/Java/tests/C_Polyhedron_test1.java
+++ b/interfaces/Java/tests/C_Polyhedron_test1.java
@@ -93,6 +93,27 @@ public class C_Polyhedron_test1 {
return cs.isEmpty();
}
+ public static boolean test03() {
+ Variable A = new Variable(0);
+ Variable B = new Variable(1);
+ Generator_System gs = new Generator_System();
+ gs.add(Generator.point(new Linear_Expression_Variable(A),
+ new Coefficient(2)));
+ gs.add(Generator.point(new Linear_Expression_Variable(B),
+ new Coefficient(2)));
+ C_Polyhedron ph = new C_Polyhedron(gs);
+ Variables_Set var_set = new Variables_Set();
+ var_set.add(B);
+ ph.drop_some_non_integer_points(var_set,
+ Complexity_Class.ANY_COMPLEXITY);
+ Generator_System gs_out = ph.minimized_generators();
+ boolean ok = (gs_out.size() == 1);
+ ph.drop_some_non_integer_points(Complexity_Class.ANY_COMPLEXITY);
+ gs_out = ph.minimized_generators();
+ ok = ok && gs_out.isEmpty();
+ return ok;
+ }
+
public static void main(String[] args) {
Parma_Polyhedra_Library.initialize_library();
boolean test_result_ok =
More information about the PPL-devel
mailing list