partage
Class ComplexInstance.VolumeConstraint

java.lang.Object
  extended by partage.ComplexInstance.VolumeConstraint
All Implemented Interfaces:
ComplexInstance.Constraint
Enclosing class:
ComplexInstance

public static class ComplexInstance.VolumeConstraint
extends java.lang.Object
implements ComplexInstance.Constraint

A static class implementing the Volume constraint on a set of objects.

Version:
july 07
Author:
Sylvain Bouveret

Constructor Summary
ComplexInstance.VolumeConstraint(int[] _weights, int _maxWeight)
          The constructor of a VolumeConstraint object.
ComplexInstance.VolumeConstraint(int[] _objects, int[] _weights, int _maxWeight)
          The constructor of a VolumeConstraint object.
 
Method Summary
 int getMaxWeight()
          The standard getter to the maximal weight of the constraint.
 int[] getObjects()
          The standard getter to the set of objects
 int[] getWeights()
          The standard getter to the set of weights.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ComplexInstance.VolumeConstraint

public ComplexInstance.VolumeConstraint(int[] _objects,
                                        int[] _weights,
                                        int _maxWeight)
The constructor of a VolumeConstraint object.

Parameters:
_objects - the array of objects.
_weights - the array of weights (must be of the same size as _objects)
_maxWeight - the maximal weight allowed.

ComplexInstance.VolumeConstraint

public ComplexInstance.VolumeConstraint(int[] _weights,
                                        int _maxWeight)
The constructor of a VolumeConstraint object.

Parameters:
_weights - the array of weights. The constraint holds on all the objects from 1 to the length of _weight.
_maxWeight - the maximal weight allowed.
Method Detail

getObjects

public int[] getObjects()
The standard getter to the set of objects

Specified by:
getObjects in interface ComplexInstance.Constraint
Returns:
the array of objects concerned by the preemption constraint.

getMaxWeight

public int getMaxWeight()
The standard getter to the maximal weight of the constraint.

Returns:
the maximal weight allowed by the constraint.

getWeights

public int[] getWeights()
The standard getter to the set of weights.

Returns:
the array of weights of the constraint.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object