oILAB
Loading...
Searching...
No Matches
RationalMatrix.h
Go to the documentation of this file.
1/* This file is part of gbLAB.
2 *
3 * gbLAB is distributed without any warranty under the MIT License.
4 */
5
6
7#ifndef gbLAB_RationalMatrix_h_
8#define gbLAB_RationalMatrix_h_
9
10#include <Eigen/Dense>
11namespace oILAB {
12
13template <int dim> class RationalMatrix {
14
15 typedef Eigen::Matrix<double, dim, 1> VectorDimD;
16 typedef Eigen::Matrix<double, dim, dim> MatrixDimD;
17 typedef long long int IntScalarType;
18 typedef Eigen::Matrix<IntScalarType, dim, 1> VectorDimI;
19 typedef Eigen::Matrix<IntScalarType, dim, dim> MatrixDimI;
20
21 // static constexpr int64_t maxDen=10000000;
22 static constexpr long long int maxDen = 1000000;
23 static std::pair<MatrixDimI, IntScalarType> compute(const MatrixDimD &R);
24 static std::pair<MatrixDimI, IntScalarType> reduce(const MatrixDimI &Rn,
25 const MatrixDimI &Rd);
26
27 const std::pair<MatrixDimI, IntScalarType> returnPair;
28
29public:
32
33 RationalMatrix(const MatrixDimD &R);
34 RationalMatrix(const MatrixDimI &Rn, const IntScalarType &Rd);
35 RationalMatrix(const MatrixDimI &Rn, const MatrixDimI &Rd);
36 MatrixDimD asMatrix() const;
37
38 };
39
40 } // namespace oILAB
41#endif
42
43
static constexpr long long int maxDen
static std::pair< MatrixDimI, IntScalarType > compute(const MatrixDimD &R)
Eigen::Matrix< IntScalarType, dim, dim > MatrixDimI
static std::pair< MatrixDimI, IntScalarType > reduce(const MatrixDimI &Rn, const MatrixDimI &Rd)
const MatrixDimI & integerMatrix
const IntScalarType & mu
Eigen::Matrix< IntScalarType, dim, 1 > VectorDimI
Eigen::Matrix< double, dim, 1 > VectorDimD
Eigen::Matrix< double, dim, dim > MatrixDimD
MatrixDimD asMatrix() const
const std::pair< MatrixDimI, IntScalarType > returnPair
long long int IntScalarType