Line data Source code
1 : /*
2 : * File: TestQuadratic.h
3 : * Author: Pantelis Sopasakis
4 : *
5 : * Created on Jul 9, 2015, 4:14:39 AM
6 : *
7 : * ForBES is free software: you can redistribute it and/or modify
8 : * it under the terms of the GNU Lesser General Public License as published by
9 : * the Free Software Foundation, either version 3 of the License, or
10 : * (at your option) any later version.
11 : *
12 : * ForBES is distributed in the hope that it will be useful,
13 : * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 : * GNU Lesser General Public License for more details.
16 : *
17 : * You should have received a copy of the GNU Lesser General Public License
18 : * along with ForBES. If not, see <http://www.gnu.org/licenses/>.
19 : */
20 :
21 : #ifndef TESTQUADRATIC_H
22 : #define TESTQUADRATIC_H
23 :
24 : #include <cppunit/extensions/HelperMacros.h>
25 :
26 : #define FORBES_TEST_UTILS
27 : #include "ForBES.h"
28 : #include <cmath>
29 :
30 : class TestQuadratic : public CPPUNIT_NS::TestFixture {
31 2 : CPPUNIT_TEST_SUITE(TestQuadratic);
32 :
33 1 : CPPUNIT_TEST(testQuadratic);
34 1 : CPPUNIT_TEST(testQuadratic2);
35 1 : CPPUNIT_TEST(testQuadratic3);
36 1 : CPPUNIT_TEST(testCallProx);
37 1 : CPPUNIT_TEST(testCallProx2);
38 1 : CPPUNIT_TEST(testCall);
39 1 : CPPUNIT_TEST(testCall2);
40 1 : CPPUNIT_TEST(testCallWithGradient);
41 1 : CPPUNIT_TEST(testCallConj);
42 1 : CPPUNIT_TEST(testCallConj2);
43 1 : CPPUNIT_TEST(testCallDiagonalMatrix);
44 1 : CPPUNIT_TEST(testCallSparse);
45 1 : CPPUNIT_TEST(testCallSparse2);
46 1 : CPPUNIT_TEST(testCallSparse3);
47 1 : CPPUNIT_TEST(testCallConjSparse);
48 1 : CPPUNIT_TEST(testHessian);
49 1 : CPPUNIT_TEST(testHessianSparse);
50 1 : CPPUNIT_TEST(testApproximateHessian);
51 :
52 5 : CPPUNIT_TEST_SUITE_END();
53 :
54 : public:
55 : TestQuadratic();
56 : virtual ~TestQuadratic();
57 : void setUp();
58 : void tearDown();
59 :
60 : private:
61 : void testQuadratic();
62 : void testQuadratic2();
63 : void testQuadratic3();
64 : void testCallProx();
65 : void testCallProx2();
66 : void testCall();
67 : void testCall2();
68 : void testCallWithGradient();
69 : void testCallConj();
70 : void testCallConj2();
71 :
72 : void testCallSparse();
73 : void testCallSparse2();
74 : void testCallSparse3();
75 : void testCallConjSparse();
76 :
77 : void testCallDiagonalMatrix();
78 :
79 : void testHessian();
80 : void testHessianSparse();
81 : void testApproximateHessian();
82 :
83 : };
84 :
85 : #endif /* TESTQUADRATIC_H */
|