GQCP
Loading...
Searching...
No Matches
Array.hpp
Go to the documentation of this file.
1// This file is part of GQCG-GQCP.
2//
3// Copyright (C) 2017-2020 the GQCG developers
4//
5// GQCG-GQCP is free software: you can redistribute it and/or modify
6// it under the terms of the GNU Lesser General Public License as published by
7// the Free Software Foundation, either version 3 of the License, or
8// (at your option) any later version.
9//
10// GQCG-GQCP is distributed in the hope that it will be useful,
11// but WITHOUT ANY WARRANTY; without even the implied warranty of
12// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13// GNU Lesser General Public License for more details.
14//
15// You should have received a copy of the GNU Lesser General Public License
16// along with GQCG-GQCP. If not, see <http://www.gnu.org/licenses/>.
17
18#pragma once
19
20
21#include "Utilities/Eigen.hpp"
22
23
32namespace GQCP {
33
34template <typename _Scalar = double, int _Rows = Dynamic, int _Cols = Dynamic>
35class Array:
36 public Eigen::Array<_Scalar, _Rows, _Cols> {
37
38
39public:
40 using Scalar = _Scalar;
41 static constexpr auto Rows = _Rows;
42 static constexpr auto Cols = _Cols;
43
44
46 using Base = Eigen::Array<Scalar, Rows, Cols>;
47
48
49public:
50 /*
51 * CONSTRUCTORS
52 */
53
54 using Eigen::Array<Scalar, Rows, Cols>::Array; // inhert base constructors
55
56
64 const Base& Eigen() const { return static_cast<const Base&>(*this); }
65
69 Base& Eigen() { return static_cast<Base&>(*this); }
70};
71
72
73/*
74 * Convenience typedefs related to Array.
75 */
76
77template <typename Scalar>
79
80template <typename Scalar>
82
83
84} // namespace GQCP
Definition: Array.hpp:36
Base & Eigen()
Definition: Array.hpp:69
static constexpr auto Cols
Definition: Array.hpp:42
_Scalar Scalar
Definition: Array.hpp:40
static constexpr auto Rows
Definition: Array.hpp:41
const Base & Eigen() const
Definition: Array.hpp:64
Eigen::Array< Scalar, Rows, Cols > Base
Definition: Array.hpp:46
Definition: BaseOneElectronIntegralBuffer.hpp:25