Orthogonal Array Library  1.0.0
Libray for generating orthogonal arrays based on Art Owen's oa library
OATestClass.h
Go to the documentation of this file.
1 
21 #ifndef OATESTCLASS_H
22 #define OATESTCLASS_H
23 
24 #include "OACommonDefines.h"
25 #include "matrix.h"
26 #include "TestClass.h"
27 #include "simpleAssert.h"
28 
29 #ifdef _OPENMP
30 #include <omp.h>
31 #define NUM_THREADS_USED 3
32 #define PARALLEL_CHUNK_SIZE 1
33 #else
34 
35 #define NUM_THREADS_USED 1
36 
37 #define PARALLEL_CHUNK_SIZE 1
38 #endif
39 
44 #define CREATE_TEST_OA(x) \
45  tests.push_back(std::unique_ptr<oaTest::OATestClass>(dynamic_cast<oaTest::OATestClass*>(new x())));
46 
50 namespace oaTest
51 {
55  class OATestClass : public bclib::TestClass
56  {
57  public:
61  virtual void Run(){};
65  virtual ~OATestClass() {};
71  bool isDotProductConstant(bclib::matrix<int> A);
78  void standardChecks(bclib::matrix<int> A, int expectedq, int expectedCols);
79  };
80 
86  inline
87  int multiplyByTwo(int a)
88  {
89  return a*2;
90  }
91 
97  inline
98  int powerOfTwo(int a)
99  {
100  return static_cast<int>(std::pow<int>(2,a));
101  }
102 }
103 
104 #endif
oaTest
Orthogonal Array Test.
Definition: COrthogonalArrayTest.cpp:23
oaTest::OATestClass::~OATestClass
virtual ~OATestClass()
Destructor.
Definition: OATestClass.h:65
oaTest::multiplyByTwo
int multiplyByTwo(int a)
a function to multiply by two for use in a standard template as a function
Definition: OATestClass.h:87
oaTest::OATestClass::Run
virtual void Run()
Run a test suite for a test class derived from this class.
Definition: OATestClass.h:61
OACommonDefines.h
oaTest::OATestClass::isDotProductConstant
bool isDotProductConstant(bclib::matrix< int > A)
Is the dot product of the columns of an orthogonal array a constant value?
Definition: OATestClass.cpp:24
oaTest::OATestClass::standardChecks
void standardChecks(bclib::matrix< int > A, int expectedq, int expectedCols)
A set of standard tests to apply to an orthogonal array.
Definition: OATestClass.cpp:54
oaTest::OATestClass
An abstract test class.
Definition: OATestClass.h:56
oaTest::powerOfTwo
int powerOfTwo(int a)
A function to take 2 to the power of a number.
Definition: OATestClass.h:98