net.sourceforge.cilib.problem.boundaryconstraint
Class ClampingBoundaryConstraint

java.lang.Object
  extended by net.sourceforge.cilib.problem.boundaryconstraint.ClampingBoundaryConstraint
All Implemented Interfaces:
Serializable, BoundaryConstraint, Cloneable

public class ClampingBoundaryConstraint
extends Object
implements BoundaryConstraint

Prevent any Entity from over-shooting the problem search space. Any Entity that passes outside the search space is placed on the boundaries of the seach space.

Author:
gpampara
See Also:
Serialized Form

Constructor Summary
ClampingBoundaryConstraint()
           
 
Method Summary
 void enforce(Entity entity)
          Enforce the defined boundary constraint on the provided Entity.
 ClampingBoundaryConstraint getClone()
          Create a cloned copy of the current object and return it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClampingBoundaryConstraint

public ClampingBoundaryConstraint()
Method Detail

getClone

public ClampingBoundaryConstraint getClone()
Create a cloned copy of the current object and return it. In general the created copy will be a deep copy of the provided instance. As a result this operation an be quite expensive if used incorrectly.

Specified by:
getClone in interface BoundaryConstraint
Specified by:
getClone in interface Cloneable
Returns:
An exact clone of the current object instance.
See Also:
Object.clone()

enforce

public void enforce(Entity entity)
Enforce the defined boundary constraint on the provided Entity.

Specified by:
enforce in interface BoundaryConstraint
Parameters:
entity - The Entity with which the boundary is to be enforced.


Copyright © 2009 CIRG. All Rights Reserved.