public abstract class AttractorFamily extends Object
Modifier and Type | Class and Description |
---|---|
static class |
AttractorFamily.Attractor
Defines an unbounded sequence of points, that may represent an attractor.
|
Modifier and Type | Field and Description |
---|---|
static AttractorFamily |
CLIFFORD
Clifford attractors; 2d, with four parameters.
|
static AttractorFamily |
HENON
Henon attractors; 2d, with three parameters (quite boring).
|
static AttractorFamily |
RAMPE
Rampe attractors; 3d, wit six parameters.
|
Modifier | Constructor and Description |
---|---|
protected |
AttractorFamily(String name,
int ndim,
int nparam,
double maxAbsParam,
double fillThresh)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
AttractorFamily.Attractor |
createAttractor(double[] params,
double[] seed)
Creates an attractor in this family by supplying numeric parameters.
|
AttractorFamily.Attractor |
createAttractor(Random rnd)
Creates a random attractor in this family.
|
abstract java.util.function.UnaryOperator<double[]> |
createOperator(double[] params)
Returns the operator which produces the next ndim-element output point
from the previous one.
|
int |
getDimCount()
Returns the dimensionality of points in the sequence generated by
attractors from this family.
|
abstract String |
getDocUrl()
Returns a URL on the WWW at which additional or background
information about this attractor family may be found.
|
abstract String[] |
getEquations()
Returns a list of lines giving a textual representation of
the iteration formula used to generate attractors.
|
abstract double[][] |
getExamples()
Returns a hard coded list of attractor parameter arrays that represent
interesting members of this family.
|
double |
getFillThreshold()
Returns a guideline value for the space filling factor which
represents an interesting (strange) attractor from this family.
|
double |
getMaxAbsParam()
The maximum absolute value recommended for each of the input values
(which should therefore be in the range [-maxAbsParam,+maxAbsParam]).
|
String |
getName()
Returns the name of this family.
|
int |
getParamCount()
Returns the number of parameters required to produce an
attractor instance.
|
static double |
getSpaceFraction(AttractorFamily.Attractor att,
int nbin)
Calculates a measure of the proportion of the N-dimensional space
defined by the bounds of an attractor.
|
static java.util.stream.Stream<AttractorFamily.Attractor> |
getStrangeAttractors(AttractorFamily family)
Utility/example method to create a stream of strange attractors
in a given family.
|
static double[] |
randoms(Random rnd,
int n,
double absmax)
Returns a fixed size array containing random numbers suitable
for use as attractor parameters.
|
public static final AttractorFamily CLIFFORD
public static final AttractorFamily RAMPE
public static final AttractorFamily HENON
protected AttractorFamily(String name, int ndim, int nparam, double maxAbsParam, double fillThresh)
name
- name of familyndim
- dimensionality of output pointsnparam
- number of numerical parameters required to define
an attractormaxAbsParam
- the maximum absolute recommended value of each of
the numerical parametersfillThresh
- guideline space filling factor above which
attractors in this family look interesting (strange)public String getName()
public int getDimCount()
public int getParamCount()
public double getMaxAbsParam()
public double getFillThreshold()
getSpaceFraction(uk.ac.starlink.ttools.scheme.AttractorFamily.Attractor, int)
public abstract String[] getEquations()
public abstract String getDocUrl()
public abstract java.util.function.UnaryOperator<double[]> createOperator(double[] params)
params
- nparam-element list of numeric parameters defining
the attractorpublic AttractorFamily.Attractor createAttractor(double[] params, double[] seed)
params
- nparam-element array of numeric parametersseed
- initial point for iteration, or null for defaultpublic AttractorFamily.Attractor createAttractor(Random rnd)
rnd
- random seedpublic abstract double[][] getExamples()
getStrangeAttractors(uk.ac.starlink.ttools.scheme.AttractorFamily)
.
This list should contain at least one entry.public static double[] randoms(Random rnd, int n, double absmax)
rnd
- random seedn
- required size of output arrayabsmax
- absolute maximum valuepublic static double getSpaceFraction(AttractorFamily.Attractor att, int nbin)
Of course the actual proporition for a finite number of points is effectively zero, but we bin the space up into a regular grid and count how many of the grid elements are hit during iteration.
att
- attractor to characterisenbin
- number of bins along each axispublic static java.util.stream.Stream<AttractorFamily.Attractor> getStrangeAttractors(AttractorFamily family)
family
- attractor familyCopyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.