applications
Class RecursiveBTKnapsack

java.lang.Object
  |
  +--applications.RecursiveBTKnapsack

public class RecursiveBTKnapsack
extends java.lang.Object


Constructor Summary
RecursiveBTKnapsack()
           
 
Method Summary
static double knapsack(double[] theProfit, double[] theWeight, double theCapacity)
           
static void main(java.lang.String[] args)
          test program
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RecursiveBTKnapsack

public RecursiveBTKnapsack()
Method Detail

knapsack

public static double knapsack(double[] theProfit,
                              double[] theWeight,
                              double theCapacity)
Parameters:
theProfit[1:theProfit.length] - is array of object profits
theWeight[1:theProfit.length] - is array of object weights
theCapacity - is knapsack capacity
Returns:
profit of best filling

main

public static void main(java.lang.String[] args)
test program