public final class OrderedIntDoubleMapping extends Object implements Serializable, Cloneable
Modifier and Type | Method and Description |
---|---|
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() |
public int[] getIndices()
public int indexAt(int offset)
public void setIndexAt(int offset, int index)
public double[] getValues()
public void setValueAt(int offset, double value)
public int getNumMappings()
public double get(int index)
public void set(int index, double value)
public void merge(OrderedIntDoubleMapping updates)
updates
- another list of mappings to be merged in.public OrderedIntDoubleMapping clone()
public void increment(int index, double increment)
Copyright © 2008–2017 The Apache Software Foundation. All rights reserved.