public class NormKernel extends Object implements Kernel
k(x,y)/sqrt(k(x,x)*k(y,y)
. If
the object is a org.apache.ctakes.ytex.kernel.Node, then save the norm in the node for future
reference. else if cacheNorm = true, save the norm in the cache for future
reference. If the delegate kernel is fast (e.g. it's using caching itself /
trivial operation) caching the norm will slow things down.Constructor and Description |
---|
NormKernel() |
NormKernel(Kernel delegateKernel) |
Modifier and Type | Method and Description |
---|---|
double |
evaluate(Object o1,
Object o2) |
net.sf.ehcache.CacheManager |
getCacheManager() |
Kernel |
getDelegateKernel() |
double |
getNorm(Object o1)
compute the norm.
|
void |
init() |
boolean |
isCacheNorm() |
void |
setCacheManager(net.sf.ehcache.CacheManager cacheManager) |
void |
setCacheNorm(boolean cacheNorm) |
void |
setDelegateKernel(Kernel delegateKernel) |
public NormKernel(Kernel delegateKernel)
public NormKernel()
public boolean isCacheNorm()
public void setCacheNorm(boolean cacheNorm)
public net.sf.ehcache.CacheManager getCacheManager()
public void setCacheManager(net.sf.ehcache.CacheManager cacheManager)
public Kernel getDelegateKernel()
public void setDelegateKernel(Kernel delegateKernel)
public double getNorm(Object o1)
o1
- public void init()
Copyright © 2012-2017 The Apache Software Foundation. All Rights Reserved.