]> gitweb.michael.orlitzky.com - dead/census-tools.git/commitdiff
Added the variables() method to the SimplexIteration class.
authorMichael Orlitzky <michael@orlitzky.com>
Fri, 18 Jun 2010 05:46:33 +0000 (01:46 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Fri, 18 Jun 2010 05:46:33 +0000 (01:46 -0400)
src/LinearProgramming.py

index 2e8477d609fac8869cb41e23e14fcc89c2d7a1c9..4211058df56d904f2d5bae46c22b8e58848b0f35 100644 (file)
@@ -382,6 +382,15 @@ class SimplexIteration(object):
         self._solution_vector = array(value)
 
 
+    @property
+    def variables(self):
+        vars = []
+        for idx in range(1, len(self.solution_vector)+1):
+            vars.append("x" + str(idx))
+
+        return vars
+
+
     @property
     def basic_variables(self):
         # The current set of basic variables. Constructed from the