Tapkee
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
projection.hpp
Go to the documentation of this file.
1 /* This software is distributed under BSD 3-clause license (see LICENSE file).
2  *
3  * Copyright (c) 2012-2013 Sergey Lisitsyn, Fernando Iglesias
4  */
5 
6 #ifndef TAPKEE_PROJECTION_H_
7 #define TAPKEE_PROJECTION_H_
8 
9 namespace tapkee
10 {
11 
14 {
16  {
17  }
21  virtual DenseVector project(const DenseVector& vec) = 0;
22 };
23 
26 {
30  void clear()
31  {
32  delete implementation;
33  }
37  inline DenseVector operator()(const DenseVector& vec)
38  {
39  return implementation->project(vec);
40  }
42 };
43 
47 {
49  {
50  }
51 
53  {
54  }
55 
56  virtual DenseVector project(const DenseVector& vec)
57  {
58  return proj_mat*(vec-mean_vec);
59  }
60 
63 };
64 
65 }
66 #endif