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

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

public final 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 OpenIntIntHashMap readAsIntMap(org.apache.hadoop.fs.Path path, org.apache.hadoop.conf.Configuration conf)
           
static Vector sum(Iterator<VectorWritable> vectors)
           
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)

sum

public static Vector sum(Iterator<VectorWritable> vectors)

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 OpenIntIntHashMap readAsIntMap(org.apache.hadoop.fs.Path path,
                                             org.apache.hadoop.conf.Configuration conf)
                                      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–2014 The Apache Software Foundation. All rights reserved.