13 gmat(g), gmato(go), pmat(p), pmato(po) {}
16 void set_bound(
double,
double) {};
18 inline void cont1(
int ij,
int kl,
double val) {
19 gmat[ij] += val*pmat[kl];
20 gmat[kl] += val*pmat[ij];
23 inline void cont2(
int ij,
int kl,
double val) {
25 gmat[ij] -= val*pmat[kl];
26 gmat[kl] -= val*pmat[ij];
28 gmato[ij] += val*pmato[kl];
29 gmato[kl] += val*pmato[ij];
32 inline void cont3(
int ij,
int kl,
double val) {
34 gmat[ij] -= val*pmat[kl];
35 gmat[kl] -= val*pmat[ij];
37 gmato[ij] += val*pmato[kl];
38 gmato[kl] += val*pmato[ij];
41 inline void cont4(
int ij,
int kl,
double val) {
42 gmat[ij] += 0.75*val*pmat[kl];
43 gmat[kl] += 0.75*val*pmat[ij];
45 gmato[ij] += 0.25*val*pmato[kl];
46 gmato[kl] += 0.25*val*pmato[ij];
49 inline void cont5(
int ij,
int kl,
double val) {
51 gmat[ij] += val*pmat[kl];
52 gmat[kl] += val*pmat[ij];
54 gmato[ij] += val*pmato[kl];
55 gmato[kl] += val*pmato[ij];
68 void set_bound(
double,
double) {};
76 inline void cont1(
int ij,
int kl,
double val) {
77 ec += val*pmat[ij]*pmat[kl];
80 inline void cont2(
int ij,
int kl,
double val) {
81 ex -= 0.25*val*(pmat[ij]*pmat[kl] + pmato[ij]*pmato[kl]);
84 inline void cont3(
int ij,
int kl,
double val) {
85 ex -= 0.5*val*(pmat[ij]*pmat[kl] + pmato[ij]*pmato[kl]);
88 inline void cont4(
int ij,
int kl,
double val) {
89 ec += val*pmat[ij]*pmat[kl];
90 ex -= 0.25*val*(pmat[ij]*pmat[kl] + pmato[ij]*pmato[kl]);
93 inline void cont5(
int ij,
int kl,
double val) {
94 ec += val*pmat[ij]*pmat[kl];
95 ex -= 0.5*val*(pmat[ij]*pmat[kl] + pmato[ij]*pmato[kl]);
101 double *
const pmato;
107 inline double cont1(
int ij,
int kl) {
108 return pmat[ij]*pmat[kl] +
109 0.5*(pmato[ij]*pmat[kl] + pmat[ij]*pmato[kl]) +
110 0.25*pmato[ij]*pmato[kl];
113 inline double cont2(
int ij,
int kl) {
114 return pmat[ij]*pmat[kl] +
115 0.5*(pmato[ij]*pmat[kl] + pmat[ij]*pmato[kl] + pmato[ij]*pmato[kl]);