| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectinfovis.utils.ChangeManager
infovis.column.AbstractColumn
infovis.column.BasicColumn
infovis.column.DoubleMatrix1DColumn
public class DoubleMatrix1DColumn
Wrapper for Colt DoubleMatrix1D columns.
| Field Summary | |
|---|---|
| static String | MATRIX2D_METADATA | 
| 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 | |
|---|---|
| DoubleMatrix1DColumn(String name,
                     DoubleMatrix1D matrix) | |
| Method Summary | |
|---|---|
| static void | addColumns(Table table,
           DoubleMatrix2D matrix) | 
| static void | addRows(Table table,
        DoubleMatrix2D matrix) | 
|  int | capacity()Returns the current capacity of this column. | 
|  void | clear()Removes all of the elements from this column. | 
|  void | ensureCapacity(int minCapacity)Increases the capacity of this column, if necessary, to ensure that it can hold at least the number of values specified by the minimum capacity argument. | 
|  void | fill(double val) | 
|  String | format(double v)Returns the string representation of a value according to the current format. | 
|  double | get(int index) | 
| static DoubleMatrix1DColumn | getColumn(Table t,
          int index)Returns a column as a DoubleMatrix1DColumnfrom aTable. | 
| static DoubleColumn | getColumn(Table t,
          String name)Returns a column as a DoubleColumnfrom aTable. | 
|  double | getDoubleAt(int row) | 
|  int | getIntAt(int row) | 
|  long | getLongAt(int row) | 
|  DoubleMatrix1D | getValue() | 
|  String | getValueAt(int i)Returns the String representation of the element at the specified position in this column or nullif 
 the element is undefined. | 
|  Class | getValueClass()Returns the class of the elements. | 
|  boolean | hasUndefinedValue()Returns trueif the columns contains
 undefined values,falseotherwise. | 
|  boolean | isValueUndefined(int i)Returns true if the ith value is undefined. | 
|  double | parse(String v)Parse a string and return the value for the column. | 
|  double | round(double value) | 
|  void | set(int index,
    double element)Replaces the element at the specified position in this column with the specified element. | 
|  void | setDoubleAt(int row,
            double v) | 
|  void | setSize(int newSize)Sets the sizeColumn of this column. | 
|  void | setValueAt(int i,
           String v)Replaces the element at the specified position in this column with the element specified in its String representation or sets if undefined if the element is nullIt will be read and translated using the Format. | 
|  void | setValueUndefined(int i,
                  boolean undef)Sets the ith element to have an undefined value. | 
|  int | size()Returns the number of elements in this column. | 
|  double[] | toArray()Returns the array of double values used by the column. | 
|  double[] | toArray(double[] a)Returns the array of double values copied from the column. | 
| Methods inherited from class infovis.column.BasicColumn | 
|---|
| addValue, addValueOrNull, compare, firstValidRow, getClientProperty, getFormat, getMaxIndex, getMetadata, getMinIndex, getName, isEmpty, isInternal, iterator, lastValidRow, setFormat, setName, setValueOrNullAt, toString | 
| Methods inherited from class infovis.column.AbstractColumn | 
|---|
| addChangeListener, compareValues, 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 | 
|---|
| disableNotify, enableNotify, removeChangeListener | 
| Field Detail | 
|---|
public static final String MATRIX2D_METADATA
| Constructor Detail | 
|---|
public DoubleMatrix1DColumn(String name,
                            DoubleMatrix1D matrix)
| Method Detail | 
|---|
public static void addColumns(Table table,
                              DoubleMatrix2D matrix)
public static void addRows(Table table,
                           DoubleMatrix2D matrix)
public DoubleMatrix1D getValue()
public void clear()
BasicColumnCategoricalFormat, it
 is not cleared so results may not be what you expected.  The
 CategoricalFormat can be cleared explicitely if
 needed.
clear in interface Columnclear in class BasicColumnpublic void setSize(int newSize)
BasicColumn0 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 ColumnsetSize in class BasicColumnnewSize - the new sizeColumn of this column.public double get(int index)
public void set(int index,
                double element)
index - index of element to replace.element - element to be stored at the specified position.public void fill(double val)
public double parse(String v)
             throws ParseException
v - the string representation of the value
ParseException - if the value cannot be parsedpublic String format(double v)
v - the value
public String getValueAt(int i)
Columnnull if 
 the element is undefined.  The representation is
 generated by the current format.
i - index of element representation to return.
null if the element is undefined.Column.getValueAt(int)
public void setValueAt(int i,
                       String v)
                throws ParseException
Columnnull
 
 It will be read and translated using the Format.  A null value
 sets the value to undefined.  The column is extended if
 needed.
i - index of element to replace.v - element to be stored at the specified position.
ParseException - if the specified string cannot be parsed.Column.setValueAt(int, String)public Class getValueClass()
BasicColumn
getValueClass in interface ColumngetValueClass in class BasicColumnpublic boolean isValueUndefined(int i)
Column
i - the index
public void setValueUndefined(int i,
                              boolean undef)
Column
i - the indexundef - true if the value should be undefined,
                 false otherwise.public boolean hasUndefinedValue()
Columntrue if the columns contains
 undefined values, false otherwise.
true if the columns contains
 undefined values, false otherwise.public int size()
Column
public void ensureCapacity(int minCapacity)
Column
minCapacity - the desired minimum capacity.public int capacity()
Column
public static DoubleMatrix1DColumn getColumn(Table t,
                                             int index)
DoubleMatrix1DColumn from a
 Table.
t - the Tableindex - index in the Table
DoubleMatrix1DColumn or null if no such column
         exists or the column is not a
         DoubleMatrix1DColumn.
public static DoubleColumn getColumn(Table t,
                                     String name)
DoubleColumn from a
 Table.
t - the Tablename - the column name.
DoubleColumn or null if no such column
         exists or the column is not a
         DoubleColumn.public double getDoubleAt(int row)
NumberColumn.getDoubleAt(int)public int getIntAt(int row)
NumberColumn.getIntAt(int)public long getLongAt(int row)
NumberColumn.getLongAt(int)
public void setDoubleAt(int row,
                        double v)
NumberColumn.setDoubleAt(int, double)public double round(double value)
public double[] toArray(double[] a)
a - an array of double with at least the column size
  or null.
public double[] toArray()
| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||