org.apache.mahout.math
Class OrderedIntDoubleMapping
java.lang.Object
org.apache.mahout.math.OrderedIntDoubleMapping
- All Implemented Interfaces:
- Serializable, Cloneable
public final class OrderedIntDoubleMapping
- extends Object
- implements Serializable, Cloneable
- See Also:
- Serialized Form
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.