## org.apache.mahout.common.distance
Class WeightedDistanceMeasure

    java.lang.Object
      org.apache.mahout.common.distance.WeightedDistanceMeasure

All Implemented Interfaces:
  DistanceMeasure, Parametered

Direct Known Subclasses:
  TanimotoDistanceMeasure, WeightedEuclideanDistanceMeasure, WeightedManhattanDistanceMeasure

    public abstract class WeightedDistanceMeasure

extends Object
implements DistanceMeasure

Abstract implementation of DistanceMeasure with support for weights.

Nested Class Summary

Nested classes/interfaces inherited from interface org.apache.mahout.common.parameters.Parametered
`Parametered.ParameteredGeneralizations`

Field Summary

Fields inherited from interface org.apache.mahout.common.parameters.Parametered
`log`

Constructor Summary
`WeightedDistanceMeasure()`

Method Summary
`void` `configure(org.apache.hadoop.conf.Configuration jobConf)`
`void` `createParameters(String prefix, org.apache.hadoop.conf.Configuration jobConf)` EXPERT: consumers should never have to call this method.
`Collection<Parameter<?>>` `getParameters()`
`Vector` `getWeights()`
`void` `setWeights(Vector weights)`

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

Methods inherited from interface org.apache.mahout.common.distance.DistanceMeasure
`distance, distance`

Constructor Detail

### WeightedDistanceMeasure

    public WeightedDistanceMeasure()

Method Detail

### createParameters

    public void createParameters(String prefix,
                                 org.apache.hadoop.conf.Configuration jobConf)

  Description copied from interface: `Parametered`
  EXPERT: consumers should never have to call this method. It would be friendly visible to `Parametered.ParameteredGeneralizations` if java supported it. Calling this method should create a new list of parameters and is called

  Specified by:
    `createParameters` in interface `Parametered`
  Parameters:
    `prefix` - ends with a dot if not empty.
    `jobConf` - configuration used for retrieving values
  See Also:
    `invoking method`, `invoking method`

### getParameters

    public Collection<Parameter<?>> getParameters()

  Specified by:
    `getParameters` in interface `Parametered`

### configure

    public void configure(org.apache.hadoop.conf.Configuration jobConf)

  Specified by:
    `configure` in interface `Parametered`

### getWeights

    public Vector getWeights()

### setWeights

    public void setWeights(Vector weights)

Copyright © 2008–2014 The Apache Software Foundation. All rights reserved.