Inherited by DoubleDip.
Public Member Functions | |
UnitFunction1D () | |
UnitFunction1D (double centre, double scale) | |
void | setParams (double centre, double scale) |
void | setCentre (double centre) |
double | getCentre () |
void | setScale (double scale) |
double | getScale () |
abstract double | getValue (double point) |
String | getName () |
Each fractal function is constructed from base functions or "unit functions" at various scales (a little like wavelets) chosen from appropriate probability distributions to preserve self-similarity.
The name unit function comes from the fact that the non-zero portion of each function is constrained to a unit hypercube, centred at the origin. In the 1-d case this is therefore the interval (-0.5, 0.5).
This is the superclass of all 1-d unit functions. If you are writing your own unit function you only need to call the constructors from your own constructors using super(), and provide an implementation for getValue(point).
Definition at line 29 of file UnitFunction1D.java.
UnitFunction1D::UnitFunction1D | ( | ) | [inline] |
Construct a default unit function whose centre and scale will be set later - only called by subclasses.
Definition at line 39 of file UnitFunction1D.java.
UnitFunction1D::UnitFunction1D | ( | double | centre, | |
double | scale | |||
) | [inline] |
Construct a unit function - only called by subclasses.
centre | the x-axis value to which the centre of this unitfunction is mapped | |
scale | the factor by which this unit function is scaled |
Definition at line 47 of file UnitFunction1D.java.
double UnitFunction1D::getCentre | ( | ) | [inline] |
Get the location of this unit function.
Definition at line 74 of file UnitFunction1D.java.
String UnitFunction1D::getName | ( | ) | [inline] |
Convenience method to get the name of this function as a String.
Definition at line 110 of file UnitFunction1D.java.
double UnitFunction1D::getScale | ( | ) | [inline] |
Get the scale of this unit function.
Definition at line 90 of file UnitFunction1D.java.
abstract double UnitFunction1D::getValue | ( | double | point | ) | [pure virtual] |
Evalutate this unit function at the given x-value.
point | the point at which this function is evaluated |
Implemented in DoubleDip.
void UnitFunction1D::setCentre | ( | double | centre | ) | [inline] |
Set the location at which this unit function is applied.
centre | the x-axis value to which the centre of this unitfunction is mapped |
Definition at line 66 of file UnitFunction1D.java.
void UnitFunction1D::setParams | ( | double | centre, | |
double | scale | |||
) | [inline] |
Set the location and scale at which this unit function is applied.
centre | the x-axis value to which the centre of this unitfunction is mapped | |
scale | the factor by which this unit function is scaled |
Definition at line 57 of file UnitFunction1D.java.
void UnitFunction1D::setScale | ( | double | scale | ) | [inline] |
Set the scale at which this unit function is applied.
scale | the factor by which this unit function is scaled |
Definition at line 82 of file UnitFunction1D.java.