15 #ifndef QMCPLUSPLUS_CI_CONFIGURATION2_H 16 #define QMCPLUSPLUS_CI_CONFIGURATION2_H 40 throw std::runtime_error(
"ci_configuration2::operator==() - ci_configuration2s are not compatible.");
42 for (
int i = 0; i <
occup.size(); i++)
55 throw std::runtime_error(
"ci_configuration2::operator==() - ci_configuration2s are not compatible.");
58 for (
size_t i = 0; i <
occup.size(); i++)
76 std::vector<size_t>& pos,
77 std::vector<size_t>& ocp,
78 std::vector<size_t>& uno)
const 81 throw std::runtime_error(
"ci_configuration2::operator==() - ci_configuration2s are not compatible.");
84 for (
size_t i = 0; i <
occup.size(); i++)
95 for (
size_t i = 0; i < c.
occup.size(); i++)
97 uno[cnt++] = c.
occup[i];
100 throw std::runtime_error(
" Error #1 in ci_configuration2::calculateExcitations() \n");
108 for (
size_t i = 0; i <
n; i++)
109 ref0[pos[i]] = uno[i];
111 for (
size_t i = 0; i < ref0.size(); i++)
112 for (
size_t k = i + 1; k < ref0.size(); k++)
113 if (ref0[i] > ref0[k])
120 else if (ref0[i] == ref0[k])
121 throw std::runtime_error(
" Error #2 in ci_configuration2::calculateExcitations() \n");
129 out <<
"ci ci_configuration2: ";
130 for (
size_t i = 0; i < c.
occup.size(); i++)
131 out << c.
occup[i] <<
" ";
std::vector< size_t > occup
helper functions for EinsplineSetBuilder
ci_configuration2(const ci_configuration2 &c)
size_t calculateNumOfExcitations(const ci_configuration2 &c) const
bool operator==(const ci_configuration2 &c) const
std::ostream & operator<<(std::ostream &out, const AntiSymTensor< T, D > &rhs)
ci_configuration2(std::vector< size_t > &v)
double calculateExcitations(const ci_configuration2 &c, size_t &n, std::vector< size_t > &pos, std::vector< size_t > &ocp, std::vector< size_t > &uno) const