def solve(self):
        # split into seperate lists
        weights = self.napsack[:,0].flatten()
        values  = self.napsack[:,1].flatten()

        # compute density        
        density = values/weights

        # Reorder by density
        order = density.argsort()[::-1]
        weights = weights[order]
        values = values[order]
        density = density[order]
        
        _ = self.greedy(weights,values,self.max_weight)
        #score = self.greedy_soft(weights,values,self.max_weight)
        #print "Greedy",score,remaining,solution
        #print "GreedySoft",self.greedy_soft(weights, values, self.max_weight)
        #print "Search",self.search(weights, values, self.max_weight,0.0,0.0,[])
dataset/ETHPy150Open bolme/pyvision/src/pyvision/optimize/testsuite.py/FitnessNapsack.solve/original