15 gmata(ga), gmatb(gb), pmata(pa), pmatb(pb), a0(a) {}
18 void set_bound(
double,
double) {}
20 inline void cont1(
int ij,
int kl,
double val) {
21 gmata[ij] += val*(pmata[kl]+pmatb[kl]);
22 gmata[kl] += val*(pmata[ij]+pmatb[ij]);
24 gmatb[ij] += val*(pmata[kl]+pmatb[kl]);
25 gmatb[kl] += val*(pmata[ij]+pmatb[ij]);
28 inline void cont2(
int ij,
int kl,
double val) {
30 gmata[ij] -= val*pmata[kl];
31 gmata[kl] -= val*pmata[ij];
33 gmatb[ij] -= val*pmatb[kl];
34 gmatb[kl] -= val*pmatb[ij];
37 inline void cont3(
int ij,
int kl,
double val) {
39 gmata[ij] -= val*pmata[kl];
40 gmata[kl] -= val*pmata[ij];
42 gmatb[ij] -= val*pmatb[kl];
43 gmatb[kl] -= val*pmatb[ij];
46 inline void cont4(
int ij,
int kl,
double val) {
51 inline void cont5(
int ij,
int kl,
double val) {
68 pmata(a), pmatb(b), a0(an) {
74 void set_bound(
double,
double) {}
76 inline void cont1(
int ij,
int kl,
double val) {
77 ec += val*(pmata[ij]+pmatb[ij])*(pmata[kl]+pmatb[kl]);
80 inline void cont2(
int ij,
int kl,
double val) {
81 ex -= a0*0.5*val*(pmata[ij]*pmata[kl]+pmatb[ij]*pmatb[kl]);
84 inline void cont3(
int ij,
int kl,
double val) {
85 ex -= a0*val*(pmata[ij]*pmata[kl]+pmatb[ij]*pmatb[kl]);
88 inline void cont4(
int ij,
int kl,
double val) {
93 inline void cont5(
int ij,
int kl,
double val) {