|
Carrot2 Framework
API Specification |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.carrot2.filter.trc.util.ArrayIndexSorter
public class ArrayIndexSorter
Wrap array of double values offering sorting capabalities for indices
| Field Summary | |
|---|---|
protected boolean |
ascending
|
protected double[] |
values
|
| Constructor Summary | |
|---|---|
ArrayIndexSorter(double[] values)
Construct primive |
|
| Method Summary | |
|---|---|
int |
compare(Object o1,
Object o2)
|
boolean |
equals(Object obj)
|
int[] |
getNonZeroIndices()
|
int[] |
getSortedNonZeroIndices(boolean ascending)
|
void |
sort(int[] indices,
boolean ascending)
Sort indices regarding values in the array. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected double[] values
protected boolean ascending
| Constructor Detail |
|---|
public ArrayIndexSorter(double[] values)
values - | Method Detail |
|---|
public boolean equals(Object obj)
equals in interface Comparatorequals in class Object
public int compare(Object o1,
Object o2)
compare in interface Comparatorpublic int[] getNonZeroIndices()
public int[] getSortedNonZeroIndices(boolean ascending)
public void sort(int[] indices,
boolean ascending)
indices - indices to be sortedascending - indicate sort order
|
Please refer to project documentation at
http://project.carrot2.org |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||