org.apache.mahout.clustering.classify
Class WeightedVectorWritable

java.lang.Object
  extended by org.apache.mahout.clustering.classify.WeightedVectorWritable
All Implemented Interfaces:
org.apache.hadoop.io.Writable
Direct Known Subclasses:
WeightedPropertyVectorWritable

public class WeightedVectorWritable
extends Object
implements org.apache.hadoop.io.Writable


Constructor Summary
WeightedVectorWritable()
           
WeightedVectorWritable(double weight, Vector vector)
           
 
Method Summary
 Vector getVector()
           
 double getWeight()
           
 void readFields(DataInput in)
           
 void setVector(Vector vector)
           
 String toString()
           
 void write(DataOutput out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WeightedVectorWritable

public WeightedVectorWritable()

WeightedVectorWritable

public WeightedVectorWritable(double weight,
                              Vector vector)
Method Detail

getVector

public Vector getVector()

setVector

public void setVector(Vector vector)

getWeight

public double getWeight()

readFields

public void readFields(DataInput in)
                throws IOException
Specified by:
readFields in interface org.apache.hadoop.io.Writable
Throws:
IOException

write

public void write(DataOutput out)
           throws IOException
Specified by:
write in interface org.apache.hadoop.io.Writable
Throws:
IOException

toString

public String toString()
Overrides:
toString in class Object


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