uk.ac.starlink.diva.interp
Class BasicInterpolatorFactory

java.lang.Object
  extended by uk.ac.starlink.diva.interp.BasicInterpolatorFactory
All Implemented Interfaces:
InterpolatorFactory

public class BasicInterpolatorFactory
extends Object
implements InterpolatorFactory

This class creates and enumerates the types of Interpolator that are available.

Version:
$Id$
Author:
Peter W. Draper

Field Summary
 
Fields inherited from interface uk.ac.starlink.diva.interp.InterpolatorFactory
AKIMA, CUBIC, defaultShortNames, HERMITE, LINEAR, POLYNOMIAL
 
Method Summary
static InterpolatorFactory getInstance()
          Return reference to the only allowed instance of this class.
 int getInterpolatorCount()
          Get the number of interpolators supported.
 int getInterpolatorType(Interpolator interpolator)
          Return the numeric type of a given Interpolator.
 String getShortName(int interpolator)
          Get the short name of an interpolator type.
 int getTypeFromName(String name)
          Get the interpolator type, given a short name.
 Interpolator makeInterpolator(int interpolator)
          Create an Interpolator of the given type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static InterpolatorFactory getInstance()
Return reference to the only allowed instance of this class.

Returns:
reference to only instance of this class.

getInterpolatorCount

public int getInterpolatorCount()
Description copied from interface: InterpolatorFactory
Get the number of interpolators supported.

Specified by:
getInterpolatorCount in interface InterpolatorFactory

makeInterpolator

public Interpolator makeInterpolator(int interpolator)
Description copied from interface: InterpolatorFactory
Create an Interpolator of the given type.

Specified by:
makeInterpolator in interface InterpolatorFactory

getShortName

public String getShortName(int interpolator)
Description copied from interface: InterpolatorFactory
Get the short name of an interpolator type.

Specified by:
getShortName in interface InterpolatorFactory

getTypeFromName

public int getTypeFromName(String name)
Description copied from interface: InterpolatorFactory
Get the interpolator type, given a short name. Returns -1 if the name isn't known.

Specified by:
getTypeFromName in interface InterpolatorFactory

getInterpolatorType

public int getInterpolatorType(Interpolator interpolator)
Description copied from interface: InterpolatorFactory
Return the numeric type of a given Interpolator. Returns -1 if the type is unknown.

Specified by:
getInterpolatorType in interface InterpolatorFactory


Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.