public class MicrosphereInterpolatingFunction extends java.lang.Object implements MultivariateRealFunction
| Modifier and Type | Class and Description |
|---|---|
private static class |
MicrosphereInterpolatingFunction.MicrosphereSurfaceElement
Class for storing the accounting data needed to perform the
microsphere projection.
|
| Modifier and Type | Field and Description |
|---|---|
private double |
brightnessExponent
Exponent used in the power law that computes the weights of the
sample data.
|
private int |
dimension
Space dimension.
|
private java.util.List<MicrosphereInterpolatingFunction.MicrosphereSurfaceElement> |
microsphere
Internal accounting data for the interpolation algorithm.
|
private java.util.Map<RealVector,java.lang.Double> |
samples
Sample data.
|
| Constructor and Description |
|---|
MicrosphereInterpolatingFunction(double[][] xval,
double[] yval,
int brightnessExponent,
int microsphereElements,
UnitSphereRandomVectorGenerator rand) |
| Modifier and Type | Method and Description |
|---|---|
private double |
cosAngle(RealVector v,
RealVector w)
Compute the cosine of the angle between 2 vectors.
|
double |
value(double[] point)
Compute the value for the function at the given point.
|
private final int dimension
private final java.util.List<MicrosphereInterpolatingFunction.MicrosphereSurfaceElement> microsphere
private final double brightnessExponent
private final java.util.Map<RealVector,java.lang.Double> samples
public MicrosphereInterpolatingFunction(double[][] xval,
double[] yval,
int brightnessExponent,
int microsphereElements,
UnitSphereRandomVectorGenerator rand)
throws DimensionMismatchException,
NoDataException
xval - the arguments for the interpolation points.
xval[i][0] is the first component of interpolation point
i, xval[i][1] is the second component, and so on
until xval[i][d-1], the last component of that interpolation
point (where dimension is thus the dimension of the sampled
space).yval - the values for the interpolation pointsbrightnessExponent - Brightness dimming factor.microsphereElements - Number of surface elements of the
microsphere.rand - Unit vector generator for creating the microsphere.DimensionMismatchException - if the lengths of yval and
xval (equal to n, the number of interpolation points)
do not match, or the the arrays xval[0] ... xval[n],
have lengths different from dimension.NoDataException - if there are no data (xval null or zero length)public double value(double[] point)
MultivariateRealFunctionvalue in interface MultivariateRealFunctionpoint - Interpolation point.private double cosAngle(RealVector v, RealVector w)
v - Vector.w - Vector.Copyright (c) 2003-2013 Apache Software Foundation