public class Entry extends Object
| Modifier and Type | Field and Description |
|---|---|
ClusKernel |
data
The actual entry data.
|
| Modifier | Constructor and Description |
|---|---|
protected |
Entry(Entry other)
Copy constructor.
|
|
Entry(int numberDimensions)
Constructor for the entry.
|
|
Entry(int numberDimensions,
ClusKernel cluster,
long currentTime)
Constructuctor that creates an
Entry with an empty buffer
and the data given by the Kernel. |
protected |
Entry(int numberDimensions,
ClusKernel cluster,
long currentTime,
Entry parentEntry,
Node containerNode)
extended constructor with containerNode and parentEntry
|
protected |
Entry(int numberDimensions,
Node node,
long currentTime,
Entry parentEntry,
Node containerNode)
Constructor that creates an
Entry that points to the given
node. |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Entry other)
Add the data cluster of another entry to the data cluster of this entry.
|
protected void |
aggregateCluster(ClusKernel otherData,
long currentTime,
double negLambda)
Aggregate the given
Kernel to the data cluster
of this entry. |
protected void |
aggregateEntry(Entry other,
long currentTime,
double negLambda)
Aggregate the
data in the Kernel of the other
Entry. |
protected void |
aggregateToBuffer(ClusKernel pointToInsert,
long currentTime,
double negLambda)
Aggregate the given
Kernel to the buffer
cluster of this entry. |
protected double |
calcDistance(ClusKernel cluster)
Calculates the distance to the data in this entry.
|
double |
calcDistance(Entry other)
Calculates the distance to the data in this entry of the data in the
given entry.
|
protected void |
clear()
Clear the Entry.
|
protected ClusKernel |
emptyBuffer(long currentTime,
double negLambda)
Clear the buffer in this entry and return a copy.
|
protected ClusKernel |
getBuffer()
Getter for the buffer.
|
Node |
getChild()
Return the reference to the child of this
Entry to navigate
in the tree. |
protected ClusKernel |
getData()
Getter for the data.
|
Node |
getNode() |
Entry |
getParentEntry() |
long |
getTimestamp()
Return the current timestamp.
|
protected void |
initializeEntry(Entry other,
long currentTime)
When this entry is empty, give it it's first values.
|
protected boolean |
isEmpty()
Check if this
Entry is empty or not. |
protected boolean |
isIrrelevant(double threshold)
Returns true if this entry is irrelevant with respecto the given
threshold.
|
protected void |
makeOlder(long currentTime,
double negLambda)
Ages this entrie's data AND buffer according to the given
time and aging constant.
|
protected void |
mergeWith(Entry other)
Merge this entry witht the given
Entry. |
protected void |
overwriteOldEntry(Entry newEntry)
Overwrites the LS, SS and weightedN in the data cluster of this
Entry to the values of the data cluster in the given
Entry, but adds N and classCount of the cluster in the given
Entry to the data cluster in this one. |
protected void |
recalculateData()
This functions reads every entry in the child node and calculates the
corresponding
data Kernel. |
void |
setChild(Node child)
Setter for the child in this entry.
|
void |
setNode(Node node) |
void |
setParentEntry(Entry parent) |
protected void |
shallowClear()
Clear the
data and the buffer Custer in this
entry. |
public ClusKernel data
public Entry(int numberDimensions)
numberDimensions - The dimensionality of the data point in tree
where this entry is used.protected Entry(int numberDimensions,
Node node,
long currentTime,
Entry parentEntry,
Node containerNode)
Entry that points to the given
node. The values of data will be calculated for this.public Entry(int numberDimensions,
ClusKernel cluster,
long currentTime)
Entry with an empty buffer
and the data given by the Kernel.numberDimensions - The dimensionality of the information in the
cluster.cluster - The cluster from which the information is to be extracted.currentTime - The timestamp for the moment where this Entry was
was generated.Kernel,
dataprotected Entry(int numberDimensions,
ClusKernel cluster,
long currentTime,
Entry parentEntry,
Node containerNode)
numberDimensions - cluster - currentTime - parentEntry - containerNode - protected Entry(Entry other)
other - public Node getNode()
public void setNode(Node node)
protected void clear()
protected void shallowClear()
data and the buffer Custer in this
entry. This function does not clear the child of this Entry.protected double calcDistance(ClusKernel cluster)
cluster - The Kernel cluster to which the distance is to be
calculated.Kernel in this
EntryKernel,
datapublic double calcDistance(Entry other)
other - The Entry to which the distance is to be
calculated.Kernel in this
Entry of the data Kernel in the other
Entry.Kernel,
dataprotected void initializeEntry(Entry other, long currentTime)
data and
Kernel, which makes no sense in an empty entry.other - The entry with the information to be used to initialize
this entry.currentTime - The time at which this is happening.public void add(Entry other)
other - The entry of which the data cluster should be added to
the local data cluster.data,
Kernel#add(tree.Kernel)protected void aggregateEntry(Entry other, long currentTime, double negLambda)
data in the Kernel of the other
Entry.other - The Entry to be aggregated.data,
Kernelprotected void aggregateCluster(ClusKernel otherData, long currentTime, double negLambda)
Kernel to the data cluster
of this entry.otherData - The Entry to be aggregated.data,
Kernelprotected void aggregateToBuffer(ClusKernel pointToInsert, long currentTime, double negLambda)
Kernel to the buffer
cluster of this entry.pointToInsert - The cluster to aggregate to the buffer.currentTime - The time at which the aggregation occurs.negLambda - A parameter needed to weight the current state of the
buffer.protected void mergeWith(Entry other)
Entry. This adds the data
cluster of the given Entry to the data cluster of this entry and sets the
timestamp to the newest one of the the two entries.other - The entry from which the data cluster is added.Kernel#add(tree.Kernel)protected ClusKernel getBuffer()
public Node getChild()
Entry to navigate
in the tree.Entryprotected ClusKernel getData()
Kernel in this entry.Kernelpublic Entry getParentEntry()
public void setParentEntry(Entry parent)
public void setChild(Node child)
child - The Node that should be a child of this
EntryNodepublic long getTimestamp()
protected ClusKernel emptyBuffer(long currentTime, double negLambda)
Kernel makes
a deep copy).protected boolean isEmpty()
Entry is empty or not. An Entry
is empty if the data Kernel is empty, since then the buffer
has to be empty.true if the data cluster has no data points,
false otherwise.protected void overwriteOldEntry(Entry newEntry)
Entry to the values of the data cluster in the given
Entry, but adds N and classCount of the cluster in the given
Entry to the data cluster in this one. This function is useful when the
weight of an entry becomes to small, and we want to forget the
information of the old points.newEntry - The cluster that should overwrite the information.protected void recalculateData()
data Kernel. Timestamps are not changed.data,
Kerneprotected boolean isIrrelevant(double threshold)
threshold - The threshold under which entries at leafs can be
erased.protected void makeOlder(long currentTime,
double negLambda)
currentTime - the current timenegLambda - the aging constantCopyright © 2014 University of Waikato, Hamilton, NZ. All Rights Reserved.