def greedy_soft(self,weights,values,remaining):
        if len(weights) == 0:
            return 0.0
        
        if weights[0] <= remaining:
            score = self.greedy_soft(weights[1:],values[1:],remaining-weights[0])
            return values[0]+score
        else: 
            frac = float(remaining) / weights[0]
            score = frac*values[0]
            return score
dataset/ETHPy150Open bolme/pyvision/src/pyvision/optimize/testsuite.py/FitnessNapsack.greedy_soft/original