|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.rapidminer.operator.preprocessing.outlier.KdistanceContainer
public class KdistanceContainer
This class represents a container for objects within a given distance from another object.
It is a simple data structure with associated query and setting methods enabling a linked list of all distance-Containers for all objects in a search Room. As most objects in a SearchSpace are expected to be at different distances to each other, only a small number of objects is likely to be linked to a single distance Container. However, in very dense clusters the number can increase significantly.
| Constructor Summary | |
|---|---|
KdistanceContainer(SearchObject so)
This constructor creates a container for an associated SearchObject so (which has to be referenced) and sets the other aspects of the contained data to zero; it also creates a list of Objects. |
|
| Method Summary | |
|---|---|
boolean |
addObject(SearchObject so,
double dist)
Adds a SearchObject to the container. |
double |
getDistance()
Provides the distance of the container as an integer value. |
java.util.ListIterator |
getListIterator()
This method delivers an Iterator on the list of objects of the container positioned at the beginning of the list. |
int |
getNumberOfObjects()
Gives the number of objects in the container (e.g. which are actually in the list, but without the need to ask the list itself about its size). |
SearchObject |
getObject(int i)
Returns an object from the list of objects in the container at position i (check needed if this returns the appropriate object, as internally, an iterator is started at position i in the list and the next() element is delivered back...). |
void |
setDistance(double dist)
Sets the distance of the container to dist (double type value). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public KdistanceContainer(SearchObject so)
| Method Detail |
|---|
public double getDistance()
public void setDistance(double dist)
dist - public int getNumberOfObjects()
public boolean addObject(SearchObject so,
double dist)
Adds a SearchObject to the container.
Attention: As you do this, it has to be checked, if the distance between the associated SearchObject and the object added to the container is equal to the distance of the objects already in the container.
To achieve this, the method checks if the distance delivered as a sanity check parameter is equal to the distance of the container; if yes, the object is added, else not. A boolean state on the success is returned.
if the container is empty, e.g. the first object is added, no checks are necessary and hence the distance check against the initial zero value is not performed thus not preventing the addition of the object.
It is recommended to e.g. add an object so to the list of the objects of a container associated to an object soA with the following process:
KdistanceContainer.addObject(so, soA.getDistance(so));
public SearchObject getObject(int i)
i - public java.util.ListIterator getListIterator()
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||