#include <stdio.h>
#include <memory.h>
#include "Matrix.h"
#include "tools.h"
#include "Poly.h"
Go to the source code of this file.
◆ LAGMAXModified() [1/3]
Definition at line 40 of file MSSolver.cpp.
84 if (
sqr(vd)<0.9999*vv*dd)
86 double a=
dhd*vd-dd*dd,
92 double tmp2=
sqrt(b*b-a*c)/
a, dd1, dd2, dhd1, dhd2;
106 else { D=D2; dd=dd2;
dhd=dhd2; }
122 i=
n;
while (i--) v[
i]=
d[
i]-temp*
g[
i];
141 double theta, cosTheta, sinTheta;
149 theta=0.5*atan(0.5*vhg/(vhv-ghg));
156 d[
i]= cosTheta*g[
i]+ sinTheta*v[
i];
157 v[
i]=-sinTheta*g[
i]+ cosTheta*v[
i];
165 double norm=
rho/D.euclidianNorm();
171 vhv=(ghg*
sqr(sinTheta)+vhv*
sqr(cosTheta)*
sqr(norm));
173 double halfRootTwo=
sqrt(0.5),
174 t1=normG*cosTheta*
rho,
175 t2=normG*sinTheta*
rho,
183 if ((q4>
q3)&&(q4>
q2)&&(q4>
q1))
185 double st1=
sign(t1*t3), st2=
sign(t2*t3);
186 i=
n;
while (i--)
d[
i]=halfRootTwo*(st1*
d[
i]-st2*v[
i]);
192 double st1=
sign(t1*t3), st2=
sign(t2*t3);
193 i=
n;
while (i--)
d[
i]=halfRootTwo*(st1*
d[
i]+st2*v[
i]);
void sqrt(Image< double > &op)
Matrix multiply(Matrix B)
T norm(const std::vector< T > &v)
double scalarProduct(Vector v)
◆ LAGMAXModified() [2/3]
Definition at line 208 of file MSSolver.cpp.
void gradientHessian(Vector P, Vector G, Matrix H)
Vector LAGMAXModified(Vector G, Matrix H, double rho, double &VMAX)
◆ LAGMAXModified() [3/3]
Definition at line 217 of file MSSolver.cpp.
static Vector emptyVector
Vector LAGMAXModified(Vector G, Matrix H, double rho, double &VMAX)