public class TableData
extends java.lang.Object
Constructor and Description |
---|
TableData(java.util.List<java.lang.String> headers)
Create a new TableData for storing spice measurement results.
|
Modifier and Type | Method and Description |
---|---|
void |
addRow(double[] row)
Add a row to the table.
|
double |
getAverage(int column)
Get the average (mean) value of the data in a given column (header)
|
int |
getColumn(java.lang.String headername)
Get the index of the given header in the headers list
|
java.util.List<java.lang.String> |
getHeaders()
Get the headers for the table.
|
int |
getNumCols()
Get the number of columns (number of headers) for the table.
|
int |
getNumRows()
Get the number of rows in the table.
|
double[] |
getRow(int row)
Get the data for the given row.
|
Table2D |
getTable2D(java.lang.String index1,
java.lang.String index2,
java.lang.String index3,
java.lang.String index3ExcludeValues)
Get the a Table2D object containing the data in this TableData.
|
double |
getValue(int row,
java.lang.String header)
Get the value in a given row and column (header)
|
void |
printData()
Print the data in this TableData as a pretty ASCII table.
|
static TableData |
readSpiceMeasResults(java.lang.String filename)
Parse spice measurement results from the given mt0 file
and put them in a TableData object.
|
public TableData(java.util.List<java.lang.String> headers)
headers
- measurement namespublic void addRow(double[] row)
row
- row to add to the tablepublic int getNumCols()
public int getNumRows()
public java.util.List<java.lang.String> getHeaders()
public double[] getRow(int row)
row
- the row numberpublic int getColumn(java.lang.String headername)
headername
- the header namepublic double getValue(int row, java.lang.String header)
row
- the rowheader
- the column headerpublic void printData()
public Table2D getTable2D(java.lang.String index1, java.lang.String index2, java.lang.String index3, java.lang.String index3ExcludeValues)
index1
- the name of the parameter/measure to be the row indexindex2
- the name of the parameter/measure to be the column indexindex3
- a third index that can be used to mask out averaging (see index3MaskValues)index3ExcludeValues
- if the size of the table is greater than the unique values
of index1 * index2, getTable2D normally averages the extra values. To selectively
choose which values to exclude from this averaging, put those values in this array.
If null, all values will be averaged.public double getAverage(int column)
column
- the columnpublic static TableData readSpiceMeasResults(java.lang.String filename) throws SCTimingException
filename
- the spice mt0 file (path and extension)SCTimingException