94 : s_det(0), s_dxzero(0) {
95 mfunname(
"Parabol::Parabol(double x[3], double y[3])");
96
97 check_econd12a(x1, ==, x2,
"x3=" << x3 <<
" y1=" << y1 <<
" y2=" << y2
98 << " y3=" << y3 << '\n',
100 check_econd12a(x1, ==, x3,
"x2=" << x2 <<
" y1=" << y1 <<
" y2=" << y2
101 << " y3=" << y3 << '\n',
103 check_econd12a(x2, ==, x3,
"x1=" << x1 <<
" y1=" << y1 <<
" y2=" << y2
104 << " y3=" << y3 << '\n',
109 f[0] = y1;
110 mat.ac(0, 2) = 1.0;
111 mat.ac(0, 1) = x1;
112 mat.ac(0, 0) = x1 * x1;
113 f[1] = y2;
114 mat.ac(1, 2) = 1.0;
115 mat.ac(1, 1) = x2;
116 mat.ac(1, 0) = x2 * x2;
117 f[2] = y3;
118 mat.ac(2, 2) = 1.0;
119 mat.ac(2, 1) = x3;
120 mat.ac(2, 0) = x3 * x3;
121
122 int ierr;
123 int szero;
126
127 if (ierr == 0) {
128 par = mat_inv * f;
129
130
131
132
133
134 da = par[0];
135 db = par[1];
136 dc = par[2];
137 } else {
138 da = 0.0;
140 s_var[0] = 0;
141 s_var[1] = 1;
142 s_var[2] = 1;
144
145
147 if (ierr != 0) {
148
149
150 mat.ac(1, 1) = mat.ac(0, 1);
151 mat.ac(1, 2) = mat.ac(0, 2);
152 f[1] = f[0];
153 s_var[0] = 0;
154 s_var[1] = 1;
155 s_var[2] = 1;
158 "should never happen\nmat=" << mat << "\ns_var=" << s_var
159 << "\nmat_inv=" << mat_inv,
161 }
162 par = mat_inv * f;
163 db = par[1];
164 dc = par[2];
165 }
166
167}