|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object infovis.utils.ChangeManager infovis.column.AbstractColumn infovis.column.BasicColumn infovis.column.LiteralColumn infovis.column.IntColumn infovis.column.HistogramColumn
public class HistogramColumn
Column computing and maintaining the histogram of a specified
NumberColumn
.
Field Summary |
---|
Fields inherited from class infovis.column.AbstractColumn |
---|
MODIFIED_ALL, MODIFIED_NONE |
Fields inherited from interface infovis.metadata.Constants |
---|
CONTRIBUTOR, COVERAGE, CREATOR, DATE, DESCRITION, FORMAT, IDENTIFIER, LANGUAGE, PUBLISHER, RELATION, RIGHTS, SOURCE, SUBJECT, TITLE, TYPE |
Constructor Summary | |
---|---|
HistogramColumn(NumberColumn column)
Constructor. |
|
HistogramColumn(NumberColumn column,
int bins)
Constructor. |
Method Summary | |
---|---|
void |
clear()
Removes all of the elements from this column. The Column will be empty after this call returns. WARNING: if there is an associated format that maintains a status, such as a CategoricalFormat , it
is not cleared so results may not be what you expected. The
CategoricalFormat can be cleared explicitely if
needed. |
void |
dispose()
Releases listeners. |
int |
get(int index)
Returns the element at the specified position in this column. |
NumberColumn |
getColumn()
Returns the column from which this histogram is built. |
IntArrayList |
getValueReference()
Returns the DoubleArrayList backing the implementation of the column (USE WITH CARE). |
RowIterator |
iterator()
Returns a RowIterator over all the valid rows of this column. |
void |
set(int index,
int element)
Replaces the element at the specified position in this column with the specified element. |
boolean |
setColumn(NumberColumn col)
Sets the column from which the histogram is built. |
void |
setSize(int newSize)
Sets the sizeColumn of this column. If the new sizeColumn is greater than the current sizeColumn, new 0 items
are added to the end of the column. If the new sizeColumn is
less than the current sizeColumn, all components at index
newSize and greater are discarded. |
int |
size()
Returns the number of elements in this column. |
void |
sort(RowComparator comp)
Sort the values of this column according to a comparator. |
void |
stableSort(RowComparator comp)
Sort the values of this column according to a comparator using a stable sort algorithm. |
void |
stateChanged(ChangeEvent e)
|
int[] |
toArray()
Returns the array of integer values used by the column. |
int[] |
toArray(int[] a)
Returns the array of integer values copied from the column. |
Methods inherited from class infovis.column.IntColumn |
---|
add, addExtend, capacity, ensureCapacity, fill, findColumn, format, format, getColumn, getColumn, getDoubleAt, getFloatAt, getIntAt, getLongAt, getMax, getMin, getValueAt, getValueClass, parse, round, setDoubleAt, setExtend, setIntAt, setLongAt, setValueAt |
Methods inherited from class infovis.column.LiteralColumn |
---|
compare, compareValues, getDoubleMax, getDoubleMin, getNumberColumn, hasUndefinedValue, isValueUndefined, setFloatAt, setValueUndefined, trimUndefined |
Methods inherited from class infovis.column.BasicColumn |
---|
addValue, addValueOrNull, firstValidRow, getClientProperty, getFormat, getMaxIndex, getMetadata, getMinIndex, getName, isEmpty, isInternal, lastValidRow, setFormat, setName, setValueOrNullAt, toString |
Methods inherited from class infovis.column.AbstractColumn |
---|
addChangeListener, computeValueMap, computeValueMap, equalObj, equals, getLastModifiedRow |
Methods inherited from class infovis.utils.ChangeManager |
---|
disableNotify, enableNotify, getModCount, removeChangeListener |
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface infovis.Column |
---|
addChangeListener, addValue, addValueOrNull, disableNotify, enableNotify, getFormat, getMaxIndex, getMinIndex, getName, isEmpty, isInternal, removeChangeListener, setFormat, setName, setValueOrNullAt |
Methods inherited from interface infovis.Metadata |
---|
getClientProperty, getMetadata |
Methods inherited from interface cern.colt.function.IntComparator |
---|
equals |
Constructor Detail |
---|
public HistogramColumn(NumberColumn column, int bins)
column
- the column.bins
- the number of bins.public HistogramColumn(NumberColumn column)
column
- the column.Method Detail |
---|
public NumberColumn getColumn()
public boolean setColumn(NumberColumn col)
col
- the column from which the histogram is built.
public int size()
size
in interface Column
size
in class IntColumn
public void clear()
CategoricalFormat
, it
is not cleared so results may not be what you expected. The
CategoricalFormat
can be cleared explicitely if
needed.
clear
in interface Column
clear
in class IntColumn
Call clear after clearing the subclass contents since this method fires
the notifications.
public void setSize(int newSize)
0
items
are added to the end of the column. If the new sizeColumn is
less than the current sizeColumn, all components at index
newSize
and greater are discarded.
setSize
in interface Column
setSize
in class IntColumn
newSize
- the new sizeColumn of this column.public void stateChanged(ChangeEvent e)
stateChanged
in interface ChangeListener
public int get(int index)
get
in class IntColumn
index
- index of element to return.
public RowIterator iterator()
iterator
in interface Column
iterator
in class BasicColumn
public int[] toArray()
toArray
in class IntColumn
public int[] toArray(int[] a)
toArray
in class IntColumn
a
- an array of int with at least the column size or
null
.
public void sort(RowComparator comp)
sort
in class IntColumn
comp
- the comparatorpublic void stableSort(RowComparator comp)
stableSort
in class IntColumn
comp
- the comparatorpublic IntArrayList getValueReference()
getValueReference
in class IntColumn
public void set(int index, int element)
set
in class IntColumn
index
- index of element to replace.element
- element to be stored at the specified position.public void dispose()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |