de.grogra.math
Class SplineFunction

java.lang.Object
  extended by de.grogra.persistence.ShareableBase
      extended by de.grogra.math.SplineFunction
All Implemented Interfaces:
KnotVector, Manageable, Shareable, FloatToFloat

public class SplineFunction
extends ShareableBase
implements KnotVector, FloatToFloat


Nested Class Summary
static class SplineFunction.Type
           
 
Field Summary
static SplineFunction.Type $TYPE
           
static int B_SPLINE
           
static int CUBIC
           
static SCOType.Field data$FIELD
           
static int HERMITE
           
static SCOType.Field type$FIELD
           
 
Constructor Summary
SplineFunction(float[] xData, float[] yData, int type)
           
SplineFunction(Point2f[] data, int type)
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
 float evaluateBSpline(float x)
           
 float evaluateCubic(float x)
           
 float evaluateFloat(float x)
          Computes the value of this function at x.
 float evaluateHermite(float x)
           
 Point2f[] getData()
           
 float getKnot(int dim, int index, GraphState gs)
           
 ManageableType getManageableType()
           
 int getType()
           
static void main(java.lang.String[] args)
           
 void setData(Point2f[] value)
           
 void setType(int value)
           
 
Methods inherited from class de.grogra.persistence.ShareableBase
addReference, appendReferencesTo, fieldModified, getProvider, getStamp, initProvider, manageableReadResolve, manageableWriteReplace, removeReference
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

$TYPE

public static final SplineFunction.Type $TYPE

B_SPLINE

public static final int B_SPLINE
See Also:
Constant Field Values

CUBIC

public static final int CUBIC
See Also:
Constant Field Values

data$FIELD

public static final SCOType.Field data$FIELD

HERMITE

public static final int HERMITE
See Also:
Constant Field Values

type$FIELD

public static final SCOType.Field type$FIELD
Constructor Detail

SplineFunction

public SplineFunction(float[] xData,
                      float[] yData,
                      int type)
Parameters:
xData -
yData -
type -

SplineFunction

public SplineFunction(Point2f[] data,
                      int type)
Parameters:
data -
type -
Method Detail

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

evaluateBSpline

public float evaluateBSpline(float x)

evaluateCubic

public float evaluateCubic(float x)

evaluateFloat

public float evaluateFloat(float x)
Description copied from interface: FloatToFloat
Computes the value of this function at x.

Specified by:
evaluateFloat in interface FloatToFloat
Parameters:
x - where the function is to be evaluated
Returns:
function value at x

evaluateHermite

public float evaluateHermite(float x)

getData

public Point2f[] getData()

getKnot

public float getKnot(int dim,
                     int index,
                     GraphState gs)
Specified by:
getKnot in interface KnotVector

getManageableType

public ManageableType getManageableType()
Specified by:
getManageableType in interface Manageable

getType

public int getType()

main

public static void main(java.lang.String[] args)

setData

public void setData(Point2f[] value)

setType

public void setType(int value)