-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProjection.h
49 lines (42 loc) · 1.31 KB
/
Projection.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//
// Created by jgier on 27.06.2024.
//
#ifndef MAPPER_PROJECTION_H
#define MAPPER_PROJECTION_H
#include <memory>
#include "typedefs.h"
namespace MapperLib{
/**
* @class Projection
* @brief Abstract base class for projection methods
*/
class Projection {
public:
virtual ~Projection() = default;
[[nodiscard]] virtual Matrix project(Matrix const& data) const = 0;
};
/**
* @class CoordinatePlaneProjection
* @brief projection of data to coordinate planes
*
* This implements a very basic projection algorithm. The data is projected to a chosen coordinate hyperplane
*/
class CoordinatePlaneProjection final : public Projection{
public:
/**
* Initialize a projection
* @param dimensions the axis included in the coordinate hyperplane
*/
explicit CoordinatePlaneProjection(std::vector<Dimension> dimensions);
[[nodiscard]] static std::shared_ptr<Projection> make_shared(std::vector<Dimension> dimensions);
/**
* project the data to the coordinate hyperplane defined in the constructor
* @param data the data to project
* @return a Matrix of the dimension of the hyperplane containing all projected points
*/
[[nodiscard]] Matrix project (Matrix const& data) const override;
private:
std::vector<Dimension> _dimensions;
};
} // Mapper
#endif //MAPPER_PROJECTION_H