jklustor-overlap-0.0.2-20140619012940 (ChemAxon)


com.chemaxon.overlap.unguarded
Class Unguardeds

Object
  extended by com.chemaxon.overlap.unguarded.Unguardeds

public final class Unguardeds
extends Object

Utility methods related for unguarded descriptors.

Author:
Gabor Imre

Method Summary
static
<D extends com.chemaxon.descriptors.common.Descriptor,T>
ImmutableList<T>
transformPage(Function<D,T> extractor, List<D> page)
          Transform a page of descriptors to unguarded form.
static UnguardedDissimilarityCalculator<byte[]> wrapComparator(com.chemaxon.descriptors.common.DescriptorComparator<?> comparator)
          Wrap a DescriptorComparator.
static
<D extends com.chemaxon.descriptors.common.Descriptor>
Function<D,byte[]>
wrapGenerator(com.chemaxon.descriptors.common.DescriptorGenerator<D> generator)
          Wrap a DescriptorGenerator as an unguarded extractor Function.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

wrapGenerator

public static <D extends com.chemaxon.descriptors.common.Descriptor> Function<D,byte[]> wrapGenerator(com.chemaxon.descriptors.common.DescriptorGenerator<D> generator)
Wrap a DescriptorGenerator as an unguarded extractor Function.

Type Parameters:
D - Descriptor type
Parameters:
generator - Generator to expose
Returns:
Extractor wrapping passed generator

wrapComparator

public static UnguardedDissimilarityCalculator<byte[]> wrapComparator(com.chemaxon.descriptors.common.DescriptorComparator<?> comparator)
Wrap a DescriptorComparator.

The returned UnguardedDissimilarityCalculato exposes the given comparators DescriptorComparator.calculateDissimilarity(byte[], byte[]) method.

Note that the function returned by wrapGenerator(com.chemaxon.descriptors.common.DescriptorGenerator) is suitable as the unguarded extractor function.

Parameters:
comparator - Comparator to expose
Returns:
Wrapped calculator

transformPage

public static <D extends com.chemaxon.descriptors.common.Descriptor,T> ImmutableList<T> transformPage(Function<D,T> extractor,
                                                                                                      List<D> page)
Transform a page of descriptors to unguarded form.

Type Parameters:
D - Descriptor type in the original page to be transformed
T - Unguarded descriptor type
Parameters:
extractor - Function to extract unguarded descriptor content for storage.
page - Page to transform
Returns:
Transformed page

jklustor-overlap-0.0.2-20140619012940 (ChemAxon)