1#ifndef PERMUTATION_DEFINED
2#define PERMUTATION_DEFINED
5#include <initializer_list>
12 Map(std::initializer_list<int> images_) {
13 std::copy(images_.begin(), images_.end(),
images);
23 for (
int i(0); i < N; ++i)
34 for (
int i(0); i < N - 1; ++i) stream << f(i) <<
",";
35 stream << f(N - 1) <<
")";
43Permutation<N>
operator*(
const Permutation<N> &,
const Permutation<N> &);
45Permutation<N>
operator/(
const Permutation<N> &,
const Permutation<N> &);
47Permutation<N>
operator/(
const int,
const Permutation<N> &);
55 for (i = 0; i < p % N; ++i) {
56 this->
images[i] = subPermutation.images[i] + 1;
59 for (++i; i < N; ++i) {
60 this->
images[i] = subPermutation.images[i - 1] + 1;
66 for (
int i(0); i < N; ++i) count += this->
images[i] == i;
83 static constexpr int64_t
ORDER = 1;
91 for (
int i(0); i < N; ++i) pi(i) = sigma(tau(i));
99 for (
int i(0); i < N; ++i) g(i) = f(tau(i));
107 for (
int i(0); i < N; ++i) tauInverse(tau(i)) = i;
116 for (
int i(0); i < N; ++i) pi(tau(i)) = sigma(i);
std::ostream & operator<<(std::ostream &s, const FcidumpReader::FcidumpHeader &h)
Definition FcidumpWriter.cxx:25
Definition Permutation.hpp:9
Map(std::initializer_list< int > images_)
Definition Permutation.hpp:12
bool operator==(const Map &m) const
Definition Permutation.hpp:22
int images[N]
Definition Permutation.hpp:28
Map(const Map &p)
Definition Permutation.hpp:15
int operator()(int i) const
Definition Permutation.hpp:19
int & operator()(int i)
Definition Permutation.hpp:20
Map()
Definition Permutation.hpp:11
Permutation(const int64_t p)
Definition Permutation.hpp:82
Definition Permutation.hpp:50
int invariantElementsCount() const
Definition Permutation.hpp:64
static constexpr int64_t ORDER
Definition Permutation.hpp:70
Permutation(const int64_t p)
Definition Permutation.hpp:52
Definition Algorithm.hpp:10
Permutation< N > operator/(const Permutation< N > &, const Permutation< N > &)
Definition Permutation.hpp:113
std::string operator*(const std::string &s, const sisi4s::Permutation< N > &pi)
Definition CcsdPerturbativeTriples.cxx:24