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 auto& labels() {
  static const std::array reserved{antisymm_label(), symm_label(),
                                   transposition_label(), kronecker_label(),
                                   overlap_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