|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectadams.data.container.AbstractDataContainer<InstancePoint>
adams.data.instance.Instance
public class Instance
Stores values from weka.core.Instance objects, with X being the attribute index (integer) and Y being the internal value (double).
| Field Summary | |
|---|---|
protected static DataPointComparator |
m_Comparator
the default comparator. |
protected weka.core.Instances |
m_DatasetHeader
a reference to the dataset the data was obtained from. |
protected Notes |
m_Notes
the notes for the chromatogram. |
protected Report |
m_Report
the automatically generated report. |
static String |
REPORT_ADDITIONAL_PREFIX
the key prefix in the report for the additional attributes. |
static String |
REPORT_CLASS
the key in the report for the class. |
static String |
REPORT_DATASET
the key in the report for the dataset name. |
static String |
REPORT_DB_ID
the key in the report for the database ID. |
static String |
REPORT_DISPLAY_ID
the key in the report for the display ID. |
static String |
REPORT_ID
the key in the report for the ID. |
static String |
REPORT_ROW
the key in the report for the row in the dataset. |
| Fields inherited from class adams.data.container.AbstractDataContainer |
|---|
m_ID, m_Points |
| Constructor Summary | |
|---|---|
Instance()
Initializes the sequence. |
|
| Method Summary | |
|---|---|
void |
assign(DataContainer<InstancePoint> other)
Obtains the stored variables from the other data point, but not the actual data points. |
void |
clear()
Removes all the points and report and nulls the header reference. |
DataPointComparator<InstancePoint> |
getComparator()
Returns the comparator in use. |
weka.core.Instances |
getDatasetHeader()
Returns the header of the underlying dataset. |
Notes |
getNotes()
Returns the currently stored notes. |
Report |
getReport()
Returns the report. |
boolean |
hasDatasetHeader()
Returns whether a header of a dataset is available. |
boolean |
hasReport()
Checks whether a report is present. |
DataPointComparator<InstancePoint> |
newComparator()
Returns the comparator in use. |
InstancePoint |
newPoint()
Returns a new instance of a sequence point. |
protected Report |
newReport()
Creates an empty report. |
void |
set(weka.core.Instance inst)
Clears the container and adds the data from the weka.core.Instance (internal values). |
void |
set(weka.core.Instance inst,
int index,
int[] additional,
Range range,
HashSet<Integer> attTypes)
Clears the container and adds the data from the weka.core.Instance (internal values). |
void |
setID(String value)
Sets the ID of the sequence. |
void |
setReport(Report value)
Sets a new report. |
weka.core.Instance |
toInstance()
Generates a weka instance, if a dataset header is available. |
| Methods inherited from class adams.data.container.AbstractDataContainer |
|---|
add, addAll, compareTo, compareToHeader, contains, containsAll, ensureCapacity, equals, equalsHeader, getClone, getHeader, getID, hashCode, isEmpty, iterator, mergeWith, modifiedListener, newInstance, remove, removeAll, retainAll, size, toArray, toArray, toList, toString, toTreeSet, toTreeSet, toVector, toVector, trimToSize |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String REPORT_DATASET
public static final String REPORT_DB_ID
public static final String REPORT_ID
public static final String REPORT_DISPLAY_ID
public static final String REPORT_CLASS
public static final String REPORT_ROW
public static final String REPORT_ADDITIONAL_PREFIX
protected static DataPointComparator m_Comparator
protected weka.core.Instances m_DatasetHeader
protected Report m_Report
protected Notes m_Notes
| Constructor Detail |
|---|
public Instance()
| Method Detail |
|---|
public void setID(String value)
setID in interface MutableIDHandlersetID in class AbstractDataContainer<InstancePoint>value - the new IDpublic DataPointComparator<InstancePoint> newComparator()
newComparator in interface DataContainer<InstancePoint>public DataPointComparator<InstancePoint> getComparator()
getComparator in interface DataContainer<InstancePoint>public InstancePoint newPoint()
newPoint in interface DataContainer<InstancePoint>protected Report newReport()
public void clear()
clear in interface Collection<InstancePoint>clear in class AbstractDataContainer<InstancePoint>m_DatasetHeaderpublic void assign(DataContainer<InstancePoint> other)
assign in interface DataContainer<InstancePoint>assign in class AbstractDataContainer<InstancePoint>other - the data point to get the values frompublic boolean hasDatasetHeader()
public weka.core.Instances getDatasetHeader()
public void set(weka.core.Instance inst)
inst - the instance to use
public void set(weka.core.Instance inst,
int index,
int[] additional,
Range range,
HashSet<Integer> attTypes)
inst - the instance to useindex - the row index in the original dataset, use -1 to ignoreadditional - the indices of the additional attribute values to
store in the reportrange - the range of attributes to limit the instance toattTypes - whether to restrict to attributes types, null or zero-length array means no restrictionAttributepublic boolean hasReport()
hasReport in interface ReportHandler<Report>public void setReport(Report value)
setReport in interface MutableReportHandler<Report>value - the new reportpublic Report getReport()
getReport in interface ReportHandler<Report>public weka.core.Instance toInstance()
public Notes getNotes()
getNotes in interface NotesHandler
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||