Macaulay2 Engine
Loading...
Searching...
No Matches

◆ evaluate_slpHxH()

void PathTracker::evaluate_slpHxH ( int n,
const complex * x0t0,
complex * HxH )
inlineprivate

Definition at line 715 of file NAG.hpp.

716 {
717 if (is_projective)
718 {
719 complex* SxS = newarray_atomic(complex, (n + 1) * (n - 1));
720 complex* TxT = newarray_atomic(complex, (n + 1) * (n - 1));
721 const complex *x0 = x0t0, *t0 = x0t0 + n;
722 const double t = (*(double*)t0) * bigT; // t0 should be real
723 slpSxS->evaluate(n, x0, SxS);
724 slpTxT->evaluate(n, x0, TxT);
725 double c = cos(t), s = sin(t),
726 sqrt_one_minus_productST_2 = sqrt(1 - productST * productST);
727 double mS = c - productST * s / sqrt_one_minus_productST_2;
728 double mT = s / sqrt_one_minus_productST_2;
729 int j, i;
730 for (j = 0; j < n - 1; j++)
731 for (i = 0; i <= n; i++)
732 *(HxH + i * n + j) =
733 *(SxS + i * (n - 1) + j) * mS + *(TxT + i * (n - 1) + j) * mT;
734 j = n - 1; // last column
735 for (i = 0; i < n; i++) *(HxH + i * n + j) = (x0 + i)->getconjugate();
736 *(HxH + n * n + n - 1) = complex(0.); // last row and column
737 }
738 else
739 slpHxH->evaluate(n + 1, x0t0, HxH);
740 }
M2_bool is_projective
Definition NAG.hpp:751
StraightLineProgram * slpHxH
Definition NAG.hpp:663
double productST
Definition NAG.hpp:666
StraightLineProgram * slpSxS
Definition NAG.hpp:664
double bigT
Definition NAG.hpp:667
StraightLineProgram * slpTxT
Definition NAG.hpp:665
void size_t s
Definition m2-mem.cpp:271
const mpreal sqrt(const unsigned int v, mp_rnd_t rnd_mode=mpreal::get_default_rnd())
Definition mpreal.h:2244
const mpreal cos(const mpreal &x, mp_rnd_t r=mpreal::get_default_rnd())
Definition mpreal.h:2301
const mpreal sin(const mpreal &x, mp_rnd_t r=mpreal::get_default_rnd())
Definition mpreal.h:2302
#define newarray_atomic(T, len)
Definition newdelete.hpp:91

References bigT, is_projective, newarray_atomic, productST, s, slpHxH, slpSxS, and slpTxT.

Referenced by refine(), and track().