public final class Tools extends Object
| Constructor and Description |
|---|
Tools() |
| Modifier and Type | Method and Description |
|---|---|
static void |
debugBreak(Object o) |
static boolean |
epsilonEquals(double a,
double b)
Tests if two double values are approximately equal
|
static boolean |
epsilonEquals(double a,
double b,
double tolerance)
Tests if two double values are approximately equal,
up to a given tolerance
|
static double[] |
getElements(INDArray a) |
static int |
hashCode(double d)
Hashcode for a double primitive
|
static int |
hashCode(int value)
Hashcode for an int, defined as the value of the int itself for consistency with java.lang.Integer
|
static int |
hashCode(long l)
Hashcode for a long primitive
|
static boolean |
isBoolean(double d) |
static double |
toDouble(Double d)
Convenience overload to convert a Double to a primitive double
|
static double |
toDouble(Number d)
Convenience overload to convert a Number to a primitive double
|
static double |
toDouble(Object object)
Converts an numerical object to a primitive double
Handles numbers and scalars
|
static int |
toInt(double d)
Convenience overload to convert a Double to a primitive double
|
static int |
toInt(int d)
Convenience overload to convert an int to a primitive int
|
static int |
toInt(long d) |
static int |
toInt(Number d)
Convenience overload to convert a Number to a primitive int
|
static int |
toInt(Object object)
Converts an numerical object to a primitive double
Handles numbers and scalars
|
static <E> List<E> |
toList(Iterable<E> iter) |
public static void debugBreak(Object o)
public static int hashCode(int value)
value - public static int hashCode(double d)
d - public static int hashCode(long l)
l - public static int toInt(Object object)
public static int toInt(long d)
public static int toInt(double d)
public static int toInt(int d)
public static int toInt(Number d)
public static double toDouble(Object object)
public static double toDouble(Double d)
public static double toDouble(Number d)
public static boolean epsilonEquals(double a,
double b)
a - b - public static boolean epsilonEquals(double a,
double b,
double tolerance)
public static boolean isBoolean(double d)
public static double[] getElements(INDArray a)
Copyright © 2013. All Rights Reserved.