jenes.tutorials.problem7
Class KnapsackLoggedProblem

java.lang.Object
  extended by jenes.tutorials.problem7.KnapsackLoggedProblem

public class KnapsackLoggedProblem
extends java.lang.Object

A tutorial showing how to log statistics on different media.

Since:
1.3
Version:
1.3
Author:
Luigi Troiano

Constructor Summary
KnapsackLoggedProblem(double[] utilities, double[] weights)
           
 
Method Summary
static KnapsackLoggedProblem build(int n)
           
 double getCapacity()
           
 double[] getUtilities()
           
 double[] getWeights()
           
static void main(java.lang.String[] args)
           
 void run()
           
 void setCapacity(double c)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KnapsackLoggedProblem

public KnapsackLoggedProblem(double[] utilities,
                             double[] weights)
                      throws java.io.IOException
Throws:
java.io.IOException
Method Detail

run

public void run()

getCapacity

public double getCapacity()

setCapacity

public void setCapacity(double c)

getUtilities

public double[] getUtilities()

getWeights

public double[] getWeights()

build

public static KnapsackLoggedProblem build(int n)
                                   throws java.io.FileNotFoundException,
                                          java.io.IOException
Throws:
java.io.FileNotFoundException
java.io.IOException

main

public static void main(java.lang.String[] args)
                 throws java.io.FileNotFoundException,
                        java.io.IOException
Throws:
java.io.FileNotFoundException
java.io.IOException