public class RegressionTesting extends Object
| Modifier and Type | Method and Description |
|---|---|
static boolean |
closeEnough(double[] expected,
double[] actual,
double tolerance) |
static boolean |
closeEnough(cern.colt.list.DoubleArrayList expected,
cern.colt.list.DoubleArrayList actual,
double tolerance)
Test whether two DoubleArrayLists are 'close enough' to call equal.
|
static boolean |
closeEnough(DoubleMatrix<?,?> expected,
DoubleMatrix<?,?> actual,
double tolerance)
Test whether two AbstractNamedDoubleMatrix are 'close enough' to call equal.
|
static boolean |
closeEnough(cern.colt.matrix.DoubleMatrix1D expected,
cern.colt.matrix.DoubleMatrix1D actual,
double tolerance) |
static boolean |
closeEnough(cern.colt.matrix.DoubleMatrix2D a,
cern.colt.matrix.DoubleMatrix2D b,
double tolerance) |
static boolean |
closeEnough(Object[] a,
Object[] b)
Test whether two object arrays are the same.
|
static boolean |
containsSame(Collection<? extends Object> a,
Collection<? extends Object> b)
Test whether two collections contain the same items.
|
static boolean |
containsSame(double[] a,
double[] b)
Test whether two double arrays contain the same items in any order (tolerance is ZERO)
|
static boolean |
containsSame(Object[] a,
Object[] b)
Test whether two object arrays contain the same items in any order.
|
static String |
readTestResult(File file) |
static String |
readTestResult(InputStream istream) |
static String |
readTestResult(String resourceName) |
static String |
readTestResultFromFile(String fileName) |
static boolean |
sameArray(int[] a,
int[] b)
Test whether two double arrays contain the same items in the same order
|
static void |
writeTestResult(String result,
String fileName) |
public static boolean closeEnough(double[] expected,
double[] actual,
double tolerance)
expected - actual - tolerance - permitted delta between the valuespublic static boolean closeEnough(cern.colt.list.DoubleArrayList expected,
cern.colt.list.DoubleArrayList actual,
double tolerance)
expected - actual - tolerance - public static boolean closeEnough(DoubleMatrix<?,?> expected, DoubleMatrix<?,?> actual, double tolerance)
expected - actual - tolerance - public static boolean closeEnough(cern.colt.matrix.DoubleMatrix1D expected,
cern.colt.matrix.DoubleMatrix1D actual,
double tolerance)
expected - actual - tolerance - public static boolean closeEnough(cern.colt.matrix.DoubleMatrix2D a,
cern.colt.matrix.DoubleMatrix2D b,
double tolerance)
public static boolean closeEnough(Object[] a, Object[] b)
a - b - public static boolean containsSame(Collection<? extends Object> a, Collection<? extends Object> b)
a - b - public static boolean containsSame(double[] a,
double[] b)
a - b - public static boolean containsSame(Object[] a, Object[] b)
a - b - public static String readTestResult(File file) throws IOException
file - IOExceptionpublic static String readTestResult(InputStream istream) throws IOException
istream - IOExceptionpublic static String readTestResult(String resourceName) throws IOException
resourceName - IOExceptionpublic static String readTestResultFromFile(String fileName) throws IOException
fileName - - the full path of the file to be read.IOExceptionpublic static boolean sameArray(int[] a,
int[] b)
a - b - public static void writeTestResult(String result, String fileName) throws IOException
IOExceptionCopyright © 2003–2023 UBC Michael Smith Laboratories. All rights reserved.