Skip to content

Commit

Permalink
Root Poly/Eigen :OK
Browse files Browse the repository at this point in the history
  • Loading branch information
deseilligny committed Dec 23, 2024
1 parent 81c6749 commit d9a18a3
Show file tree
Hide file tree
Showing 4 changed files with 158 additions and 161 deletions.
5 changes: 4 additions & 1 deletion MMVII/include/MMVII_nums.h
Original file line number Diff line number Diff line change
Expand Up @@ -993,6 +993,7 @@ template <class Type> class cPolynom
{
public :
typedef std::vector<Type> tCoeffs;
typedef cPtxd<Type,2> tCompl;
cPolynom(const tCoeffs &);
cPolynom(const cPolynom &);
cPolynom(size_t aDegre);
Expand All @@ -1007,10 +1008,12 @@ template <class Type> class cPolynom
static cPolynom<Type> RandomPolyg(std::vector<Type> & aVRoots,int aNbRoot,int aNbNoRoot,Type Interv,Type MinDist);


Type Value(const Type & aVal) const;
Type Value(const Type & aVal) const;
tCompl Value(const tCompl & 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;
Expand Down
8 changes: 6 additions & 2 deletions MMVII/src/Matrix/cEigenEigenDecompos.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,13 @@ void Bench_EigenDecompos(cParamExeBench & aParam)
Tpl_Bench_EigenDecompos<tREAL8>(aParam);
}

#define INSTANTIATE_EIGEN_DECOMP(TYPE)\
template class cResulEigenDecomp<TYPE>;\
template class cDenseMatrix<TYPE>;

template class cResulEigenDecomp<tREAL8>;
template class cDenseMatrix<tREAL8>;
INSTANTIATE_EIGEN_DECOMP(tREAL4);
INSTANTIATE_EIGEN_DECOMP(tREAL8);
INSTANTIATE_EIGEN_DECOMP(tREAL16);


};
11 changes: 11 additions & 0 deletions MMVII/src/Serial/ElemStrToVal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1395,6 +1395,17 @@ std::string FixDigToStr(double aSignedVal,int aNbBef,int aNbAfter)
return aBuf;
}

// ================ double ==============================================

template <> std::string cStrIO<tREAL16>::ToStr(const tREAL16 & aD)
{
return cStrIO<tREAL8>::ToStr((tREAL8) (aD));
}

template <> std::string cStrIO<tREAL4>::ToStr(const tREAL4 & aD)
{
return cStrIO<tREAL8>::ToStr((tREAL8) (aD));
}


// ================ std::string ==============================================
Expand Down
Loading

0 comments on commit d9a18a3

Please sign in to comment.