15 gmat(g), gmato(go), pmat(p), pmato(po), a0(_a0) {}
18 void set_bound(
double,
double) {}
20 inline void cont1(
int ij,
int kl,
double val) {
21 gmat[ij] += val*pmat[kl];
22 gmat[kl] += val*pmat[ij];
25 inline void cont2(
int ij,
int kl,
double val) {
27 gmat[ij] -= val*pmat[kl];
28 gmat[kl] -= val*pmat[ij];
30 gmato[ij] += val*pmato[kl];
31 gmato[kl] += val*pmato[ij];
34 inline void cont3(
int ij,
int kl,
double val) {
36 gmat[ij] -= val*pmat[kl];
37 gmat[kl] -= val*pmat[ij];
39 gmato[ij] += val*pmato[kl];
40 gmato[kl] += val*pmato[ij];
43 inline void cont4(
int ij,
int kl,
double val) {
44 gmat[ij] += (1.0 - 0.25*a0)*val*pmat[kl];
45 gmat[kl] += (1.0 - 0.25*a0)*val*pmat[ij];
47 gmato[ij] += a0*0.25*val*pmato[kl];
48 gmato[kl] += a0*0.25*val*pmato[ij];
51 inline void cont5(
int ij,
int kl,
double val) {
52 gmat[ij] += (1.0 - 0.5*a0)*val*pmat[kl];
53 gmat[kl] += (1.0 - 0.5*a0)*val*pmat[ij];
55 gmato[ij] += 0.5*a0*val*pmato[kl];
56 gmato[kl] += 0.5*a0*val*pmato[ij];
71 double _a0) : pmat(p), pmato(po), a0(_a0) {
77 void set_bound(
double,
double) {}
79 inline void cont1(
int ij,
int kl,
double val) {
80 ec += val*pmat[ij]*pmat[kl];
83 inline void cont2(
int ij,
int kl,
double val) {
84 ex -= a0*0.25*val*(pmat[ij]*pmat[kl] + pmato[ij]*pmato[kl]);
87 inline void cont3(
int ij,
int kl,
double val) {
88 ex -= a0*0.5*val*(pmat[ij]*pmat[kl] + pmato[ij]*pmato[kl]);
91 inline void cont4(
int ij,
int kl,
double val) {
92 ec += val*pmat[ij]*pmat[kl];
93 ex -= a0*0.25*val*(pmat[ij]*pmat[kl] + pmato[ij]*pmato[kl]);
96 inline void cont5(
int ij,
int kl,
double val) {
97 ec += val*pmat[ij]*pmat[kl];
98 ex -= a0*0.5*val*(pmat[ij]*pmat[kl] + pmato[ij]*pmato[kl]);