Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
dtschump committed Jan 6, 2025
2 parents a929e7b + 6227661 commit 371e3ba
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
19 changes: 17 additions & 2 deletions CImg.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@

// Set version number of the library.
#ifndef cimg_version
#define cimg_version 350
#define cimg_version 351

/*-----------------------------------------------------------
#
Expand Down Expand Up @@ -21296,6 +21296,17 @@ namespace cimg_library {
_cimg_mp_return(pos);
}

if (!std::strncmp(ss,"isfinite(",9)) { // Is finite?
_cimg_mp_op("Function 'isfinite()'");
s0 = ss + 9;
if (s0==se1) _cimg_mp_return(0);
arg1 = compile(s0,se1,depth1,0,block_flags);
if (is_vector(arg1)) _cimg_mp_vector1_v(mp_isfinite,arg1);
if (is_const_scalar(arg1))
_cimg_mp_return((unsigned int)cimg::type<double>::is_finite(mem[arg1]));
_cimg_mp_scalar1(mp_isfinite,arg1);
}

if (!std::strncmp(ss,"isin(",5)) { // Is in sequence/vector?
if (ss5>=se1) _cimg_mp_return(0);
_cimg_mp_op("Function 'isin()'");
Expand Down Expand Up @@ -26428,6 +26439,10 @@ namespace cimg_library {
return (double)cimg::is_directory(ss);
}

static double mp_isfinite(_cimg_math_parser& mp) {
return (double)cimg::type<double>::is_finite(_mp_arg(2));
}

static double mp_isin(_cimg_math_parser& mp) {
const unsigned int
i_end = (unsigned int)mp.opcode[2],
Expand Down Expand Up @@ -45540,7 +45555,7 @@ namespace cimg_library {
p1+=offy1; p2+=offy2;
}
return patch_penalization==0?ssd:cimg::sqr(std::sqrt(ssd) +
patch_penalization*psizewc*psizeh*psized*penalty(xc,yc,zc)/100);
patch_penalization*psizewc*psizeh*psized*penalty(xc,yc,zc)/100);
}

static float _matchpatch(const CImg<T>& img1, const CImg<T>& img2, const CImg<floatT>& penalty,
Expand Down
2 changes: 1 addition & 1 deletion html/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<div class="header">
<a href="index.html"><img alt="Logo" src="img/logo_header.jpg" class="center_image" style="margin-top:1em;"/></a>
<h2 style="padding-bottom: 1em">
Latest stable version: <b><a href="http://cimg.eu/files/CImg_.zip">3.4.3</a></b> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Current pre-release: <b><a href="http://cimg.eu/files/CImg_latest.zip">3.5.0</a></b> (2024/12/29)
Latest stable version: <b><a href="http://cimg.eu/files/CImg_.zip">3.5.0</a></b> (2024/12/31)
</h2>

<hr/>
Expand Down
2 changes: 1 addition & 1 deletion html/header_doxygen.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<div class="header">
<a href="../index.html"><img alt="Logo" src="../img/logo_header.jpg" class="center_image" style="margin-top:1em;"/></a>
<h2 style="padding-bottom: 1em">
Latest stable version: <b><a href="http://cimg.eu/files/CImg_.zip">3.4.3</a></b> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Current pre-release: <b><a href="http://cimg.eu/files/CImg_latest.zip">3.5.0</a></b> (2024/12/29)
Latest stable version: <b><a href="http://cimg.eu/files/CImg_.zip">3.5.0</a></b> (2024/12/31)
</h2>

<hr/>
Expand Down

0 comments on commit 371e3ba

Please sign in to comment.