public class SequentialDatabase extends java.lang.Object implements Database, java.io.Serializable, RevisionHandler
SequentialDatabase.java
Authors: Rainer Holzmann, Zhanna Melnikova-Albrecht, Matthias Schubert
Date: Aug 20, 2004
Time: 1:23:38 PM
$ Revision 1.4 $
Constructor and Description |
---|
SequentialDatabase(Instances instances)
Constructs a new sequential database and holds the original instances
|
Modifier and Type | Method and Description |
---|---|
boolean |
contains(DataObject dataObject_Query)
Tests if the database contains the dataObject_Query
|
java.util.List |
coreDistance(int minPoints,
double epsilon,
DataObject dataObject)
Calculates the coreDistance for the specified DataObject.
|
java.util.Iterator |
dataObjectIterator()
Returns an iterator over all the dataObjects in the database
|
java.util.List |
epsilonRangeQuery(double epsilon,
DataObject queryDataObject)
Performs an epsilon range query for this dataObject
|
double[] |
getAttributeMaxValues()
Returns the array of maximum-values for each attribute
|
double[] |
getAttributeMinValues()
Returns the array of minimum-values for each attribute
|
DataObject |
getDataObject(java.lang.String key)
Select a dataObject from the database
|
Instances |
getInstances()
Returns the original instances delivered from WEKA
|
java.lang.String |
getRevision()
Returns the revision string.
|
void |
insert(DataObject dataObject)
Inserts a new dataObject into the database
|
java.util.List |
k_nextNeighbourQuery(int k,
double epsilon,
DataObject dataObject)
Emits the k next-neighbours and performs an epsilon-range-query at the parallel.
|
java.util.Iterator |
keyIterator()
Returns an iterator over all the keys
|
void |
setMinMaxValues()
Sets the minimum and maximum values for each attribute in different arrays
by walking through every DataObject of the database
|
int |
size()
Returns the size of the database (the number of dataObjects in the database)
|
public SequentialDatabase(Instances instances)
instances
- public DataObject getDataObject(java.lang.String key)
getDataObject
in interface Database
key
- The key that is associated with the dataObjectpublic void setMinMaxValues()
setMinMaxValues
in interface Database
public double[] getAttributeMinValues()
getAttributeMinValues
in interface Database
public double[] getAttributeMaxValues()
getAttributeMaxValues
in interface Database
public java.util.List epsilonRangeQuery(double epsilon, DataObject queryDataObject)
epsilonRangeQuery
in interface Database
epsilon
- Specifies the range for the queryqueryDataObject
- The dataObject that is used as query-object for epsilon range querypublic java.util.List k_nextNeighbourQuery(int k, double epsilon, DataObject dataObject)
k_nextNeighbourQuery
in interface Database
k
- number of next neighboursepsilon
- Specifies the range for the querydataObject
- the start objectpublic java.util.List coreDistance(int minPoints, double epsilon, DataObject dataObject)
coreDistance
in interface Database
minPoints
- minPoints-many neighbours within epsilon must be found to have a non-undefined coreDistanceepsilon
- Specifies the range for the querydataObject
- Calculate coreDistance for this dataObjectpublic int size()
public java.util.Iterator keyIterator()
keyIterator
in interface Database
public java.util.Iterator dataObjectIterator()
dataObjectIterator
in interface Database
public boolean contains(DataObject dataObject_Query)
public void insert(DataObject dataObject)
public Instances getInstances()
getInstances
in interface Database
public java.lang.String getRevision()
getRevision
in interface RevisionHandler