Skip to content

Commit

Permalink
In supress V1 for root poly, Algo OK
Browse files Browse the repository at this point in the history
  • Loading branch information
deseilligny committed Dec 21, 2024
1 parent 88628cf commit 81c6749
Show file tree
Hide file tree
Showing 4 changed files with 336 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ T poly_eval( const Polynomials& poly, const T& x )
{
T val=poly[0];
T inv_x = T(1)/x;
for( DenseIndex i=1; i<poly.size(); ++i ){
// for( DenseIndex i=1; i<poly.size(); ++i ){ MPD::MMVII
for( DenseIndex i=1; i<DenseIndex(poly.size()); ++i ){
val = val*inv_x + poly[i]; }

return numext::pow(x,(T)(poly.size()-1)) * val;
Expand Down
6 changes: 5 additions & 1 deletion MMVII/include/MMVII_nums.h
Original file line number Diff line number Diff line change
Expand Up @@ -1008,12 +1008,16 @@ template <class Type> class cPolynom


Type Value(const Type & aVal) const;
/// return som(|a_k x^k|) , used for some bounding stuffs
Type AbsValue(const Type & aVal) const;

cPolynom<Type> operator * (const cPolynom<Type> & aP2) const;
cPolynom<Type> operator + (const cPolynom<Type> & aP2) const;
cPolynom<Type> operator - (const cPolynom<Type> & aP2) const;
cPolynom<Type> operator * (const Type & aVal) const;
std::vector<Type> RealRoots(const Type & aTol,int ItMax);
cPolynom<Type> Deriv() const;

std::vector<Type> RealRoots(const Type & aTol,int ItMax) const;


Type& operator [] (size_t aK) {return mVCoeffs[aK];}
Expand Down
10 changes: 0 additions & 10 deletions MMVII/src/MMV1/Numerics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,6 @@ INST_V1ROOTS(tREAL8)
INST_V1ROOTS(tREAL16)


/*
template <class Type> void
RealRootsOfRealPolynome
(
ElSTDNS vector<Type> & Sols,
const ElPolynome<Type> &aPol,
Type tol,
INT ItMax
)
*/


};
Loading

0 comments on commit 81c6749

Please sign in to comment.