11 gmat(g), gmato(go), pmat(p), pmato(po) {}
14 void set_bound(
double,
double) {};
16 inline void cont1(
int ij,
int kl,
double val) {
17 gmat[ij] += val*pmat[kl];
18 gmat[kl] += val*pmat[ij];
21 inline void cont2(
int ij,
int kl,
double val) {
23 gmat[ij] -= val*pmat[kl];
24 gmat[kl] -= val*pmat[ij];
26 gmato[ij] += val*pmato[kl];
27 gmato[kl] += val*pmato[ij];
30 inline void cont3(
int ij,
int kl,
double val) {
32 gmat[ij] -= val*pmat[kl];
33 gmat[kl] -= val*pmat[ij];
35 gmato[ij] += val*pmato[kl];
36 gmato[kl] += val*pmato[ij];
39 inline void cont4(
int ij,
int kl,
double val) {
40 gmat[ij] += 0.75*val*pmat[kl];
41 gmat[kl] += 0.75*val*pmat[ij];
43 gmato[ij] += 0.25*val*pmato[kl];
44 gmato[kl] += 0.25*val*pmato[ij];
47 inline void cont5(
int ij,
int kl,
double val) {
49 gmat[ij] += val*pmat[kl];
50 gmat[kl] += val*pmat[ij];
52 gmato[ij] += val*pmato[kl];
53 gmato[kl] += val*pmato[ij];
66 void set_bound(
double,
double) {};
74 inline void cont1(
int ij,
int kl,
double val) {
75 ec += val*pmat[ij]*pmat[kl];
78 inline void cont2(
int ij,
int kl,
double val) {
79 ex -= 0.25*val*(pmat[ij]*pmat[kl] + pmato[ij]*pmato[kl]);
82 inline void cont3(
int ij,
int kl,
double val) {
83 ex -= 0.5*val*(pmat[ij]*pmat[kl] + pmato[ij]*pmato[kl]);
86 inline void cont4(
int ij,
int kl,
double val) {
87 ec += val*pmat[ij]*pmat[kl];
88 ex -= 0.25*val*(pmat[ij]*pmat[kl] + pmato[ij]*pmato[kl]);
91 inline void cont5(
int ij,
int kl,
double val) {
92 ec += val*pmat[ij]*pmat[kl];
93 ex -= 0.5*val*(pmat[ij]*pmat[kl] + pmato[ij]*pmato[kl]);
105 inline double cont1(
int ij,
int kl) {
106 return pmat[ij]*pmat[kl] +
107 0.5*(pmato[ij]*pmat[kl] + pmat[ij]*pmato[kl]) +
108 0.25*pmato[ij]*pmato[kl];
111 inline double cont2(
int ij,
int kl) {
112 return pmat[ij]*pmat[kl] +
113 0.5*(pmato[ij]*pmat[kl] + pmat[ij]*pmato[kl] + pmato[ij]*pmato[kl]);