org.encog.ml.ea.score.parallel
Class ParallelScore
- java.lang.Object
-
- org.encog.ml.ea.score.parallel.ParallelScore
-
- All Implemented Interfaces:
- MultiThreadable
public class ParallelScore extends java.lang.Object implements MultiThreadable
This class is used to calculate the scores for an entire population. This is typically done when a new population must be scored for the first time.
-
-
Constructor Summary
Constructors Constructor and Description ParallelScore(Population thePopulation, GeneticCODEC theCODEC, java.util.List<AdjustScore> theAdjusters, CalculateScore theScoreFunction, int theThreadCount)Construct the parallel score calculation object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.util.List<AdjustScore>getAdjusters()GeneticCODECgetCodec()PopulationgetPopulation()CalculateScoregetScoreFunction()intgetThreadCount()voidprocess()Calculate the scores.voidreportError(java.lang.Exception ex)voidsetThreadCount(int numThreads)Set the number of threads to use.
-
-
-
Constructor Detail
-
ParallelScore
public ParallelScore(Population thePopulation, GeneticCODEC theCODEC, java.util.List<AdjustScore> theAdjusters, CalculateScore theScoreFunction, int theThreadCount)
Construct the parallel score calculation object.- Parameters:
thePopulation- The population to score.theCODEC- The CODEC to use.theAdjusters- The score adjusters to use.theScoreFunction- The score function.theThreadCount- The requested thread count.
-
-
Method Detail
-
getPopulation
public Population getPopulation()
- Returns:
- the population
-
getScoreFunction
public CalculateScore getScoreFunction()
- Returns:
- the scoreFunction
-
getCodec
public GeneticCODEC getCodec()
- Returns:
- the codec
-
process
public void process()
Calculate the scores.
-
getAdjusters
public java.util.List<AdjustScore> getAdjusters()
- Returns:
- The score adjusters.
-
getThreadCount
public int getThreadCount()
- Specified by:
getThreadCountin interfaceMultiThreadable- Returns:
- The desired number of threads.
-
setThreadCount
public void setThreadCount(int numThreads)
Description copied from interface:MultiThreadableSet the number of threads to use.- Specified by:
setThreadCountin interfaceMultiThreadable- Parameters:
numThreads- The desired thread count.
-
reportError
public void reportError(java.lang.Exception ex)
-
-
DMelt 3.0 © DataMelt by jWork.ORG