12namespace isce3 {
namespace core {
14template<
int N,
typename T>
15class DenseMatrix :
public Eigen::Matrix<T, N, N> {
16 using super_t = Eigen::Matrix<T, N, N>;
17 using super_t::super_t;
22 DenseMatrix() =
default;
23 CUDA_HOSTDEV
auto operator[](
int i) {
return this->row(i); }
24 CUDA_HOSTDEV
auto operator[](
int i)
const {
return this->row(i); }
26 CUDA_HOSTDEV
auto dot(
const DenseMatrix& other)
const
37#if !EIGEN_VERSION_AT_LEAST(3, 4, 0)
38 CUDA_HOSTDEV
explicit constexpr DenseMatrix(
39 std::initializer_list<std::initializer_list<T>> lst) {
41 for (
const auto& l : lst) {
42 for (
const auto& v : l) {
51 CUDA_HOSTDEV
constexpr DenseMatrix<N, T>
transpose()
const {
52 DenseMatrix<N, T> out;
53 for (
int i = 0; i < N; i++)
54 for (
int j = 0; j < N; j++)
55 out[i][j] = (*
this)[j][i];
63 CUDA_HOSTDEV
static Mat3
xyzToEnu(
double lat,
double lon);
69 CUDA_HOSTDEV
static Mat3
enuToXyz(
double lat,
double lon);
72template<
int N,
typename T>
76 return Mat3 {{{ -sin(lon), cos(lon), 0.},
77 {-sin(lat)*cos(lon), -sin(lat)*sin(lon), cos(lat)},
78 { cos(lat)*cos(lon), cos(lat)*sin(lon), sin(lat)}}};
81template<
int N,
typename T>
86 return Mat3 {{{-sin(lon), -sin(lat) * cos(lon), cos(lat) * cos(lon)},
87 {cos(lon), -sin(lat) * sin(lon), cos(lat) * sin(lon)},
88 {0, cos(lat), sin(lat)}}};
96template<
int N,
typename T>
97CUDA_HOSTDEV
auto operator*(
101 for (
int i = 0; i < N; ++i) {
102 for (
int j = 0; j < N; ++j) {
103 out(i, j) = a.row(i).dot(b.col(j));
109template<
int N,
typename T>
113 for (
int i = 0; i < N; ++i) {
114 out[i] = m.row(i).dot(v);
Definition DenseMatrix.h:15
CUDA_HOSTDEV constexpr DenseMatrix< N, T > transpose() const
Matrix transposition.
Definition DenseMatrix.h:51
static CUDA_HOSTDEV Mat3 enuToXyz(double lat, double lon)
Compute ENU basis inverse transformation matrix.
Definition DenseMatrix.h:82
static CUDA_HOSTDEV Mat3 xyzToEnu(double lat, double lon)
Compute ENU basis transformation matrix.
Definition DenseMatrix.h:73
base interpolator is an abstract base class
Definition BinarySearchFunc.cpp:5