## org.apache.mahout.ga.watchmaker
Class EvalMapper

    java.lang.Object
      org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text,org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.DoubleWritable>
          org.apache.mahout.ga.watchmaker.EvalMapper

    public class EvalMapper

extends org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text,org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.DoubleWritable>

Generic Mapper class for fitness evaluation. Works with the following : `<key, candidate, key, fitness>`, where :

key: position of the current candidate in the input file.
candidate: candidate solution to evaluate.
fitness: evaluated fitness for the given candidate.

Nested Class Summary

Nested classes/interfaces inherited from class org.apache.hadoop.mapreduce.Mapper
`org.apache.hadoop.mapreduce.Mapper.Context`

Field Summary
`static java.lang.String` `MAHOUT_GA_EVALUATOR` Parameter used to store the "stringified" evaluator

Constructor Summary
`EvalMapper()`

Method Summary
`void` `map(org.apache.hadoop.io.LongWritable key, org.apache.hadoop.io.Text value, org.apache.hadoop.mapreduce.Mapper.Context context)`
`void` `setup(org.apache.hadoop.mapreduce.Mapper.Context context)`

Methods inherited from class org.apache.hadoop.mapreduce.Mapper
`cleanup, run`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### MAHOUT_GA_EVALUATOR

    public static final java.lang.String MAHOUT_GA_EVALUATOR

  Parameter used to store the "stringified" evaluator

  See Also:
    Constant Field Values

Constructor Detail

### EvalMapper

    public EvalMapper()

Method Detail

### setup

    public void setup(org.apache.hadoop.mapreduce.Mapper.Context context)
               throws java.io.IOException,
                      java.lang.InterruptedException

  Overrides:
    `setup` in class `org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text,org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.DoubleWritable>`
  Throws:
    `java.io.IOException`
    `java.lang.InterruptedException`

### map

    public void map(org.apache.hadoop.io.LongWritable key,
                    org.apache.hadoop.io.Text value,
                    org.apache.hadoop.mapreduce.Mapper.Context context)
             throws java.io.IOException,
                    java.lang.InterruptedException

  Overrides:
    `map` in class `org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text,org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.DoubleWritable>`
  Throws:
    `java.io.IOException`
    `java.lang.InterruptedException`

Copyright © 2008-2010 The Apache Software Foundation. All Rights Reserved.