|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.jstacs.utils.Normalisation
public class Normalisation
This class can be used for normalisation of any double
array or
a part of a double
array.
Constructor Summary | |
---|---|
Normalisation()
|
Method Summary | |
---|---|
static double |
getLogSum(double... lnVal)
Returns the logarithm of the sum of values given as lnVal[i] = Math.log( val[i] ) . |
static double |
getLogSum(int start,
int end,
double... lnVal)
Returns the logarithm of the sum of values given as lnVal[i] = Math.log( val[i] ) between a start and end index. |
static double |
logSumNormalisation(double[] d)
The method does a log-sum-normalisation on d with the values
of d given as d[i] = Math.log( val[i] ) . |
static double |
logSumNormalisation(double[] d,
double offset)
The method does a log-sum-normalisation on d with the values
of d given as d[i] = Math.log( val[i] ) using
offset offset . |
static double |
logSumNormalisation(double[] d,
int startD,
int endD)
The method does a log-sum-normalisation on d between start
index startD and end index endD with the values
of d given as d[i] = Math.log( val[i] ) . |
static double |
logSumNormalisation(double[] d,
int startD,
int endD,
double[] secondValues)
The method does a log-sum-normalisation on d within start
index startD and end index endD with the values
of d given as d[i] = Math.log( val[i] ) . |
static double |
logSumNormalisation(double[] d,
int startD,
int endD,
double[] secondValues,
double[] dest,
int startDest)
The method does a log-sum-normalisation on d within start
index startD and end index endD with the values
of d given logarithmised:
d[i] = Math.log( val[i] ) . |
static double |
logSumNormalisation(double[] d,
int startD,
int endD,
double[] dest,
int startDest)
The method does a log-sum-normalisation on d between start
index startD and end index endD with the values
of d given as d[i] = Math.log( val[i] ) . |
static double |
logSumNormalisation(double[] d,
int startD,
int endD,
double offset,
double[] secondValues,
double[] dest,
int startDest)
The method does a log-sum-normalisation on d between start
index startD and end index endD with the values
of d given as d[i] = Math.log( val[i] ) using
offset offset . |
static double |
logSumNormalisation(double[] d,
int startD,
int endD,
double offset,
double[] dest,
int startDest)
The method does a log-sum-normalisation on d between start
index startD and end index endD with the values
of d given as d[i] = Math.log( val[i] ) using
offset offset . |
static void |
normalisation(double[] d,
double v)
The method does a normalisation on d using the value
v for normalisation. |
static void |
normalisation(double[] d,
double v,
double[] dest,
int start)
The method does a normalisation on d writing the result in
dest starting at position start while
d remains unchanged. |
static void |
normalisation(double[] d,
double v,
int start,
int end)
The method does a sum normalisation on d between start index
start and end index end using the value
v for the normalisation. |
static double |
sumNormalisation(double[] d)
The method does a sum-normalisation on d and returns the the
sum of the values. |
static double |
sumNormalisation(double[] d,
double[] dest,
int start)
The method does a sum-normalisation on d . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Normalisation()
Method Detail |
---|
public static double getLogSum(double... lnVal)
lnVal[i] = Math.log( val[i] )
.
lnVal
- the logs of the values, i.e.
lnVal[i] = Math.log( val[i] )
\log(\sum_i val[i])
getLogSum(int, int, double...)
public static double getLogSum(int start, int end, double... lnVal)
lnVal[i] = Math.log( val[i] )
between a start and end index.
start
- the first index in lnVal
considered for the sumend
- the index after the last index considered for the sumlnVal
- the logs of the values, i.e.
lnVal[i] = Math.log( val[i] )
\log(\sum_{i=start}^{end - 1} val[i])
public static double logSumNormalisation(double[] d)
d
with the values
of d
given as d[i] = Math.log( val[i] )
.
d
- the array with the logarithmised values that should be
normalised
\log(\sum_{i=0}^{length(d)-1} val[i])
logSumNormalisation(double[], int, int, double[], int)
public static double logSumNormalisation(double[] d, int startD, int endD)
d
between start
index startD
and end index endD
with the values
of d
given as d[i] = Math.log( val[i] )
.
d
- the array with the logarithms of the values that should be
normalisedstartD
- the first index in d
considered for the
log-sum-normalisationendD
- the index after the last index in d
considered
for the log-sum-normalisation
startD
and endD
\log(\sum_{i=startD}^{endD-1} val[i])
logSumNormalisation(double[], int, int, double[], int)
public static double logSumNormalisation(double[] d, int startD, int endD, double[] secondValues)
d
within start
index startD
and end index endD
with the values
of d
given as d[i] = Math.log( val[i] )
. secondValues
with additional values
secondValues[i] = Math.log( secval[i] )
is also considered
for the log-sum-normalisation.
d
- the array with the logarithmised values that should be
normalisedstartD
- the first index in d
considered for the
log-sum-normalisationendD
- the index after the last index in d
considered
for the log-sum-normalisationsecondValues
- second array with additional values, the whole array is
considered for the log-sum-normalisation
startD
and endD
and the values of
secondValues
\log(\sum_{i=startD}^{endD-1} val[i] + \sum_{i=0}^{length(secondValues)-1} secval[i])
logSumNormalisation(double[], int, int, double,
double[], int)
public static double logSumNormalisation(double[] d, int startD, int endD, double[] dest, int startDest)
d
between start
index startD
and end index endD
with the values
of d
given as d[i] = Math.log( val[i] )
. d
in dest
starting at position startDest
while d
remains
unchanged.
d
- the array with the logarithmised values that should be
normalisedstartD
- the first index in d
considered for the
log-sum-normalisationendD
- the index after the last index in d
considered
for the log-sum-normalisationdest
- the destination array for the normalised valuesstartDest
- the start index of the destination array
startD
and endD
\log(\sum_{i=startD}^{endD-1} val[i])
logSumNormalisation(double[], int, int, double[],
double[], int)
public static double logSumNormalisation(double[] d, int startD, int endD, double[] secondValues, double[] dest, int startDest)
d
within start
index startD
and end index endD
with the values
of d
given logarithmised:
d[i] = Math.log( val[i] )
. secondValues
with additional values
secondValues[i] = Math.log( secval[i] )
is also considered
for the log-sum-normalisation. d
in dest
starting at position startDest
while d
remains
unchanged. secondValues
will be changed during
log-sum-normalisation and will not be written to dest
.
d
- the array with the logarithmised values that should be
normalisedstartD
- the first index in d
considered for the
log-sum-normalisationendD
- the index after the last index in d
considered
for the log-sum-normalisationsecondValues
- second array with additional values, the whole array is
considered for the log-sum-normalisationdest
- the destination array for the normalised valuesstartDest
- the start index of the destination array
d
between
startD
and endD
and the values of
secondValue
\log(\sum_{i=startD}^{endD-1} val[i] + \sum_{i=0}^{length(secondValues)-1} secval[i])
logSumNormalisation(double[], int, int, double,
double[], double[], int)
public static double logSumNormalisation(double[] d, double offset)
d
with the values
of d
given as d[i] = Math.log( val[i] )
using
offset offset
.
d
- the array with the logarithmised values that should be
normalisedoffset
- the offset
\log(\sum_{i=0}^{length(d)-1} val[i])
logSumNormalisation(double[], int, int, double,
double[], int)
public static double logSumNormalisation(double[] d, int startD, int endD, double offset, double[] dest, int startDest)
d
between start
index startD
and end index endD
with the values
of d
given as d[i] = Math.log( val[i] )
using
offset offset
. d
in dest
starting at position startDest
while d
remains
unchanged.
d
- the array with the logarithmised values that should be
normalisedstartD
- the first index in d
considered for the
log-sum-normalisationendD
- the index after the last index in d
considered
for the log-sum-normalisationoffset
- the offsetdest
- the destination array for the normalised valuesstartDest
- the start index of the destination array
startD
and endD
\log(\sum_{i=startD}^{endD-1} val[i])
logSumNormalisation(double[], int, int, double,
double[], double[], int)
public static double logSumNormalisation(double[] d, int startD, int endD, double offset, double[] secondValues, double[] dest, int startDest)
d
between start
index startD
and end index endD
with the values
of d
given as d[i] = Math.log( val[i] )
using
offset offset
. secondValues
with additional values
secondValues[i] = Math.log( secval[i] )
is also considered
for the log-sum-normalisation. d
in dest
starting at position startDest
while d
remains
unchanged. secondValues
will be changed during
log-sum-normalisation and will not be written to dest
.
d
- the array with the logarithmised values that should be
normalisedstartD
- the first index in d
considered for the
log-sum-normalisationendD
- the index after the last index in d
considered
for the log-sum-normalisationoffset
- the offsetsecondValues
- second array with additional values, the whole array is
considered for the log-sum-normalisationdest
- the destination array for the normalised valuesstartDest
- the start index of the destination array
d
between
startD
and endD
and the values of
secondValue
\log(\sum_{i=startD}^{endD-1} val[i] + \sum_{i=0}^{length(secondValues)-1} secval[i])
public static double sumNormalisation(double[] d)
d
and returns the the
sum of the values.
d
- the array with the values that should be normalised
d
\sum_{i=0}^{length(d)-1} d[i]
sumNormalisation(double[], double[], int)
public static double sumNormalisation(double[] d, double[] dest, int start)
d
. dest
starting at position
start
while d
remains unchanged. The sum of the
values of d
will be returned.
d
- the array with the values that should be normaliseddest
- the destination array for the normalised valuesstart
- the start index of the destination array
d
\sum_{i=0}^{length(d)-1} d[i]
public static void normalisation(double[] d, double v)
d
using the value
v
for normalisation.
d
- the array with the values that should be normalisedv
- the value for the normalisationnormalisation(double[], double, double[], int)
public static void normalisation(double[] d, double v, double[] dest, int start)
d
writing the result in
dest
starting at position start
while
d
remains unchanged. The value v
is used for
the normalisation.
d
- the array with the values that should be normalisedv
- the value for normalisationdest
- the destination array for the normalised valuesstart
- the start index of the destination arraypublic static void normalisation(double[] d, double v, int start, int end)
d
between start index
start
and end index end
using the value
v
for the normalisation.
d
- the array with the values that should be normalisedv
- the value for normalisationstart
- the first index in d
considered for the
log-sum-normalisationend
- the index after the last index in d
considered
for the log-sum-normalisation
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |