org.ojalgo
Class PrimitiveUtils

java.lang.Object
  extended by org.ojalgo.PrimitiveUtils

public final class PrimitiveUtils
extends Object

A utility class for math containing:

Author:
apete

Field Summary
static double HALF
           
static double MACHINE_DOUBLE_ERROR
           
static float MACHINE_FLOAT_ERROR
           
static double ONE
           
static double PREFIX_ATTO
           
static double PREFIX_CENTI
           
static double PREFIX_DECI
           
static double PREFIX_DEKA
           
static double PREFIX_EXA
           
static double PREFIX_FEMTO
           
static double PREFIX_GIGA
           
static double PREFIX_HECTO
           
static double PREFIX_KILO
           
static double PREFIX_MEGA
           
static double PREFIX_MICRO
           
static double PREFIX_MILLI
           
static double PREFIX_NANO
           
static double PREFIX_PETA
           
static double PREFIX_PICO
           
static double PREFIX_TERA
           
static double PREFIX_YOCTO
           
static double PREFIX_YOTTA
           
static double PREFIX_ZEPTO
           
static double PREFIX_ZETTA
           
static int[] PRIME
           
static double TWO
           
static double ZERO
           
 
Method Summary
static double acosh(double aValue)
           
static double asinh(double aValue)
           
static double atanh(double aValue)
           
static double cosh(double aValue)
           
static int gcd(int aValue1, int aValue2)
          Greatest Common Denominator
static long gcd(long aValue1, long aValue2)
           
static double hypot(double aValue1, double aValue2)
           
static double inv(double aValue)
           
static long pow10int(int anExponent)
           
static double powInt(double aBase, int anExponent)
           
static int randomInteger(int aLimit)
           
static int randomInteger(int aLower, int aHigher)
           
static double sinh(double aValue)
           
static double tanh(double aValue)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HALF

public static final double HALF

MACHINE_DOUBLE_ERROR

public static final double MACHINE_DOUBLE_ERROR

MACHINE_FLOAT_ERROR

public static final float MACHINE_FLOAT_ERROR

ONE

public static final double ONE

PREFIX_ATTO

public static final double PREFIX_ATTO

PREFIX_CENTI

public static final double PREFIX_CENTI

PREFIX_DECI

public static final double PREFIX_DECI

PREFIX_DEKA

public static final double PREFIX_DEKA

PREFIX_EXA

public static final double PREFIX_EXA

PREFIX_FEMTO

public static final double PREFIX_FEMTO

PREFIX_GIGA

public static final double PREFIX_GIGA

PREFIX_HECTO

public static final double PREFIX_HECTO

PREFIX_KILO

public static final double PREFIX_KILO

PREFIX_MEGA

public static final double PREFIX_MEGA

PREFIX_MICRO

public static final double PREFIX_MICRO

PREFIX_MILLI

public static final double PREFIX_MILLI

PREFIX_NANO

public static final double PREFIX_NANO

PREFIX_PETA

public static final double PREFIX_PETA

PREFIX_PICO

public static final double PREFIX_PICO

PREFIX_TERA

public static final double PREFIX_TERA

PREFIX_YOCTO

public static final double PREFIX_YOCTO

PREFIX_YOTTA

public static final double PREFIX_YOTTA

PREFIX_ZEPTO

public static final double PREFIX_ZEPTO

PREFIX_ZETTA

public static final double PREFIX_ZETTA

PRIME

public static final int[] PRIME

TWO

public static final double TWO

ZERO

public static final double ZERO
Method Detail

acosh

public static double acosh(double aValue)

asinh

public static double asinh(double aValue)

atanh

public static double atanh(double aValue)

cosh

public static double cosh(double aValue)

gcd

public static int gcd(int aValue1,
                      int aValue2)
Greatest Common Denominator


gcd

public static long gcd(long aValue1,
                       long aValue2)
See Also:
org.ojalgo.utility.PrimitiveUtils.gcd(int,int)

hypot

public static double hypot(double aValue1,
                           double aValue2)

inv

public static double inv(double aValue)

pow10int

public static long pow10int(int anExponent)

powInt

public static double powInt(double aBase,
                            int anExponent)

randomInteger

public static int randomInteger(int aLimit)
Parameters:
aLimit -
Returns:
An integer: 0 <= ? < aLimit

randomInteger

public static int randomInteger(int aLower,
                                int aHigher)
Parameters:
aLower -
aHigher -
Returns:
An integer: aLower <= ? < aHigher

sinh

public static double sinh(double aValue)

tanh

public static double tanh(double aValue)