public class InterpolatingMicrosphere extends Object
MicrosphereProjectionInterpolator
algorithm.Constructor and Description |
---|
InterpolatingMicrosphere(int dimension,
int size,
double maxDarkFraction,
double darkThreshold,
double background,
UnitSphereRandomVectorGenerator rand)
Create a sphere from randomly sampled vectors.
|
Modifier and Type | Method and Description |
---|---|
InterpolatingMicrosphere |
copy()
Perform a copy.
|
int |
getDimension()
Get the space dimensionality.
|
int |
getSize()
Get the size of the sphere.
|
double |
value(double[] point,
double[][] samplePoints,
double[] sampleValues,
double exponent,
double noInterpolationTolerance)
Estimate the value at the requested location.
|
public InterpolatingMicrosphere(int dimension, int size, double maxDarkFraction, double darkThreshold, double background, UnitSphereRandomVectorGenerator rand)
dimension
- Dimension of the data space.size
- Number of surface elements of the sphere.rand
- Unit vector generator for creating the microsphere.maxDarkFraction
- Maximum fraction of the facets that can be dark.
If the fraction of "non-illuminated" facets is larger, no estimation
of the value will be performed, and the background
value will
be returned instead.darkThreshold
- Value of the illumination below which a facet
is considered dark.background
- Value returned when the maxDarkFraction
threshold is exceeded.DimensionMismatchException
- if the size of the generated
vectors does not match the dimension set in the constructor.NotStrictlyPositiveException
- if dimension <= 0
or size <= 0
.NotPositiveException
- if darkThreshold < 0
.OutOfRangeException
- if maxDarkFraction
does not
belong to the interval [0, 1]
.public InterpolatingMicrosphere copy()
public int getDimension()
public int getSize()
public double value(double[] point, double[][] samplePoints, double[] sampleValues, double exponent, double noInterpolationTolerance)
point
, contribution
of the given samplePoints
to each sphere facet is computed
(illumination) and the interpolation is performed (integration of
the illumination).point
- Interpolation point.samplePoints
- Sampling data points.sampleValues
- Sampling data values at the corresponding
samplePoints
.exponent
- Exponent used in the power law that computes
the weights (distance dimming factor) of the sample data.noInterpolationTolerance
- When the distance between the
point
and one of the samplePoints
is less than
this value, no interpolation will be performed, and the value
of the sample will just be returned.point
.NotPositiveException
- if exponent < 0
.Jas4pp 1.5 © Java Analysis Studio for Particle Physics