Skip to content

Commit 493bce5

Browse files
committed
.
2 parents 56bba87 + 4843b1f commit 493bce5

3 files changed

Lines changed: 11 additions & 11 deletions

File tree

CImg.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21532,13 +21532,13 @@ namespace cimg_library {
2153221532
_cimg_mp_return_nan();
2153321533
}
2153421534

21535-
if (!std::strncmp(ss,"eig(",4)) { // Matrix eigenvalues/eigenvector
21536-
_cimg_mp_op("Function 'eig()'");
21537-
arg1 = compile(ss4,se1,depth1,0,block_flags);
21535+
if (!std::strncmp(ss,"eigen(",6)) { // Matrix eigenvalues/eigenvector
21536+
_cimg_mp_op("Function 'eigen()'");
21537+
arg1 = compile(ss6,se1,depth1,0,block_flags);
2153821538
_cimg_mp_check_matrix_square(arg1,1);
2153921539
p1 = (unsigned int)cimg::round(std::sqrt((float)size(arg1)));
2154021540
pos = vector((p1 + 1)*p1);
21541-
CImg<ulongT>::vector((ulongT)mp_matrix_eig,pos,arg1,p1).move_to(code);
21541+
CImg<ulongT>::vector((ulongT)mp_matrix_eigen,pos,arg1,p1).move_to(code);
2154221542
return_comp = true;
2154321543
_cimg_mp_return(pos);
2154421544
}
@@ -28751,7 +28751,7 @@ namespace cimg_library {
2875128751
return cimg::type<double>::nan();
2875228752
}
2875328753

28754-
static double mp_matrix_eig(_cimg_math_parser& mp) {
28754+
static double mp_matrix_eigen(_cimg_math_parser& mp) {
2875528755
double *ptrd = &_mp_arg(1) + 1;
2875628756
const double *ptr1 = &_mp_arg(2) + 1;
2875728757
const unsigned int k = (unsigned int)mp.opcode[3];
@@ -33440,7 +33440,7 @@ namespace cimg_library {
3344033440
const CImg<T>& SVD(CImg<t>& U, CImg<t>& S, CImg<t>& V, const bool sorting=true,
3344133441
const unsigned int max_iteration=40, const float lambda=0) const {
3344233442
typedef _cimg_Ttfloat Ttfloat;
33443-
const Ttfloat eps = (Ttfloat)1e-15;
33443+
const Ttfloat eps = (Ttfloat)1e-8f;
3344433444
if (is_empty()) { U.assign(); S.assign(); V.assign(); }
3344533445
else if (_depth!=1 || _spectrum!=1)
3344633446
throw CImgInstanceException(_cimg_instance
@@ -33475,7 +33475,7 @@ namespace cimg_library {
3347533475
U(i,i) = f - g;
3347633476
for (int j = l; j<width(); ++j) {
3347733477
s = 0;
33478-
for (int k=i; k<height(); ++k) s+=U(i,k)*U(j,k);
33478+
for (int k = i; k<height(); ++k) s+=U(i,k)*U(j,k);
3347933479
f = s/h;
3348033480
for (int k = i; k<height(); ++k) U(j,k)+=f*U(i,k);
3348133481
}
@@ -33548,8 +33548,8 @@ namespace cimg_library {
3354833548
bool flag = true;
3354933549
for (l = k; l>=1; --l) {
3355033550
nm = l - 1;
33551-
if ((cimg::abs(rv1[l]) + anorm)==anorm) { flag = false; break; }
33552-
if ((cimg::abs(S[nm]) + anorm)==anorm) break;
33551+
if (l==1 || cimg::abs(rv1[l])<=eps*anorm) { flag = false; break; }
33552+
if (cimg::abs(S[nm])<=eps*anorm) break;
3355333553
}
3355433554
if (flag) {
3355533555
c = 0;

html/header.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<div class="header">
2424
<a href="index.html"><img alt="Logo" src="img/logo_header.jpg" class="center_image" style="margin-top:1em;"/></a>
2525
<h2 style="padding-bottom: 1em">
26-
Latest stable version: <b><a href="http://cimg.eu/files/CImg_.zip">3.5.5</a></b> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Current pre-release: <b><a href="http://cimg.eu/files/CImg_latest.zip">3.6.0</a></b> (2025/07/18)
26+
Latest stable version: <b><a href="http://cimg.eu/files/CImg_.zip">3.5.5</a></b> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Current pre-release: <b><a href="http://cimg.eu/files/CImg_latest.zip">3.6.0</a></b> (2025/07/19)
2727
</h2>
2828

2929
<hr/>

html/header_doxygen.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
<div class="header">
2727
<a href="../index.html"><img alt="Logo" src="../img/logo_header.jpg" class="center_image" style="margin-top:1em;"/></a>
2828
<h2 style="padding-bottom: 1em">
29-
Latest stable version: <b><a href="http://cimg.eu/files/CImg_.zip">3.5.5</a></b> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Current pre-release: <b><a href="http://cimg.eu/files/CImg_latest.zip">3.6.0</a></b> (2025/07/18)
29+
Latest stable version: <b><a href="http://cimg.eu/files/CImg_.zip">3.5.5</a></b> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Current pre-release: <b><a href="http://cimg.eu/files/CImg_latest.zip">3.6.0</a></b> (2025/07/19)
3030
</h2>
3131

3232
<hr/>

0 commit comments

Comments
 (0)