/* * Performs an iteration of it's delegate iteration strategy (by default the StandardDataClusteringIterationStrategy). * Reinitialises part of, or the whole, population if a change has taken place. * @param algorithm The algorithm using this iteration strategy */ @Override public void performIteration(DataClusteringPSO algorithm) { if (changeDetectionStrategy.detectChange()) { reinitialisePosition(algorithm.getTopology()); reinitialised = true; } delegate.performIteration(algorithm); }
/* * Sets the boundary constraint of the re-initialisation strategy as well as that of its delegate * @param boundaryConstraint The constraint to be given to this strategy as well as its delegate */ @Override public void setBoundaryConstraint(BoundaryConstraint boundaryConstraint) { this.boundaryConstraint = boundaryConstraint; delegate.setBoundaryConstraint(boundaryConstraint); }