public class SequentialDatabase extends Object implements Database, 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
|
List |
coreDistance(int minPoints,
double epsilon,
DataObject dataObject)
Calculates the coreDistance for the specified DataObject.
|
Iterator |
dataObjectIterator()
Returns an iterator over all the dataObjects in the database
|
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(String key)
Select a dataObject from the database
|
Instances |
getInstances()
Returns the original instances delivered from WEKA
|
String |
getRevision()
Returns the revision string.
|
void |
insert(DataObject dataObject)
Inserts a new dataObject into the database
|
List |
k_nextNeighbourQuery(int k,
double epsilon,
DataObject dataObject)
Emits the k next-neighbours and performs an epsilon-range-query at the parallel.
|
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(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 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 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 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 Iterator keyIterator()
keyIterator
in interface Database
public 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 String getRevision()
getRevision
in interface RevisionHandler
Copyright © 2019 University of Waikato, Hamilton, NZ. All rights reserved.