org.apache.mahout.math.hadoop.similarity.cooccurrence
Class Vectors

java.lang.Object
  extended by org.apache.mahout.math.hadoop.similarity.cooccurrence.Vectors

public class Vectors
extends Object


Method Summary
static Vector maybeSample(Vector original, int sampleSize)
           
static Vector merge(Iterable<VectorWritable> partialVectors)
           
static Vector read(org.apache.hadoop.fs.Path path, org.apache.hadoop.conf.Configuration conf)
           
static org.apache.mahout.math.map.OpenIntIntHashMap readAsIntMap(DataInput in)
           
static org.apache.mahout.math.map.OpenIntIntHashMap readAsIntMap(org.apache.hadoop.fs.Path path, org.apache.hadoop.conf.Configuration conf)
           
static Vector.Element[] toArray(VectorWritable vectorWritable)
           
static Vector topKElements(int k, Vector original)
           
static void write(Vector vector, org.apache.hadoop.fs.Path path, org.apache.hadoop.conf.Configuration conf)
           
static void write(Vector vector, org.apache.hadoop.fs.Path path, org.apache.hadoop.conf.Configuration conf, boolean laxPrecision)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

maybeSample

public static Vector maybeSample(Vector original,
                                 int sampleSize)

topKElements

public static Vector topKElements(int k,
                                  Vector original)

merge

public static Vector merge(Iterable<VectorWritable> partialVectors)

toArray

public static Vector.Element[] toArray(VectorWritable vectorWritable)

write

public static void write(Vector vector,
                         org.apache.hadoop.fs.Path path,
                         org.apache.hadoop.conf.Configuration conf)
                  throws IOException
Throws:
IOException

write

public static void write(Vector vector,
                         org.apache.hadoop.fs.Path path,
                         org.apache.hadoop.conf.Configuration conf,
                         boolean laxPrecision)
                  throws IOException
Throws:
IOException

readAsIntMap

public static org.apache.mahout.math.map.OpenIntIntHashMap readAsIntMap(org.apache.hadoop.fs.Path path,
                                                                        org.apache.hadoop.conf.Configuration conf)
                                                                 throws IOException
Throws:
IOException

readAsIntMap

public static org.apache.mahout.math.map.OpenIntIntHashMap readAsIntMap(DataInput in)
                                                                 throws IOException
Throws:
IOException

read

public static Vector read(org.apache.hadoop.fs.Path path,
                          org.apache.hadoop.conf.Configuration conf)
                   throws IOException
Throws:
IOException


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