org.knime.base.util.coordinate
Class LogarithmicMappingMethod

java.lang.Object
  extended by org.knime.base.util.coordinate.LogarithmicMappingMethod
All Implemented Interfaces:
MappingMethod

public class LogarithmicMappingMethod
extends Object
implements MappingMethod

A logarithmic mapping method. This will be applied to the data before creating ticks.

Author:
Stephan Sellien, University of Konstanz

Field Summary
static String ID_BASE_10
          Identifier for a logarithmic mapping method with base 10 ( log ).
static String ID_BASE_2
          Identifier for a logarithmic mapping method with base 2 ( ld ).
static String ID_BASE_E
          Identifier for a logarithmic mapping method with base e ( ln ).
 
Constructor Summary
LogarithmicMappingMethod()
          Creates a logarithmic mapping method.
LogarithmicMappingMethod(double base)
          Creates a logarithmic mapping method with the given base.
 
Method Summary
 DataCell doMapping(DataCell in)
          Maps the value according to its task.
 String getDisplayName()
          Returns the display name of this MappingMethod.
 double getLabel(DataCell cell)
          Maps a value back to the original domain value for tick generation.
 boolean isCompatibleWithDomain(DataColumnDomain domain)
          Checks compatibility with a domain.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ID_BASE_E

public static final String ID_BASE_E
Identifier for a logarithmic mapping method with base e ( ln ).

See Also:
Constant Field Values

ID_BASE_2

public static final String ID_BASE_2
Identifier for a logarithmic mapping method with base 2 ( ld ).

See Also:
Constant Field Values

ID_BASE_10

public static final String ID_BASE_10
Identifier for a logarithmic mapping method with base 10 ( log ).

See Also:
Constant Field Values
Constructor Detail

LogarithmicMappingMethod

public LogarithmicMappingMethod()
Creates a logarithmic mapping method. The standard base is e.


LogarithmicMappingMethod

public LogarithmicMappingMethod(double base)
Creates a logarithmic mapping method with the given base.

Parameters:
base - the base of the logarithm
Method Detail

doMapping

public DataCell doMapping(DataCell in)
Maps the value according to its task.

Specified by:
doMapping in interface MappingMethod
Parameters:
in - the value to map
Returns:
the mapped value

getDisplayName

public String getDisplayName()
Returns the display name of this MappingMethod.

Specified by:
getDisplayName in interface MappingMethod
Returns:
the display name

isCompatibleWithDomain

public boolean isCompatibleWithDomain(DataColumnDomain domain)
Checks compatibility with a domain. Returns true by default. The logarithmic mapping method is usable if lower bound is greater or equal 0 and the upper bound is greater than 1 for scaling reasons.

Specified by:
isCompatibleWithDomain in interface MappingMethod
Parameters:
domain - the domain
Returns:
true, if this mapping method is compatible.

getLabel

public double getLabel(DataCell cell)
Maps a value back to the original domain value for tick generation. Is the inverse function.

Specified by:
getLabel in interface MappingMethod
Parameters:
cell - the value
Returns:
the inverse value of cell according to this mapping


Copyright, 2003 - 2010. All rights reserved.
University of Konstanz, Germany.
Chair for Bioinformatics and Information Mining, Prof. Dr. Michael R. Berthold.
You may not modify, publish, transmit, transfer or sell, reproduce, create derivative works from, distribute, perform, display, or in any way exploit any of the content, in whole or in part, except as otherwise expressly permitted in writing by the copyright owner or as specified in the license file distributed with this product.