## org.apache.mahout.math.hadoop.similarity
Class RowSimilarityJob.RowWeightMapper

    java.lang.Object
      org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.IntWritable,VectorWritable,VarIntWritable,org.apache.mahout.math.hadoop.similarity.WeightedOccurrence>
          org.apache.mahout.math.hadoop.similarity.RowSimilarityJob.RowWeightMapper

Enclosing class:
  RowSimilarityJob

    public static class RowSimilarityJob.RowWeightMapper

extends org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.IntWritable,VectorWritable,VarIntWritable,org.apache.mahout.math.hadoop.similarity.WeightedOccurrence>

applies `DistributedVectorSimilarity.weight(Vector)` to each row of the input matrix

Nested Class Summary

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

Constructor Summary
`RowSimilarityJob.RowWeightMapper()`

Method Summary
`protected void` `map(org.apache.hadoop.io.IntWritable row, VectorWritable vectorWritable, org.apache.hadoop.mapreduce.Mapper.Context ctx)`
`protected void` `setup(org.apache.hadoop.mapreduce.Mapper.Context ctx)`

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`

Constructor Detail

### RowSimilarityJob.RowWeightMapper

    public RowSimilarityJob.RowWeightMapper()

Method Detail

### setup

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

  Overrides:
    `setup` in class `org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.IntWritable,VectorWritable,VarIntWritable,org.apache.mahout.math.hadoop.similarity.WeightedOccurrence>`
  Throws:
    `java.io.IOException`
    `java.lang.InterruptedException`

### map

    protected void map(org.apache.hadoop.io.IntWritable row,
                       VectorWritable vectorWritable,
                       org.apache.hadoop.mapreduce.Mapper.Context ctx)
                throws java.io.IOException,
                       java.lang.InterruptedException

  Overrides:
    `map` in class `org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.IntWritable,VectorWritable,VarIntWritable,org.apache.mahout.math.hadoop.similarity.WeightedOccurrence>`
  Throws:
    `java.io.IOException`
    `java.lang.InterruptedException`

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