|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Thread DataRowStatisticsIndexMap
public class DataRowStatisticsIndexMap
Class DataRowStatisticsIndexMap is used to add statistics on the data to the IndexMap which could be saved as a .sidx file. The ftIM IndexMap is read from the [TODO] add discussion on which data can be used.
List of Methods
=================== DataRowStatisticsIndexMap() - Constructor setIndexMapTable() - set the IndexMap FileTable ftIM to use setDataTable() - set the data FileTable ft to use if any createStatisticsIndexMapFile() - create & write Statistics Index Map file readIndexMapFile() - read the IndexMap FileTable to ftIM. readDataFileHeader() - read the data file FileTable to ft. computeRowStatistics() - compute row statistics of data (max,min,mean,stddev) computeGlobalStatistics() - compute global stats of (max,min,mean,stddev) data addRowStatisticsToIndexMap() - add the row stats to the IndexMap ftIM table. addGlobalStatisticsToIndexMapHdr() - add 2 header rows hdr[0:1] for global stats. writeStatisticsIndexMap() - write extended IndexMap w/statistics as .sidx file.
This code is available at the HTMLtools project on SourceForge at http://htmltools.sourceforge.org/ under the "Common Public License Version 1.0" http://www.opensource.org/licenses/cpl1.0.php.
It was derived and refactored from the open source MAExplorer (http://maexplorer.sourceforge.org/), and Open2Dprot (http://Open2Dprot.sourceforge.net/) Table modules.
$Date: 2009/09/15 11:45:56 $ $Revision: 1.34 $
Copyright 2008, 2009 by Peter Lemkin
E-Mail: lemkin@users.sourceforge.net
http://lemkingroup.com/
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary | |
---|---|
private HTMLtools |
cvt
converter link |
private java.lang.String |
dataFilePath
The full path of the Table data file (.idx extension). |
private int[] |
dropListCols
List of columns in FileTable ft that are in the -dropColumn list. |
private FileTable |
ft
FileTable of the Data table |
private FileTable |
ftIM
FileTable of the IndexMap |
private float |
glbMaxRowVal
Global max value from data tables |
private double |
glbMaxRowValSum
Global min value from data tables |
private float |
glbMeanRowVal
Global mean value from data tables |
private double |
glbMeanRowValSum
Global min value from data tables |
private float |
glbMinRowVal
Global min value from data tables |
private double |
glbMinRowValSum
Global min value from data tables |
private float |
glbStdDevRowVal
Global stdDev value from data tables |
private double |
glbStdDevRowValSum
Global min value from data tables |
private int |
idxEndByte
|
private int |
idxMaxRow
|
private int |
idxMeanRow
|
private int |
idxMinRow
|
private int |
idxStartByte
|
private int |
idxStdDevRow
|
private java.lang.String |
indexMapFilePath
The full path of the Table Index Map file (.idx extension). |
private float[] |
maxRowVal
Computed row data max values from the data Tables. |
private float[] |
meanRowVal
Computed row data mean values from the data Tables. |
private float[] |
minRowVal
Computed row data min values from the data Tables. |
private int |
nD2cols
Number of data columns in the data Table NOT including the drop columns. |
private int |
nDcols
Number of data columns in the data Table including the drop columns. |
private int |
nDropListCols
Size of dropListCols[] list of columns in FileTable ft that are in the -dropColumn list. |
private int |
nIMrows
Number of data rows in the index map Table. |
private int |
precision
Number of of digits in output statistics for .sidx Table |
private java.lang.String |
statIndexMapFilePath
The full path of the Statistics Index Map file (.sidx extension). |
private float[] |
stdDevRowVal
Computed row data stdDev values from the data Tables. |
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
DataRowStatisticsIndexMap(HTMLtools cvt,
java.lang.String dataFilePath)
DataRowStatisticsIndexMap() - Constructor |
Method Summary | |
---|---|
boolean |
addGlobalStatisticsToIndexMapHdr()
addGlobalStatisticsToIndexMapHdr() - add 2 header rows hdr[0:1] for global statistics where |
boolean |
addRowStatisticsToIndexMap()
addRowStatisticsToIndexMap() - add row statistics(Min,Max,Mean,StdDev) column data to the ftIM index map table after the ftIM table has been read into memory. |
boolean |
computeGlobalStatistics()
computeGlobalStatistics() - compute global statistics of (max,min,mean,stddev) data from global sums computed in computeRowStatistics. |
boolean |
computeRowStatistics()
computeRowStatistics() - compute row statistics of data (max,min,mean,stddev). |
boolean |
createStatisticsIndexMapFile()
createStatisticsIndexMapFile() - create & write Statistics Index Map file |
boolean |
isDropColumn(int cTest)
isDropColumn() - test if column cTest is a -drop list column. |
boolean |
readDataFileHeader()
readDataFileHeader() - read the data file FileTable to ft. |
boolean |
readIndexMapFile()
readIndexMapFile() - read the IndexMap FileTable to ftIM. |
void |
setDataTable(FileTable ft)
setDataTable() - set the data FileTable ft to use if any if it is already in memory. |
void |
setIndexMapTable(FileTable ftIM)
setIndexMapTable() - set the IndexMap FileTable ftIM to use if it is already in memory. |
void |
setTablePrecision(int precision)
setTablePrecision() - set number of digits in output statistics. |
boolean |
writeStatisticsIndexMap(FileTable ftSIM)
writeStatisticsIndexMap() - write extended IndexMap with statistics as a .sidx file. |
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, run, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private HTMLtools cvt
private FileTable ftIM
private FileTable ft
private java.lang.String dataFilePath
private java.lang.String indexMapFilePath
private java.lang.String statIndexMapFilePath
private int precision
private int[] dropListCols
private int nDropListCols
private int idxStartByte
private int idxEndByte
private int idxMinRow
private int idxMaxRow
private int idxMeanRow
private int idxStdDevRow
private int nDcols
private int nD2cols
private int nIMrows
private float[] minRowVal
private float[] maxRowVal
private float[] meanRowVal
private float[] stdDevRowVal
private float glbMinRowVal
private float glbMaxRowVal
private float glbMeanRowVal
private float glbStdDevRowVal
private double glbMinRowValSum
private double glbMaxRowValSum
private double glbMeanRowValSum
private double glbStdDevRowValSum
Constructor Detail |
---|
public DataRowStatisticsIndexMap(HTMLtools cvt, java.lang.String dataFilePath)
cvt
- is an instance of converterdataFilePath
- is the data .txt file that has an associated
.idx IndexMap file with the same base name. The .sidx
file to be created has the same base nameMethod Detail |
---|
public void setIndexMapTable(FileTable ftIM)
public void setDataTable(FileTable ft)
public void setTablePrecision(int precision)
public boolean createStatisticsIndexMapFile()
public boolean readIndexMapFile()
public boolean readDataFileHeader()
public boolean isDropColumn(int cTest)
cTest
- is the column index to test
public boolean computeRowStatistics()
public boolean computeGlobalStatistics()
public boolean addRowStatisticsToIndexMap()
public boolean addGlobalStatisticsToIndexMapHdr()
Hdr[0] has names ("Global Min", "Global Max", "Global Mean","Global StdDev") Hdr[0] has global values ( glbMinRowVal, glbMaxRowVal, glbMeanRowVal, glbStdDevRowVal)
public boolean writeStatisticsIndexMap(FileTable ftSIM)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |