com.rapidminer.tools.math.kernels
Class MapBasedCache

java.lang.Object
  extended by com.rapidminer.tools.math.kernels.MapBasedCache
All Implemented Interfaces:
KernelCache

public class MapBasedCache
extends java.lang.Object
implements KernelCache

Stores all distances in a map. Uses only a fixed maximum amount of entries for this map (default: 10,000,000, enough for about 3000 examples).

Author:
Ingo Mierswa

Constructor Summary
MapBasedCache(int exampleSetSize)
           
MapBasedCache(int maxSize, int exampleSetSize)
           
 
Method Summary
 double get(int i, int j)
          Delivers the cached value or Double.NaN if the value is not known.
 void store(int i, int j, double value)
          Stores the value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapBasedCache

public MapBasedCache(int exampleSetSize)

MapBasedCache

public MapBasedCache(int maxSize,
                     int exampleSetSize)
Method Detail

get

public double get(int i,
                  int j)
Description copied from interface: KernelCache
Delivers the cached value or Double.NaN if the value is not known.

Specified by:
get in interface KernelCache

store

public void store(int i,
                  int j,
                  double value)
Description copied from interface: KernelCache
Stores the value. Should only be invoked if the value was not known. This method might delete kernel values so that the invocation of get might deliver NaN.

Specified by:
store in interface KernelCache


Copyright © 2001-2009 by Rapid-I