org.apache.mahout.math
Class OrderedIntDoubleMapping

java.lang.Object
  extended by org.apache.mahout.math.OrderedIntDoubleMapping
All Implemented Interfaces:
Serializable, Cloneable

public final class OrderedIntDoubleMapping
extends Object
implements Serializable, Cloneable

See Also:
Serialized Form

Method Summary
 OrderedIntDoubleMapping clone()
           
 boolean equals(Object o)
           
 double get(int index)
           
 int[] getIndices()
           
 int getNumMappings()
           
 double[] getValues()
           
 int hashCode()
           
 void increment(int index, double increment)
           
 int indexAt(int offset)
           
 void merge(OrderedIntDoubleMapping updates)
          Merges the updates in linear time by allocating new arrays and iterating through the existing indices and values and the updates' indices and values at the same time while selecting the minimum index to set at each step.
 void set(int index, double value)
           
 void setIndexAt(int offset, int index)
           
 void setValueAt(int offset, double value)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

getIndices

public int[] getIndices()

indexAt

public int indexAt(int offset)

setIndexAt

public void setIndexAt(int offset,
                       int index)

getValues

public double[] getValues()

setValueAt

public void setValueAt(int offset,
                       double value)

getNumMappings

public int getNumMappings()

get

public double get(int index)

set

public void set(int index,
                double value)

merge

public void merge(OrderedIntDoubleMapping updates)
Merges the updates in linear time by allocating new arrays and iterating through the existing indices and values and the updates' indices and values at the same time while selecting the minimum index to set at each step.

Parameters:
updates - another list of mappings to be merged in.

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object

clone

public OrderedIntDoubleMapping clone()
Overrides:
clone in class Object

increment

public void increment(int index,
                      double increment)


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