-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmatrix_branch.h
39 lines (31 loc) · 978 Bytes
/
matrix_branch.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
#ifndef MATRIXBRANCH_H
#define MATRIXBRANCH_H
#include <boost/numeric/ublas/matrix.hpp>
#include <boost/numeric/ublas/vector.hpp>
#include <memory>
class MatrixBranch
{
public:
MatrixBranch();
MatrixBranch(const boost::numeric::ublas::matrix<double>& matrix_,
const boost::numeric::ublas::vector<double>& shift_,
MatrixBranch* parent_);
//static std::forward_list<std::unique_ptr<MatrixBranch> > stock;
void transform(boost::numeric::ublas::vector<double>& vec) const;
double get_volume() const;
private:
boost::numeric::ublas::matrix<double> my_matrix;
boost::numeric::ublas::vector<double> shift;
MatrixBranch* parent;
double volume;
private:
friend class boost::serialization::access;
template<class Archive>
void serialize(Archive& ar, const unsigned int version) {
ar & my_matrix;
ar & shift;
ar & parent;
ar & volume;
}
};
#endif // MATRIXBRANCH_H