mpi.fruitfly.math
Class General

java.lang.Object
  extended by mpi.fruitfly.math.General

public class General
extends java.lang.Object


Field Summary
static double M_2PI
           
 
Constructor Summary
General()
           
 
Method Summary
static double computeCorrelationCoefficient(double[] X1, double[] X2)
           
static double computeMedian(double[] values)
           
static float computeMedian(float[] values)
           
static double computeTurkeyBiAverage(double[] conc)
           
static double computeTurkeyBiAverage(double[] conc, double c)
           
static double computeTurkeyBiAverage(double[] conc, double[] W, double c)
           
static double computeTurkeyBiMedian(double[] concinput, double c)
           
static float computeTurkeyBiMedian(float[] concinput, float c)
           
static double[] computeTurkeyBiMedianWeights(double[] concinput, double c)
           
static double Exp10(double x)
           
static int flipInRange(int a, int mod)
          return a integer that is flipped in the range [0 ...
static double gLog(double z, double c)
           
static double gLogInv(double w, double c)
           
static boolean isApproxEqual(double a, double b, double threshold)
           
static int ldu(int v)
          fast floor ld of unsigned v
static double Log10(double x)
           
static double max(double a, double b)
           
static float max(float a, float b)
           
static int max(int a, int b)
           
static double min(double a, double b)
           
static float min(float a, float b)
           
static int min(int a, int b)
           
static int offsetToPowerOf2(int size)
          Berechnet die Differenz(Offset) der ganzzahligen Eingabe zur naechsten Zweierpotenz.
static int pow(int a, int b)
           
static void quicksort(double[] data, int[] sortAlso, int left, int right)
           
static void quicksort(double[] data, int left, int right)
           
static void quicksort(float[] data, int left, int right)
           
static void quicksort(float[] data, java.awt.Point[] sortAlso, int left, int right)
           
static void quicksort(Quicksortable[] data, int left, int right)
           
static void quicksort(java.util.Vector data, int left, int right)
           
static int sign(double value)
           
static double sq(double a)
          simple square
static float sq(float a)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

M_2PI

public static final double M_2PI
See Also:
Constant Field Values
Constructor Detail

General

public General()
Method Detail

sq

public static double sq(double a)
simple square

Parameters:
value -
Returns:
value * value

sq

public static float sq(float a)

ldu

public static int ldu(int v)
fast floor ld of unsigned v


flipInRange

public static int flipInRange(int a,
                              int mod)
return a integer that is flipped in the range [0 ... mod - 1]

Parameters:
a - the value to be flipped
range - the size of the range
Returns:
a flipped in range like a ping pong ball

sign

public static int sign(double value)

isApproxEqual

public static boolean isApproxEqual(double a,
                                    double b,
                                    double threshold)

computeCorrelationCoefficient

public static double computeCorrelationCoefficient(double[] X1,
                                                   double[] X2)

min

public static int min(int a,
                      int b)

min

public static double min(double a,
                         double b)

min

public static float min(float a,
                        float b)

max

public static int max(int a,
                      int b)

max

public static float max(float a,
                        float b)

max

public static double max(double a,
                         double b)

offsetToPowerOf2

public static int offsetToPowerOf2(int size)
Berechnet die Differenz(Offset) der ganzzahligen Eingabe zur naechsten Zweierpotenz. Bsp: Eingabe 23 -> naechste Potenz 32 -> Ergebnis 9

Parameters:
size - ganzzahliger Eingabewert
Returns:
int der berechnete Offset

gLog

public static double gLog(double z,
                          double c)

gLogInv

public static double gLogInv(double w,
                             double c)

Log10

public static double Log10(double x)

Exp10

public static double Exp10(double x)

pow

public static int pow(int a,
                      int b)

computeTurkeyBiAverage

public static double computeTurkeyBiAverage(double[] conc)

computeTurkeyBiAverage

public static double computeTurkeyBiAverage(double[] conc,
                                            double c)

computeTurkeyBiAverage

public static double computeTurkeyBiAverage(double[] conc,
                                            double[] W,
                                            double c)

computeTurkeyBiMedian

public static double computeTurkeyBiMedian(double[] concinput,
                                           double c)

computeTurkeyBiMedian

public static float computeTurkeyBiMedian(float[] concinput,
                                          float c)

computeTurkeyBiMedianWeights

public static double[] computeTurkeyBiMedianWeights(double[] concinput,
                                                    double c)

computeMedian

public static double computeMedian(double[] values)

computeMedian

public static float computeMedian(float[] values)

quicksort

public static void quicksort(double[] data,
                             int left,
                             int right)

quicksort

public static void quicksort(float[] data,
                             int left,
                             int right)

quicksort

public static void quicksort(Quicksortable[] data,
                             int left,
                             int right)

quicksort

public static void quicksort(java.util.Vector data,
                             int left,
                             int right)

quicksort

public static void quicksort(float[] data,
                             java.awt.Point[] sortAlso,
                             int left,
                             int right)

quicksort

public static void quicksort(double[] data,
                             int[] sortAlso,
                             int left,
                             int right)