Program Listing for File reserved.hpp

↰ Return to documentation for file (SeQuant/core/reserved.hpp)

//
// Created by Ajay Melekamburath on 12/24/25.
//

#ifndef SEQUANT_CORE_RESERVED_HPP
#define SEQUANT_CORE_RESERVED_HPP

#include <range/v3/algorithm/contains.hpp>

#include <array>
#include <string>

namespace sequant {

namespace reserved {
inline const std::wstring& antisymm_label() {
  static const std::wstring label = L"Â";
  return label;
}

inline const std::wstring& symm_label() {
  static const std::wstring label = L"Ŝ";
  return label;
}

inline const std::wstring& transposition_label() {
  static const std::wstring label = L"P̂";
  return label;
}

inline const std::wstring& overlap_label() {
  static const std::wstring label = L"s";
  return label;
}

inline const std::wstring& kronecker_label() {
  static const std::wstring label = L"δ";
  return label;
}

inline const std::wstring& rdm_label() {
  static const std::wstring label = L"γ";
  return label;
}

inline const std::wstring& hole_rdm_label() {
  static const std::wstring label = L"η";
  return label;
}

inline const std::wstring& cumulant_label() {
  static const std::wstring label = L"κ";
  return label;
}

inline const std::wstring& spinfree_rdm_label() {
  static const std::wstring label = L"Γ";
  return label;
}

inline const auto& density_labels() {
  static const std::array reserved{rdm_label(), hole_rdm_label(),
                                   cumulant_label(), spinfree_rdm_label()};
  return reserved;
}

inline const auto& labels() {
  static const std::array reserved{
      antisymm_label(),  symm_label(),     transposition_label(),
      kronecker_label(), overlap_label(),  rdm_label(),
      hole_rdm_label(),  cumulant_label(), spinfree_rdm_label()};
  return reserved;
}

inline bool is_nonreserved(const std::wstring& label) {
  return !ranges::contains(labels(), label);
}

}  // namespace reserved

}  // namespace sequant

#endif  // SEQUANT_CORE_RESERVED_HPP