org.gcube.contentmanagement.graphtools.utils
Class MathFunctions

java.lang.Object
  extended by org.gcube.contentmanagement.graphtools.utils.MathFunctions

public class MathFunctions
extends Object


Constructor Summary
MathFunctions()
           
 
Method Summary
static BigInteger chunk2Index(int chunkIndex, int chunkSize)
           
static double[] derivative(double[] a)
           
static boolean[] findSpikes(double[] derivative)
           
static boolean[] findSpikes(double[] derivative, double threshold)
           
static List<Integer> findZeros(double[] points)
           
static ArrayList<Integer> generateRandoms(int numberOfRandoms, int min, int max)
           
static int[] generateSequence(int elements)
           
static float incrementPerc(float perc, float quantity, int N)
           
static boolean isIn(List<Integer> indexarray, int index)
           
static double[] logSubdivision(double start, double end, int numberOfParts)
           
static void main(String[] args)
           
static double mean(double[] p)
           
static double[] points2Double(List<Point<? extends Number,? extends Number>> pointslist, int seriesIndex, int numbOfPoints)
           
static double roundDecimal(double number, int decimalposition)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MathFunctions

public MathFunctions()
Method Detail

main

public static void main(String[] args)
Parameters:
args -

roundDecimal

public static double roundDecimal(double number,
                                  int decimalposition)

incrementPerc

public static float incrementPerc(float perc,
                                  float quantity,
                                  int N)

generateRandoms

public static ArrayList<Integer> generateRandoms(int numberOfRandoms,
                                                 int min,
                                                 int max)

generateSequence

public static int[] generateSequence(int elements)

chunk2Index

public static BigInteger chunk2Index(int chunkIndex,
                                     int chunkSize)

mean

public static double mean(double[] p)

derivative

public static double[] derivative(double[] a)

findSpikes

public static boolean[] findSpikes(double[] derivative,
                                   double threshold)

findSpikes

public static boolean[] findSpikes(double[] derivative)

points2Double

public static double[] points2Double(List<Point<? extends Number,? extends Number>> pointslist,
                                     int seriesIndex,
                                     int numbOfPoints)

isIn

public static boolean isIn(List<Integer> indexarray,
                           int index)

findZeros

public static List<Integer> findZeros(double[] points)

logSubdivision

public static double[] logSubdivision(double start,
                                      double end,
                                      int numberOfParts)


Copyright © 2012. All Rights Reserved.