Xped
Loading...
Searching...
No Matches
SpinIndex.hpp
Go to the documentation of this file.
1#ifndef XPED_SPININDEX_HPP_
2#define XPED_SPININDEX_HPP_
3
4#include <boost/describe.hpp>
5
6namespace Xped {
7BOOST_DEFINE_ENUM_CLASS(SPIN_INDEX, UP, DN, NOSPIN, UPDN)
8
9inline std::ostream& operator<<(std::ostream& s, SPIN_INDEX sigma)
10{
11 if(sigma == SPIN_INDEX::UP) {
12 s << "↑";
13 } else if(sigma == SPIN_INDEX::DN) {
14 s << "↓";
15 } else if(sigma == SPIN_INDEX::NOSPIN) {
16 s << "↯";
17 } else if(sigma == SPIN_INDEX::UPDN) {
18 s << "⇅";
19 }
20 return s;
21}
22} // namespace Xped
23#endif
Definition: bench.cpp:62