classifiers.usm.distance
Class USMComplexityCache

java.lang.Object
  |
  +--classifiers.usm.distance.USMComplexityCache
All Implemented Interfaces:
java.io.Serializable

public class USMComplexityCache
extends java.lang.Object
implements java.io.Serializable

Class for cacheing the Kolmogorov complexity esitmates for a particular instance!

Version:
$Revision: 1.2 $
Author:
David Lindsay (davidl@cs.rhul.ac.uk)
See Also:
Serialized Form

Constructor Summary
USMComplexityCache(Instance i, double c, double cs, java.lang.Object ci, Attribute a)
          This is the constructor for the caching of the complexity esitmated needed to compute the distances between instances.
 
Method Summary
 Attribute getAttribute()
          Simple function to return the attribute for which has been compressed of the instance.
 double getComplexity()
          Simple function to return the complexity of an instance of interest
 double getComplexityStar()
          Simple function to return the complexity of the compressed instance of interest
 java.lang.Object getCompressedVersion()
          Simple function to return the compressed version of the instance.
 Instance getInstance()
          Simple function to return the instance of interest
 java.lang.String toString()
          Converts a USMComplexityCache object to a string
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

USMComplexityCache

public USMComplexityCache(Instance i,
                          double c,
                          double cs,
                          java.lang.Object ci,
                          Attribute a)
This is the constructor for the caching of the complexity esitmated needed to compute the distances between instances.

Parameters:
i - the instance of interest
c - the complexity of the instance object
cs - the complexity of the compressed instance object
Method Detail

getInstance

public Instance getInstance()
Simple function to return the instance of interest

Returns:
the instance associated with this cache

getComplexity

public double getComplexity()
Simple function to return the complexity of an instance of interest

Returns:
the complexity of an instance associated with this cache

getComplexityStar

public double getComplexityStar()
Simple function to return the complexity of the compressed instance of interest

Returns:
the complexity of the compressed instance associated with this cache

getCompressedVersion

public java.lang.Object getCompressedVersion()
Simple function to return the compressed version of the instance.

Returns:
the compressed object (for you to cast into byte[], String or whatever you chose)

getAttribute

public Attribute getAttribute()
Simple function to return the attribute for which has been compressed of the instance.

Returns:
the attribute which we are compressing for the USM

toString

public java.lang.String toString()
Converts a USMComplexityCache object to a string

Overrides:
toString in class java.lang.Object
Returns:
a string describing a complexity cache


Copyright (c) 2003 David Lindsay, Computer Learning Research Centre, Dept. Computer Science, Royal Holloway, University of London