vectorTest.hh

Go to the documentation of this file.
1 
7 #ifndef vectorTest_hh
8 #define vectorTest_hh
9 
10 #include "basics/testcase.hh"
11 #include "space/space.hh"
12 
13 namespace concepts {
14  template<typename F>
15  class Vector;
16 }
17 
18 using concepts::Real;
19 using concepts::Cmplx;
20 
21 namespace test {
22 
27  class VectorTest : public TestCase {
28  public:
29  VectorTest() : spc(10) {}
30  virtual ~VectorTest() {}
31  virtual void run();
32 
34 
35  void testl1norm(const concepts::Vector<Real>& v);
51  const concepts::Vector<Real>& w);
53  void testResize();
55  private:
57  };
58 
59 } // namespace test
60 
61 #endif // vectorTest_hh
void testl2normC(const concepts::Vector< Cmplx > &v)
Tests l1 norm.
Base class for tests.
Definition: testcase.hh:92
virtual void run()
Runs the tests. Must be overwritten by the specialization.
void testl2norm(const concepts::Vector< Real > &v)
Tests l2 norm.
void testreadwriteC(const concepts::Vector< Cmplx > &v)
Tests l1 norm.
void testmax(const concepts::Vector< Real > &v)
Tests linfty norm.
Unit tests.
Definition: testcase.hh:66
void testconversion(const concepts::Vector< Real > &v, const concepts::Vector< Real > &w)
Test conversion: 2 real vectors --> 1 complex vector.
void testreadwrite(const concepts::Vector< Real > &v)
Tests read and write operations (with files)
void testsplit(const concepts::Vector< Cmplx > &v)
Test splitting of complex vector into real vectors.
concepts::DummySpace< Real > spc
Tests l1 norm.
Definition: vectorTest.hh:56
std::complex< Real > Cmplx
Type for a complex number. It also depends on the setting of Real.
Definition: typedefs.hh:39
void testResize()
Test resizing the vector.
void testl1norm(const concepts::Vector< Real > &v)
Tests l1 norm.
Test Vector.
Definition: vectorTest.hh:27
void testl1normC(const concepts::Vector< Cmplx > &v)
Tests l1 norm.
virtual ~VectorTest()
Definition: vectorTest.hh:30
void testmaxC(const concepts::Vector< Cmplx > &v)
Tests l1 norm.
double Real
Type normally used for a floating point number.
Definition: typedefs.hh:36
Basic namespace for Concepts-2.
Definition: pml_formula.h:16
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich