choco.kernel.common.opres.pack
Class AbstractHeuristic1BP
java.lang.Object
choco.kernel.common.opres.heuristics.AbstractHeuristic
choco.kernel.common.opres.pack.AbstractHeuristic1BP
- All Implemented Interfaces:
- IHeuristic, ISolutionDisplay, IOptimizationMeasures, ISolutionMeasures, gnu.trove.TIntProcedure
- Direct Known Subclasses:
- BestFit1BP, FirstFit1BP
public abstract class AbstractHeuristic1BP
- extends AbstractHeuristic
- implements gnu.trove.TIntProcedure
The Class AbstractHeurisic1BP.
Field Summary |
protected int[] |
bins
|
protected int |
capacity
|
protected int |
full
|
protected gnu.trove.TIntArrayList |
items
|
protected int |
pos
|
Fields inherited from interface choco.kernel.common.opres.heuristics.IHeuristic |
LOGGER |
Methods inherited from class choco.kernel.common.opres.heuristics.AbstractHeuristic |
execute, executeQuick, existsSolution, getIterationCount, getNumberOfBins, getObjectiveValue, getSolutionCount, getTimeCount, hasSearched, isObjectiveOptimal, solutionToString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface gnu.trove.TIntProcedure |
execute |
capacity
protected int capacity
items
protected gnu.trove.TIntArrayList items
bins
protected int[] bins
pos
protected int pos
full
protected int full
AbstractHeuristic1BP
public AbstractHeuristic1BP()
createBin
protected void createBin(int size)
- Parameters:
size
- the size of the first item packed into the bin
removeBin
protected void removeBin(int offset)
pack
protected void pack(int offset,
int size)
reset
public void reset()
- Specified by:
reset
in interface IHeuristic
- Overrides:
reset
in class AbstractHeuristic
getItems
public final gnu.trove.TIntArrayList getItems()
setItems
public final void setItems(gnu.trove.TIntArrayList items)
setCapacity
public final void setCapacity(int capacity)
getCapacity
public final int getCapacity()
apply
public final int apply()
- Specified by:
apply
in class AbstractHeuristic
executeQuick
public final int executeQuick(gnu.trove.TIntArrayList items)
executeQuick
public final int executeQuick(gnu.trove.TIntArrayList items,
int capacity)
Copyright © 2012. All Rights Reserved.