Class InterpolatingMicrosphere2D
java.lang.Object
org.apache.commons.math3.analysis.interpolation.InterpolatingMicrosphere
org.apache.commons.math3.analysis.interpolation.InterpolatingMicrosphere2D
Utility class for the
MicrosphereProjectionInterpolator algorithm.
For 2D interpolation, this class constructs the microsphere as a series of
evenly spaced facets (rather than generating random normals as in the
base implementation).- Since:
- 3.6
-
Constructor Summary
ConstructorsModifierConstructorDescriptionInterpolatingMicrosphere2D(int size, double maxDarkFraction, double darkThreshold, double background) Create a sphere from vectors regularly sampled around a circle.protectedCopy constructor. -
Method Summary
Methods inherited from class org.apache.commons.math3.analysis.interpolation.InterpolatingMicrosphere
add, getDimension, getSize, value
-
Constructor Details
-
InterpolatingMicrosphere2D
public InterpolatingMicrosphere2D(int size, double maxDarkFraction, double darkThreshold, double background) Create a sphere from vectors regularly sampled around a circle.- Parameters:
size- Number of surface elements of the sphere.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 thebackgroundvalue will be returned instead.darkThreshold- Value of the illumination below which a facet is considered dark.background- Value returned when themaxDarkFractionthreshold is exceeded.- Throws:
NotStrictlyPositiveException- ifsize <= 0.NotPositiveException- ifdarkThreshold < 0.OutOfRangeException- ifmaxDarkFractiondoes not belong to the interval[0, 1].
-
InterpolatingMicrosphere2D
Copy constructor.- Parameters:
other- Instance to copy.
-
-
Method Details
-
copy
Perform a copy.- Overrides:
copyin classInterpolatingMicrosphere- Returns:
- a copy of this instance.
-