org.opt4j.core.common.archive
Class ArchiveModule

java.lang.Object
  extended by com.google.inject.AbstractModule
      extended by org.opt4j.core.start.Opt4JModule
          extended by org.opt4j.core.common.archive.ArchiveModule
All Implemented Interfaces:
com.google.inject.Module

public class ArchiveModule
extends Opt4JModule

The ArchiveModule determines an implementation for the Archive interface.

See Also:
UnboundedArchive, PopulationArchive, CrowdingArchive, AdaptiveGridArchive, Archive

Nested Class Summary
static class ArchiveModule.Type
          Archive type.
 
Field Summary
protected  int capacity
           
protected  int divisions
           
protected  ArchiveModule.Type type
           
 
Fields inherited from class org.opt4j.core.start.Opt4JModule
SINGLETON
 
Constructor Summary
ArchiveModule()
           
 
Method Summary
 void config()
          Configure the module.
 int getCapacity()
          Returns the archive's capacity.
 int getDivisions()
          Returns the number of divisions for the AdaptiveGridArchive.
 ArchiveModule.Type getType()
          Returns the archive type.
 void setCapacity(int capacity)
          Sets the archive's capacity to the specified value.
 void setDivisions(int divisions)
          Set the number of divisions for the AdaptiveGridArchive.
 void setType(ArchiveModule.Type type)
          Sets the archive type to the specified value.
 
Methods inherited from class org.opt4j.core.start.Opt4JModule
addControlListener, addIndividualStateListener, addOptimizerIterationListener, addOptimizerStateListener, bindConstant, bindConstant, bindConstant, bindConstant, configure, constant, multi
 
Methods inherited from class com.google.inject.AbstractModule
addError, addError, addError, bind, bind, bind, bindConstant, binder, bindInterceptor, bindListener, bindScope, configure, convertToTypes, currentStage, getMembersInjector, getMembersInjector, getProvider, getProvider, install, requestInjection, requestStaticInjection, requireBinding, requireBinding
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

type

protected ArchiveModule.Type type

capacity

protected int capacity

divisions

protected int divisions
Constructor Detail

ArchiveModule

public ArchiveModule()
Method Detail

getDivisions

public int getDivisions()
Returns the number of divisions for the AdaptiveGridArchive.

Returns:
the number of divisions
See Also:
setDivisions(int)

setDivisions

public void setDivisions(int divisions)
Set the number of divisions for the AdaptiveGridArchive.

Parameters:
divisions - the number of divisions
See Also:
getDivisions()

setType

public void setType(ArchiveModule.Type type)
Sets the archive type to the specified value.

Parameters:
type - the new archive type
See Also:
getType()

getType

public ArchiveModule.Type getType()
Returns the archive type.

Returns:
the archive type
See Also:
setType(org.opt4j.core.common.archive.ArchiveModule.Type)

setCapacity

public void setCapacity(int capacity)
Sets the archive's capacity to the specified value.

Parameters:
capacity - the new capacity (using namespace BoundedArchive)
See Also:
getCapacity()

getCapacity

public int getCapacity()
Returns the archive's capacity.

Returns:
the archive's capacity
See Also:
setCapacity(int)

config

public void config()
Description copied from class: Opt4JModule
Configure the module. Bind constants, listeners, and bind arbitrary classes.

Specified by:
config in class Opt4JModule
See Also:
Binder