GQCP
Loading...
Searching...
No Matches
CartesianExponents.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
22
23#include <array>
24#include <cstddef>
25#include <string>
26#include <vector>
27
28
29namespace GQCP {
30
31
36public:
37 std::array<size_t, 3> exponents; // array containing the x, y, z exponents (in that order)
38
39
40public:
41 // CONSTRUCTORS
42
46 CartesianExponents(const std::array<size_t, 3>& array);
47
53 CartesianExponents(const size_t x, const size_t y, const size_t z);
54
58 CartesianExponents(const std::vector<size_t>& vector);
59
60
61 // OPERATORS
62
72 bool operator<(const CartesianExponents& rhs) const;
73
79 bool operator==(const CartesianExponents& rhs) const;
80
86 bool operator!=(const CartesianExponents& rhs) const;
87
88
89 // PUBLIC METHODS
90
94 size_t angularMomentum() const;
95
99 std::vector<CartesianExponents> allPermutations() const;
100
104 const std::array<size_t, 3>& asArray() const { return this->exponents; }
105
109 std::string description() const;
110
116 size_t value(const CartesianDirection direction) const { return this->exponents[direction]; }
117};
118
119
120} // namespace GQCP
Definition: BaseOneElectronIntegralBuffer.hpp:25
CartesianDirection
Definition: CartesianDirection.hpp:27
@ z
Definition: CartesianDirection.hpp:30
@ x
Definition: CartesianDirection.hpp:28
@ y
Definition: CartesianDirection.hpp:29
Definition: CartesianExponents.hpp:35
std::vector< CartesianExponents > allPermutations() const
Definition: CartesianExponents.cpp:129
size_t value(const CartesianDirection direction) const
Definition: CartesianExponents.hpp:116
std::array< size_t, 3 > exponents
Definition: CartesianExponents.hpp:37
bool operator<(const CartesianExponents &rhs) const
Definition: CartesianExponents.cpp:67
bool operator==(const CartesianExponents &rhs) const
Definition: CartesianExponents.cpp:94
std::string description() const
Definition: CartesianExponents.cpp:150
bool operator!=(const CartesianExponents &rhs) const
Definition: CartesianExponents.cpp:104
const std::array< size_t, 3 > & asArray() const
Definition: CartesianExponents.hpp:104
size_t angularMomentum() const
Definition: CartesianExponents.cpp:116