Facemorph
Class CSVFile
java.lang.Object
Facemorph.CSVFile
public class CSVFile
- extends java.lang.Object
Load a Comma Separated Value file
Constructor Summary |
CSVFile(double[][] inData)
|
CSVFile(double[][] inData,
java.util.Vector<java.lang.String> cHeaders,
java.util.Vector<java.lang.String> rIDs)
|
CSVFile(java.io.File f,
java.lang.String split,
boolean idColumn)
|
Method Summary |
protected java.util.Vector<java.lang.String> |
extractHeader(java.lang.String line,
java.lang.String split)
|
double |
get(int i,
int j)
|
BigMat |
getAsBigMat()
|
java.lang.String |
getColumnHeader(int i)
|
double[][] |
getData()
|
java.util.Vector<java.lang.String> |
getIDs()
|
int |
getNoColumns()
|
int |
getNoRecords()
|
java.lang.String |
getRecordID(int i)
|
void |
read(java.io.File f,
java.lang.String split,
boolean idColumn)
|
void |
set(int i,
int j,
double val)
|
void |
setColumnHeader(int i,
java.lang.String header)
|
void |
write(java.io.File f,
java.lang.String split,
boolean idColumn,
boolean headers)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
columnHeader
protected java.util.Vector<java.lang.String> columnHeader
rowIDs
protected java.util.Vector<java.lang.String> rowIDs
data
protected double[][] data
noRecords
protected int noRecords
noColumns
protected int noColumns
CSVFile
public CSVFile(java.io.File f,
java.lang.String split,
boolean idColumn)
throws java.io.IOException
- Throws:
java.io.IOException
CSVFile
public CSVFile(double[][] inData)
CSVFile
public CSVFile(double[][] inData,
java.util.Vector<java.lang.String> cHeaders,
java.util.Vector<java.lang.String> rIDs)
getNoRecords
public int getNoRecords()
getNoColumns
public int getNoColumns()
getData
public double[][] getData()
get
public double get(int i,
int j)
set
public void set(int i,
int j,
double val)
getColumnHeader
public java.lang.String getColumnHeader(int i)
getRecordID
public java.lang.String getRecordID(int i)
getIDs
public java.util.Vector<java.lang.String> getIDs()
setColumnHeader
public void setColumnHeader(int i,
java.lang.String header)
read
public void read(java.io.File f,
java.lang.String split,
boolean idColumn)
throws java.io.IOException
- Throws:
java.io.IOException
getAsBigMat
public BigMat getAsBigMat()
write
public void write(java.io.File f,
java.lang.String split,
boolean idColumn,
boolean headers)
throws java.io.IOException
- Throws:
java.io.IOException
extractHeader
protected java.util.Vector<java.lang.String> extractHeader(java.lang.String line,
java.lang.String split)