|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.ksu.cis.kdd.data.Table
Field Summary | |
static java.lang.String |
ARFF_FORMAT
|
protected java.util.LinkedList |
attributes
|
protected int |
classIndex
|
static java.lang.String |
CSF_FORMAT
|
static java.lang.String |
DAT_FORMAT
|
protected boolean |
fixedLength
|
static java.lang.String |
LIBB_FORMAT
|
protected java.lang.String |
name
|
protected Database |
owner
|
protected TableProperty |
property
|
protected TableTally |
tally
|
protected java.util.LinkedList |
tuples
|
static java.lang.String |
XML_FORMAT
|
Constructor Summary | |
Table()
|
|
Table(boolean isFixed)
|
Method Summary | |
void |
addAttribute(Attribute attr)
|
void |
addAttributes(java.util.List attributeList)
|
void |
addTuple(Tuple tuple)
|
java.lang.Object |
clone()
Table are cloned, but list of attributes are not! |
Table |
get(int start,
int end)
|
Table |
getAllExcept(int start,
int end)
|
Attribute |
getAttribute(int index)
|
Attribute |
getAttribute(java.lang.String name)
|
int |
getAttributeIndex(Attribute attr)
|
int |
getAttributeIndex(java.lang.String attrName)
|
java.util.List |
getAttributeNames()
|
java.util.List |
getAttributes()
|
Attribute |
getClassAttribute()
|
int |
getClassIndex()
|
Table |
getFirst(int n)
Get the first n tuples |
Table |
getLast(int n)
Get the last n tuples |
java.lang.String |
getName()
Returns the name. |
Database |
getOwner()
|
java.util.List |
getPrimaryKeys()
|
TableProperty |
getProperty()
Returns the property. |
java.util.List |
getReferenceKeys()
|
java.util.List |
getRelevantAttributes()
|
java.util.List |
getTableAttributes()
|
Tally |
getTallyer()
|
Tuple |
getTuple(int index)
|
java.util.List |
getTuples()
|
double[] |
getWeights()
get the weights of all instances |
boolean |
isFixedLength()
Returns the fixedLength. |
boolean |
isRemote()
Returns the isRemote. |
static Table |
load(java.lang.String filename)
|
static Table |
load(java.lang.String filename,
java.lang.String format)
|
static void |
main(java.lang.String[] args)
|
void |
randomizeSequence()
|
void |
randomizeSequence(long seed)
|
void |
remove(int start,
int end)
|
void |
removeAttribute(Attribute attr)
|
void |
removeAttributes(java.util.List attributeList)
|
void |
removeTuple(Tuple tuple)
|
void |
save(java.io.OutputStream out,
java.lang.String format)
|
void |
save(java.lang.String filename)
|
void |
save(java.lang.String filename,
java.lang.String format)
saves in different format |
void |
setAttributes(java.util.List newAttr)
|
void |
setClassAttribute(Attribute attr)
|
void |
setClassAttribute(int index)
|
void |
setFixedLength(boolean fixedLength)
Sets the fixedLength. |
void |
setName(java.lang.String name)
Sets the name. |
void |
setOwner(Database db)
|
void |
setProperty(TableProperty property)
Sets the property. |
void |
setTuples(java.util.List newTuples)
|
void |
setWeights(double[] weights)
set the weights of all instances. |
int |
size()
|
Data |
subsample(int n)
|
Data |
subsample(int n,
long seed)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected java.util.LinkedList tuples
protected java.util.LinkedList attributes
protected int classIndex
protected TableProperty property
protected boolean fixedLength
protected java.lang.String name
protected Database owner
public static final java.lang.String CSF_FORMAT
public static final java.lang.String ARFF_FORMAT
public static final java.lang.String XML_FORMAT
public static final java.lang.String LIBB_FORMAT
public static final java.lang.String DAT_FORMAT
protected TableTally tally
Constructor Detail |
public Table()
public Table(boolean isFixed)
Method Detail |
public void addTuple(Tuple tuple)
public void addAttribute(Attribute attr)
public void removeTuple(Tuple tuple)
public void removeAttribute(Attribute attr)
public void removeAttributes(java.util.List attributeList)
public void addAttributes(java.util.List attributeList)
public Tally getTallyer()
getTallyer
in interface Data
public Tuple getTuple(int index)
public java.util.List getTuples()
getTuples
in interface Data
public double[] getWeights()
getWeights
in interface Data
public void setWeights(double[] weights)
setWeights
in interface Data
public java.util.List getPrimaryKeys()
public java.util.List getReferenceKeys()
public Data subsample(int n)
subsample
in interface Data
public Data subsample(int n, long seed)
subsample
in interface Data
public Table getFirst(int n)
public Table getLast(int n)
public Table get(int start, int end)
public Table getAllExcept(int start, int end)
public void remove(int start, int end)
public void randomizeSequence(long seed)
public void randomizeSequence()
public void setTuples(java.util.List newTuples)
public void setOwner(Database db)
public Database getOwner()
public Attribute getAttribute(int index)
public Attribute getAttribute(java.lang.String name)
public int getAttributeIndex(Attribute attr)
public int getAttributeIndex(java.lang.String attrName)
public java.util.List getAttributes()
getAttributes
in interface Data
public java.util.List getRelevantAttributes()
getRelevantAttributes
in interface Data
public java.util.List getAttributeNames()
public java.util.List getTableAttributes()
public void setAttributes(java.util.List newAttr)
public Attribute getClassAttribute()
public int getClassIndex()
public void setClassAttribute(Attribute attr)
public void setClassAttribute(int index)
public int size()
public java.lang.String toString()
public TableProperty getProperty()
public void setProperty(TableProperty property)
property
- The property to setpublic boolean isFixedLength()
public void setFixedLength(boolean fixedLength)
fixedLength
- The fixedLength to setpublic java.lang.Object clone()
public java.lang.String getName()
getName
in interface Data
public void setName(java.lang.String name)
name
- The name to setpublic static Table load(java.lang.String filename, java.lang.String format)
public static Table load(java.lang.String filename)
public void save(java.lang.String filename)
public void save(java.lang.String filename, java.lang.String format)
filename
- name of the output filepublic void save(java.io.OutputStream out, java.lang.String format)
public boolean isRemote()
public static void main(java.lang.String[] args)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |