Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Modules/ThirdParty/VNL/UpdateFromUpstream.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ readonly name='VXL'
readonly ownership='Insight Software Consortium Maintainers <https://discourse.itk.org/>'
readonly subtree="Modules/ThirdParty/VNL/src/vxl"
readonly repo="https://github.com/InsightSoftwareConsortium/vxl.git"
readonly tag="for/itk-vxl-master-272c3f1" # 2026-06-09 (272c3f1: linkage fixes + config-option removals)
readonly tag="for/itk-vxl-master-7829892" # 2026-06-10 (7829892: vnl_math:: deprecation campaign + sqrteps 0x1p-26)
readonly shortlog=false
readonly exact_tree_match=false
readonly paths="
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class gaussian_integrant : public vnl_analytic_integrant
, p0_(p0)
, oneoversr2_(1.0 / sr_ / sr_)
, oneoversz2_(1.0 / sz_ / sz_)
, normalizer_(-sr_ * sr_ / (sz_ * 2 * vnl_math::sqrt2pi))
, normalizer_(-sr_ * sr_ / (sz_ * 2 * vnl_math::detail::sqrt2pi))
{}

void
Expand Down
10 changes: 5 additions & 5 deletions Modules/ThirdParty/VNL/src/vxl/core/vnl/algo/tests/test_qsvd.cxx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <cstdio>
#include "vnl/vnl_math.h" // vnl_math::abs()
#include "vnl/vnl_math.h" // vnl_math::detail::abs()
#include "testlib/testlib_test.h"
#undef printf // to work around a bug in libintl.h

Expand Down Expand Up @@ -76,13 +76,13 @@ test_qsvd()
AA[8]);

TEST("D1 must be (0.6,0.8,0.6)",
vnl_math::abs(Alpha[0] - 0.6) < 1e-6 && vnl_math::abs(Alpha[1] - 0.8) < 1e-6 &&
vnl_math::abs(Alpha[2] - 0.6) < 1e-6,
vnl_math::detail::abs(Alpha[0] - 0.6) < 1e-6 && vnl_math::detail::abs(Alpha[1] - 0.8) < 1e-6 &&
vnl_math::detail::abs(Alpha[2] - 0.6) < 1e-6,
true);

TEST("D2 must be (0.8,0.6,0.8)",
vnl_math::abs(Beta[0] - 0.8) < 1e-6 && vnl_math::abs(Beta[1] - 0.6) < 1e-6 &&
vnl_math::abs(Beta[2] - 0.8) < 1e-6,
vnl_math::detail::abs(Beta[0] - 0.8) < 1e-6 && vnl_math::detail::abs(Beta[1] - 0.6) < 1e-6 &&
vnl_math::detail::abs(Beta[2] - 0.8) < 1e-6,
true);
}

Expand Down
6 changes: 3 additions & 3 deletions Modules/ThirdParty/VNL/src/vxl/core/vnl/algo/vnl_amoeba.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ struct vnl_amoebaFit : public vnl_amoeba
int
vnl_amoeba_SimplexCorner::compare(const vnl_amoeba_SimplexCorner & s1, const vnl_amoeba_SimplexCorner & s2)
{
return vnl_math::sgn(s1.fv - s2.fv);
return vnl_math::detail::sgn(s1.fv - s2.fv);
}

static int
Expand All @@ -112,7 +112,7 @@ maxabsdiff(const vnl_vector<double> & a, const vnl_vector<double> & b)
double v = 0;
for (unsigned i = 0; i < a.size(); ++i)
{
const double ad = vnl_math::abs(a[i] - b[i]);
const double ad = vnl_math::detail::abs(a[i] - b[i]);
if (ad > v)
v = ad;
}
Expand Down Expand Up @@ -180,7 +180,7 @@ vnl_amoebaFit::set_up_simplex_relative(std::vector<vnl_amoeba_SimplexCorner> & s
s->v = x;

// perturb s->v(j)
if (vnl_math::abs(s->v[j]) > zero_term_delta)
if (vnl_math::detail::abs(s->v[j]) > zero_term_delta)
s->v[j] = (1 + usual_delta) * s->v[j];
else
s->v[j] = zero_term_delta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ vnl_powell::minimize(vnl_vector<double> & p)
report_eval(fret);
if (fptt < fp)
{
const double t = 2.0 * (fp - 2.0 * fret + fptt) * vnl_math::sqr(fp - fret - del) - del * vnl_math::sqr(fp - fptt);
const double t = 2.0 * (fp - 2.0 * fret + fptt) * vnl_math::detail::sqr(fp - fret - del) - del * vnl_math::detail::sqr(fp - fptt);
if (t < 0.0)
{
f1d.init(p, xit);
Expand Down
6 changes: 3 additions & 3 deletions Modules/ThirdParty/VNL/src/vxl/core/vnl/algo/vnl_qr.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# include <vcl_msvc_warnings.h>
#endif
#include <vnl/vnl_math.h>
#include <vnl/vnl_complex.h> // vnl_math::squared_magnitude()
#include <vnl/vnl_complex.h> // vnl_math::detail::squared_magnitude()
#include <vnl/vnl_matlab_print.h>
#include <vnl/vnl_complex_traits.h>
#include <vnl/algo/vnl_netlib.h> // dqrdc_(), dqrsl_()
Expand Down Expand Up @@ -124,11 +124,11 @@ vnl_qr<T>::Q() const
continue;
// Make housevec v, and accumulate norm at the same time.
v[k] = qraux_[k];
abs_t sq = vnl_math::squared_magnitude(v[k]);
abs_t sq = vnl_math::detail::squared_magnitude(v[k]);
for (int j = k + 1; j < m; ++j)
{
v[j] = qrdc_out_(k, j);
sq += vnl_math::squared_magnitude(v[j]);
sq += vnl_math::detail::squared_magnitude(v[j]);
}
if (verbose)
vnl_matlab_print(std::cerr, v, "v");
Expand Down
2 changes: 1 addition & 1 deletion Modules/ThirdParty/VNL/src/vxl/core/vnl/algo/vnl_svd.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ vnl_svd<T>::vnl_svd(vnl_matrix<T> const & M, double zero_out_tol)
using abs_t = typename vnl_numeric_traits<T>::abs_t;
const abs_t recomposition_residual = std::abs((recompose() - M).fro_norm());
const abs_t n = std::abs(M.fro_norm());
const abs_t thresh = abs_t(m_) * abs_t(vnl_math::eps) * n;
const abs_t thresh = abs_t(m_) * abs_t(vnl_math::detail::eps) * n;
if (recomposition_residual > thresh)
{
std::cerr << "vnl_svd<T>::vnl_svd<T>() -- Warning, recomposition_residual = " << recomposition_residual
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ vnl_svd_fixed<T, R, C>::vnl_svd_fixed(vnl_matrix_fixed<T, R, C> const & M, doubl
using abs_t = typename vnl_numeric_traits<T>::abs_t;
const abs_t recomposition_residual = std::abs((recompose() - M).fro_norm());
const abs_t n = std::abs(M.fro_norm());
const abs_t thresh = abs_t(R) * abs_t(vnl_math::eps) * n;
const abs_t thresh = abs_t(R) * abs_t(vnl_math::detail::eps) * n;
if (recomposition_residual > thresh)
{
std::cerr << "vnl_svd_fixed<T>::vnl_svd_fixed<T>() -- Warning, recomposition_residual = "
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ vnl_symmetric_eigensystem_compute_eigenvals(T M11, T M12, T M13, T M22, T M23, T
// complex conjugate roots as numerically inaccurate repeated roots.

// first check we are not too numerically inaccurate
assert((g2 - f3) / vnl_math::sqr(vnl_math::cube(b)) < 1e-8);
assert((g2 - f3) / vnl_math::detail::sqr(vnl_math::detail::cube(b)) < 1e-8);

if (g2 >= f3)
{
Expand All @@ -78,8 +78,8 @@ vnl_symmetric_eigensystem_compute_eigenvals(T M11, T M12, T M13, T M22, T M23, T
const T k = std::acos(g / sqrt_f3) / 3;
const T j = 2 * sqrt_f;
l1 = j * std::cos(k) - b_3;
l2 = j * std::cos(k + T(vnl_math::twopi / 3.0)) - b_3;
l3 = j * std::cos(k - T(vnl_math::twopi / 3.0)) - b_3;
l2 = j * std::cos(k + T(vnl_math::detail::twopi / 3.0)) - b_3;
l3 = j * std::cos(k - T(vnl_math::detail::twopi / 3.0)) - b_3;

if (l2 < l1)
std::swap(l2, l1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ test_euclid_dist_sq(const vnl_vector<float> & vec, const vnl_vector<float> & vec
const unsigned n = vec.size();
float correct(0);
for (unsigned i = 0; i < n; ++i)
correct += vnl_math::sqr(vec(i) - vec2(i));
correct += vnl_math::detail::sqr(vec(i) - vec2(i));

const float err = std::abs(correct - val);
const float neps = float(n) * std::sqrt(std::numeric_limits<float>::epsilon());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ test_cosine()
vnl_random rng(1234567);
for (int i = 0; i < 20; ++i)
{
const double u = rng.drand32(vnl_math::pi_over_2);
const double u = rng.drand32(vnl_math::detail::pi_over_2);
const double v = rng.drand32(2.0);
const std::complex<double> c(u, v);
const std::complex<double> d = std::cos(c);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ test_gamma()
TEST_NEAR("vnl_scaled_erfc(6)", vnl_scaled_erfc(6.), std::exp(36.) * vnl_erfc(6.), 0.01);
TEST_NEAR("vnl_scaled_erfc(100)", vnl_scaled_erfc(100.), 0.0056, 0.01);
TEST_NEAR("vnl_scaled_erfc(-inf)", vnl_scaled_erfc(-1e9), 0.0, 1e-8);
TEST_NEAR("vnl_digamma(1)", vnl_digamma(1), -vnl_math::euler, 1e-10);
TEST_NEAR("vnl_digamma(1)", vnl_digamma(1), -vnl_math::detail::euler, 1e-10);
TEST_NEAR("vnl_digamma(20)", vnl_digamma(20), 2.970523992242149, 1e-10);
}

Expand Down
Loading
Loading