|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjcuda.utils.Compare
public class Compare
Utility functions for comparing arrays.
Some of the functions are ported from the CUTIL
comparison functions.
| Method Summary | |
|---|---|
static boolean |
compare(byte[] reference,
byte[] data)
Returns whether the given arrays are equal |
static boolean |
compare(byte[] reference,
byte[] data,
float epsilon)
Checks if two arrays are equal within the given limits. |
static boolean |
compare(byte[] reference,
byte[] data,
float epsilon,
float threshold)
Checks if two arrays are equal within the given limits. |
static boolean |
compare(float[] reference,
float[] data)
Returns whether the given arrays are equal |
static boolean |
compare(float[] reference,
float[] data,
float epsilon)
Checks if two arrays are equal within the given limits. |
static boolean |
compare(float[] reference,
float[] data,
float epsilon,
float threshold)
Checks if two arrays are equal within the given limits. |
static boolean |
compare(int[] reference,
int[] data)
Returns whether the given arrays are equal |
static boolean |
compare(int[] reference,
int[] data,
float epsilon)
Checks if two arrays are equal within the given limits. |
static boolean |
compare(int[] reference,
int[] data,
float epsilon,
float threshold)
Checks if two arrays are equal within the given limits. |
static boolean |
compareL2(float[] reference,
float[] data,
float epsilon)
Checks if two arrays are equal using the L2 norm. |
static void |
setVerbose(boolean verbose)
Set the flag which indicates whether the output will be verbose and printing information about the differences between the arrays that are compared. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static void setVerbose(boolean verbose)
verbose - Whether the output will be verbose
public static boolean compare(float[] reference,
float[] data)
reference - The reference arraydata - the actual data array
public static boolean compare(int[] reference,
int[] data)
reference - The reference arraydata - the actual data array
public static boolean compare(byte[] reference,
byte[] data)
reference - The reference arraydata - the actual data array
public static boolean compare(byte[] reference,
byte[] data,
float epsilon,
float threshold)
reference - The reference arraydata - the actual data arrayepsilon - The epsilon for the comparisonthreshold - The % of array elements that may be differ by
more than the given epsilon
public static boolean compare(byte[] reference,
byte[] data,
float epsilon)
reference - The reference arraydata - the actual data arrayepsilon - The epsilon for the comparison
public static boolean compare(int[] reference,
int[] data,
float epsilon,
float threshold)
reference - The reference arraydata - the actual data arrayepsilon - The epsilon for the comparison, must be >=0threshold - The % of array elements that may be differ by
more than the given epsilon
public static boolean compare(int[] reference,
int[] data,
float epsilon)
reference - The reference arraydata - the actual data arrayepsilon - The epsilon for the comparison, must be >=0
public static boolean compare(float[] reference,
float[] data,
float epsilon)
reference - The reference arraydata - the actual data arrayepsilon - The epsilon for the comparison
public static boolean compare(float[] reference,
float[] data,
float epsilon,
float threshold)
reference - The reference arraydata - the actual data arrayepsilon - The epsilon for the comparison, must be >=0threshold - The % of array elements that may be differ by
more than the given epsilon
public static boolean compareL2(float[] reference,
float[] data,
float epsilon)
reference - The reference arraydata - the actual data arrayepsilon - The epsilon for the comparison, must be >=0
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||