public class ParameterizationFunction extends DoubleVector implements TextWriteable
Modifier and Type | Class and Description |
---|---|
static class |
ParameterizationFunction.ExtremumType
Available types for the global extremum.
|
Modifier and Type | Field and Description |
---|---|
private double[] |
alphaExtremum
Holds the alpha values of the global extremum.
|
static double |
DELTA
A small number to handle numbers near 0 as 0.
|
private ParameterizationFunction.ExtremumType |
extremumType
Holds the type of the global extremum.
|
ATTRIBUTE_SEPARATOR
Constructor and Description |
---|
ParameterizationFunction(double[] values)
Provides a new parameterization function describing all lines in a
d-dimensional feature space intersecting in one point p.
|
ParameterizationFunction(Double[] values)
Provides a new parameterization function describing all lines in a
d-dimensional feature space intersecting in one point p.
|
ParameterizationFunction(List<Double> values)
Provides a new parameterization function describing all lines in a
d-dimensional feature space intersecting in one point p.
|
ParameterizationFunction(Vector columnMatrix)
Provides a new parameterization function describing all lines in a
d-dimensional feature space intersecting in one point p.
|
Modifier and Type | Method and Description |
---|---|
private double |
determineAlphaMax(int n,
double[] alpha_max,
HyperBoundingBox interval)
Determines the n-th alpha value where this function has a maximum in the
specified interval.
|
private double |
determineAlphaMin(int n,
double[] alpha_min,
HyperBoundingBox interval)
Determines the n-th alpha value where this function has a minimum in the
specified interval.
|
HyperBoundingBox |
determineAlphaMinMax(HyperBoundingBox interval)
Determines the alpha values where this function has a minumum and maximum
value in the given interval.
|
private void |
determineGlobalExtremum()
Determines the global extremum of this parameterization function.
|
private void |
determineGlobalExtremumType()
Determines the type of the global extremum.
|
private double |
extremum_alpha_n(int n,
double[] alpha)
Determines the value for alpha_n where this function has a (local)
extremum.
|
private ParameterizationFunction.ExtremumType |
extremumType(int n,
double[] alpha_extreme,
HyperBoundingBox interval)
Returns the type of the extremum at the specified alpha values.
|
double |
function(double[] alpha)
Computes the function value at
alpha . |
double[] |
getGlobalAlphaExtremum()
Returns the alpha values of the extremum point in interval [(0,...,0),
(Pi,...
|
double |
getGlobalExtremum()
Returns the global extremum of this function in interval [0,...
|
ParameterizationFunction.ExtremumType |
getGlobalExtremumType()
Returns the type of the global extremum in interval [0,...
|
DoubleVector |
newInstance(double[] values)
Returns a new NumberVector of N for the given values.
|
DoubleVector |
newInstance(Double[] values)
Returns a new FeatureVector of V for the given values.
|
DoubleVector |
newInstance(List<Double> values)
Returns a new FeatureVector of V for the given values.
|
DoubleVector |
newInstance(Vector values)
Returns a new NumberVector of N for the given values.
|
private double |
sinusProduct(int start,
int end,
double[] alpha)
Computes the product of all sinus values of the specified angles from start
to end index.
|
String |
toString()
Returns a string representation of the object.
|
String |
toString(int offset)
Returns a string representation of the object with the specified offset.
|
void |
writeToText(TextWriterStream out,
String label)
Write self to the given
TextWriterStream |
doubleValue, fromByteBuffer, getByteSize, getColumnVector, getDimensionality, getRowVector, getValue, getValues, longValue, minus, multiplicate, negativeVector, nullVector, plus, scalarProduct, toByteBuffer
byteValue, equals, floatValue, getMax, getMin, hashCode, intValue, shortValue
public static final double DELTA
private double[] alphaExtremum
private ParameterizationFunction.ExtremumType extremumType
public ParameterizationFunction(double[] values)
values
- the values of the point ppublic ParameterizationFunction(Double[] values)
values
- the values of the point ppublic ParameterizationFunction(List<Double> values)
values
- the values of the point ppublic ParameterizationFunction(Vector columnMatrix)
columnMatrix
- the values of the point ppublic double function(double[] alpha)
alpha
.alpha
- the values of the d-1 anglespublic HyperBoundingBox determineAlphaMinMax(HyperBoundingBox interval)
interval
- the hyper bounding box defining the intervalprivate ParameterizationFunction.ExtremumType extremumType(int n, double[] alpha_extreme, HyperBoundingBox interval)
n
- the index until the alpha values are computedalpha_extreme
- the already computed alpha valuesinterval
- the hyper bounding box defining the interval in which the
extremum occursprivate double determineAlphaMin(int n, double[] alpha_min, HyperBoundingBox interval)
n
- the index of the alpha value to be determinedalpha_min
- the already computed alpha valuesinterval
- the hyper bounding box defining the intervalprivate double determineAlphaMax(int n, double[] alpha_max, HyperBoundingBox interval)
n
- the index of the alpha value to be determinedalpha_max
- the already computed alpha valuesinterval
- the hyper bounding box defining the intervalpublic double[] getGlobalAlphaExtremum()
public double getGlobalExtremum()
public ParameterizationFunction.ExtremumType getGlobalExtremumType()
public String toString()
toString
in interface FeatureVector<DoubleVector,Double>
toString
in class DoubleVector
public String toString(int offset)
offset
- the offset of the string representationprivate double sinusProduct(int start, int end, double[] alpha)
start
- the index to startend
- the index to endalpha
- the array of anglesprivate void determineGlobalExtremum()
private void determineGlobalExtremumType()
private double extremum_alpha_n(int n, double[] alpha)
n
- the index of the anglealpha
- the already determined alpha_values for the extremumpublic void writeToText(TextWriterStream out, String label)
TextWriteable
TextWriterStream
writeToText
in interface TextWriteable
out
- Output writerlabel
- Labelpublic DoubleVector newInstance(double[] values)
NumberVector
newInstance
in interface NumberVector<DoubleVector,Double>
newInstance
in class DoubleVector
values
- the values of the NumberVectorpublic DoubleVector newInstance(Vector values)
NumberVector
newInstance
in interface NumberVector<DoubleVector,Double>
newInstance
in class DoubleVector
values
- the values of the NumberVectorpublic DoubleVector newInstance(Double[] values)
FeatureVector
newInstance
in interface FeatureVector<DoubleVector,Double>
newInstance
in class DoubleVector
values
- the values of the featureVectorpublic DoubleVector newInstance(List<Double> values)
FeatureVector
newInstance
in interface FeatureVector<DoubleVector,Double>
newInstance
in class DoubleVector
values
- the values of the featureVector