|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object infovis.utils.ChangeManager infovis.utils.Permutation
public class Permutation
Maintain a permutation of indices.
Maintain two tables called direct
and inverse
.
The direct
table usually is the result of a indirect sort over
a column. It contains the index of the rows sorted in a specific order. For
example, if a column containing {6, 7, 5} is sorted in ascending order, the
direct table will contain {2, 0, 1}.
The inverse
table contains the index of a given row. With the
previous example, it contains {1, 2, 0} meaning that the index or rows
{0,1,2} are {1,2,0}.
Constructor Summary | |
---|---|
Permutation()
|
|
Permutation(int size)
|
|
Permutation(RowIterator iter)
|
Method Summary | |
---|---|
void |
clear()
|
int |
compare(int row1,
int row2)
|
void |
fillPermutation(int size)
|
void |
fillPermutation(int size,
RowComparator comp)
|
void |
fillPermutation(int size,
RowFilter filter)
|
void |
fillPermutation(RowIterator iter)
|
void |
filter(int row)
|
void |
filter(RowComparator comp)
|
void |
filter(RowFilter filter)
|
void |
filter(RowIterator iter)
|
int |
getDirect(int i)
Returns the row at a specified index. |
int |
getDirectCount()
|
int |
getInverse(int i)
Return the index of a specified row. |
int |
getInverseSize()
|
int |
getMaxIndex()
|
int |
getMinIndex()
|
void |
inverse()
|
boolean |
isValueUndefined(int row)
Returns true if the value at the specified row is undefined. |
RowIterator |
iterator()
|
void |
recomputeInverse()
|
RowIterator |
reverseIterator()
|
void |
shuffle()
|
void |
shuffle(int seed)
|
int |
size()
Returns the size of the direct table. |
void |
sort(RowComparator comp)
|
Methods inherited from class infovis.utils.ChangeManager |
---|
addChangeListener, disableNotify, enableNotify, getModCount, removeChangeListener |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface cern.colt.function.IntComparator |
---|
equals |
Constructor Detail |
---|
public Permutation(int size)
public Permutation(RowIterator iter)
public Permutation()
Method Detail |
---|
public void clear()
public void fillPermutation(int size)
public void fillPermutation(RowIterator iter)
public void fillPermutation(int size, RowComparator comp)
public void fillPermutation(int size, RowFilter filter)
public void shuffle(int seed)
public void shuffle()
public void inverse()
public int getDirect(int i)
i
- the index
public int getDirectCount()
public int getInverse(int i)
i
- the row
public void recomputeInverse()
public void sort(RowComparator comp)
public void filter(RowComparator comp)
public void filter(RowFilter filter)
public void filter(int row)
public void filter(RowIterator iter)
public int size()
public int getInverseSize()
public RowIterator iterator()
public RowIterator reverseIterator()
public int compare(int row1, int row2)
compare
in interface IntComparator
public boolean isValueUndefined(int row)
RowComparator
true
if the value at the specified row is undefined.
isValueUndefined
in interface RowComparator
row
- the row.
true
if the value at the specified row is undefined.public int getMinIndex()
public int getMaxIndex()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |