Add license to examples
[linpy.git] / examples / nsad2010.py
index 8194618..91a85b4 100755 (executable)
@@ -1,6 +1,23 @@
 #!/usr/bin/env python3
-
-from pypol import *
+#
+# Copyright 2014 MINES ParisTech
+#
+# This file is part of LinPy.
+#
+# LinPy is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# LinPy is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with LinPy.  If not, see <http://www.gnu.org/licenses/>.
+
+from linpy import *
 
 
 class Transformer:
@@ -22,7 +39,7 @@ class Transformer:
         polyhedron = self.polyhedron
         for x, xprime, dx in zip(self.range_symbols, self.domain_symbols, delta_symbols):
             polyhedron &= Eq(dx, xprime - x)
-        polyhedron = polyhedron.project_out(self.symbols)
+        polyhedron = polyhedron.project(self.symbols)
         equalities, inequalities = [], []
         for equality in polyhedron.equalities:
             equality += (k-1) * equality.constant
@@ -31,10 +48,10 @@ class Transformer:
             inequality += (k-1) * inequality.constant
             inequalities.append(inequality)
         polyhedron = Polyhedron(equalities, inequalities) & Ge(k, 0)
-        polyhedron = polyhedron.project_out([k])
+        polyhedron = polyhedron.project([k])
         for x, xprime, dx in zip(self.range_symbols, self.domain_symbols, delta_symbols):
             polyhedron &= Eq(dx, xprime - x)
-        polyhedron = polyhedron.project_out(delta_symbols)
+        polyhedron = polyhedron.project(delta_symbols)
         return Transformer(polyhedron, self.range_symbols, self.domain_symbols)