- Fix some build issues with Octave 9.x, add
* 0001-Fix-const-correctness-invalid-used-of-non-const-fort.patch * 0001-Fix-element-wise-plus-operator.patch OBS-URL: https://build.opensuse.org/package/show/science/octave-forge-tisean?expand=0&rev=5
This commit is contained in:
commit
013f13943f
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.osc
|
124
0001-Fix-const-correctness-invalid-used-of-non-const-fort.patch
Normal file
124
0001-Fix-const-correctness-invalid-used-of-non-const-fort.patch
Normal file
@ -0,0 +1,124 @@
|
||||
From 1c672392dffcc5a9a124241ac966d9a81102dccf Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>
|
||||
Date: Wed, 1 Jan 2025 20:24:11 +0100
|
||||
Subject: [PATCH] Fix const-correctness, invalid used of non-const fortran_vec
|
||||
|
||||
fortran_vec() is a non-const method, replace with the const data() method.
|
||||
---
|
||||
src/__lzo_gm__.cc | 4 ++--
|
||||
src/__lzo_run__.cc | 2 +-
|
||||
src/__lzo_test__.cc | 8 ++++----
|
||||
src/routines_c/find_multi_neighbors.cc | 2 +-
|
||||
src/routines_c/tsa.h | 2 +-
|
||||
5 files changed, 9 insertions(+), 9 deletions(-)
|
||||
mode change 100755 => 100644 src/__lzo_gm__.cc
|
||||
mode change 100755 => 100644 src/__lzo_run__.cc
|
||||
|
||||
diff --git a/src/__lzo_gm__.cc b/src/__lzo_gm__.cc
|
||||
old mode 100755
|
||||
new mode 100644
|
||||
index 40b5065..c8b6476
|
||||
--- a/src/__lzo_gm__.cc
|
||||
+++ b/src/__lzo_gm__.cc
|
||||
@@ -42,7 +42,7 @@ void make_fit(const Matrix& series, octave_idx_type dim,
|
||||
octave_idx_type LENGTH = series.rows ();
|
||||
for (octave_idx_type i=0;i<dim;i++)
|
||||
{
|
||||
- const double *si = series.fortran_vec() + LENGTH * i;
|
||||
+ const double *si = series.data() + LENGTH * i;
|
||||
double cast=si[found[0]+STEP];
|
||||
for (octave_idx_type j=1;j<number;j++)
|
||||
cast += si[found[j]+STEP];
|
||||
@@ -106,7 +106,7 @@ DEFUN_DLD (__lzo_gm__, args, , HELPTEXT)
|
||||
OCTAVE_LOCAL_BUFFER (double, error_array, dim);
|
||||
OCTAVE_LOCAL_BUFFER (double, hrms, dim);
|
||||
OCTAVE_LOCAL_BUFFER (double, hav, dim);
|
||||
- OCTAVE_LOCAL_BUFFER (double *, hser, dim);
|
||||
+ OCTAVE_LOCAL_BUFFER (const double *, hser, dim);
|
||||
|
||||
MArray<octave_idx_type> box (dim_vector(NMAX,NMAX));
|
||||
|
||||
diff --git a/src/__lzo_run__.cc b/src/__lzo_run__.cc
|
||||
old mode 100755
|
||||
new mode 100644
|
||||
index 03ff253..14bca5c
|
||||
--- a/src/__lzo_run__.cc
|
||||
+++ b/src/__lzo_run__.cc
|
||||
@@ -136,7 +136,7 @@ void make_zeroth(const Matrix &series, TISEAN_rand &generator,
|
||||
for (octave_idx_type d=0;d<dim;d++) {
|
||||
newcast[d]=0.0;
|
||||
// old sd=series[d]+1;
|
||||
- const double *sd = series.fortran_vec() + d*len + 1;
|
||||
+ const double *sd = series.data() + d*len + 1;
|
||||
for (octave_idx_type i=0;i<number;i++)
|
||||
newcast[d] += sd[found[i]];
|
||||
newcast[d] /= (double)number;
|
||||
diff --git a/src/__lzo_test__.cc b/src/__lzo_test__.cc
|
||||
index 650223c..f55b1a9 100644
|
||||
--- a/src/__lzo_test__.cc
|
||||
+++ b/src/__lzo_test__.cc
|
||||
@@ -38,7 +38,7 @@ FOR INTERNAL USE ONLY"
|
||||
void sort(const Matrix &series, octave_idx_type *found,
|
||||
double *abstand, octave_idx_type embed, octave_idx_type DELAY,
|
||||
octave_idx_type MINN, octave_idx_type nfound,
|
||||
- double **hser)
|
||||
+ const double **hser)
|
||||
{
|
||||
|
||||
octave_idx_type hdim = (embed-1) * DELAY;
|
||||
@@ -81,7 +81,7 @@ void make_fit(const Matrix &series, octave_idx_type dim,
|
||||
{
|
||||
casted=0.0;
|
||||
// old help=series[j]+istep;
|
||||
- help=series.fortran_vec()+j*len+istep;
|
||||
+ help=series.data()+j*len+istep;
|
||||
for (octave_idx_type i=0;i<number;i++)
|
||||
casted += help[found[i]];
|
||||
casted /= (double)number;
|
||||
@@ -122,7 +122,7 @@ DEFUN_DLD (__lzo_test__, args, nargout, HELPTEXT)
|
||||
octave_idx_type dim = input.columns ();
|
||||
|
||||
// Allocate memory and analyze input
|
||||
- OCTAVE_LOCAL_BUFFER(double*, hser, dim);
|
||||
+ OCTAVE_LOCAL_BUFFER(const double*, hser, dim);
|
||||
OCTAVE_LOCAL_BUFFER(double, av, dim);
|
||||
OCTAVE_LOCAL_BUFFER(double, rms, dim);
|
||||
OCTAVE_LOCAL_BUFFER(double, hinter, dim);
|
||||
@@ -178,7 +178,7 @@ DEFUN_DLD (__lzo_test__, args, nargout, HELPTEXT)
|
||||
for (octave_idx_type j=0;j<dim;j++)
|
||||
{
|
||||
// old hser[j]=series[j]+hi;
|
||||
- hser[j] = input.fortran_vec() + j * LENGTH + hi;
|
||||
+ hser[j] = input.data() + j * LENGTH + hi;
|
||||
}
|
||||
actfound=find_multi_neighbors(input,box,list,hser,NMAX,
|
||||
dim,embed,DELAY,epsilon,hfound);
|
||||
diff --git a/src/routines_c/find_multi_neighbors.cc b/src/routines_c/find_multi_neighbors.cc
|
||||
index 1af503b..47d5764 100644
|
||||
--- a/src/routines_c/find_multi_neighbors.cc
|
||||
+++ b/src/routines_c/find_multi_neighbors.cc
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
octave_idx_type find_multi_neighbors(const Matrix &s,
|
||||
const MArray <octave_idx_type> &box,
|
||||
- long *list,double **x,
|
||||
+ long *list,const double **x,
|
||||
octave_idx_type bs,octave_idx_type dim,
|
||||
octave_idx_type emb,octave_idx_type del,
|
||||
double eps, unsigned long *flist)
|
||||
diff --git a/src/routines_c/tsa.h b/src/routines_c/tsa.h
|
||||
index b044728..33d51b5 100644
|
||||
--- a/src/routines_c/tsa.h
|
||||
+++ b/src/routines_c/tsa.h
|
||||
@@ -66,7 +66,7 @@ extern octave_idx_type exclude_interval(octave_idx_type,long,long,
|
||||
|
||||
extern octave_idx_type find_multi_neighbors(const Matrix &,
|
||||
const MArray<octave_idx_type> &,
|
||||
- long *,double **,
|
||||
+ long *,const double **,
|
||||
octave_idx_type, octave_idx_type,
|
||||
octave_idx_type, octave_idx_type,
|
||||
double,unsigned long *);
|
||||
--
|
||||
2.47.1
|
||||
|
115
0001-Fix-element-wise-plus-operator.patch
Normal file
115
0001-Fix-element-wise-plus-operator.patch
Normal file
@ -0,0 +1,115 @@
|
||||
From 91eb92651920d306d7281b718d6c903e03e62691 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>
|
||||
Date: Wed, 1 Jan 2025 22:14:59 +0100
|
||||
Subject: [PATCH] Fix element-wise plus operator
|
||||
|
||||
The ".+" notation was deprecated in 7.x and removed with 9.x, it was
|
||||
equivalent with the regular "+" operator.
|
||||
|
||||
The operation broadcasts both index ranges, and then sums them
|
||||
elementwise to create indices representing a sliding window.
|
||||
---
|
||||
inst/av_d2.m | 2 +-
|
||||
inst/c2g.m | 6 +++---
|
||||
inst/c2t.m | 4 ++--
|
||||
inst/endtoend.m | 2 +-
|
||||
inst/upo.m | 2 +-
|
||||
inst/upoembed.m | 4 ++--
|
||||
6 files changed, 10 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/inst/av_d2.m b/inst/av_d2.m
|
||||
index 3c897cd..e44f021 100644
|
||||
--- a/inst/av_d2.m
|
||||
+++ b/inst/av_d2.m
|
||||
@@ -149,7 +149,7 @@ function output = av_d2 (d2_c2d_c1_out, varargin)
|
||||
# Create smoothing functions
|
||||
# Smoothes single column
|
||||
smooth_column = @(col) sum (col((-aver:aver) ...
|
||||
- .+(aver+1:(length(col)-aver)).'),2) ...
|
||||
+ +(aver+1:(length(col)-aver)).'),2) ...
|
||||
./(2*aver + 1);
|
||||
# Smoothes one cell
|
||||
smooth_cell = @(cell_mat) [smooth_column(cell_mat{1}(:,1)), ...
|
||||
diff --git a/inst/c2g.m b/inst/c2g.m
|
||||
index c0dc02e..964a34d 100644
|
||||
--- a/inst/c2g.m
|
||||
+++ b/inst/c2g.m
|
||||
@@ -123,9 +123,9 @@ function output = c2g (d2_out)
|
||||
|
||||
# Create column vectors instead of using loop
|
||||
k_id = 1:length(tmp.c2)-1;
|
||||
- f = exp((emat(k_id+1).*cmat(k_id).-emat(k_id).*cmat(k_id+1))
|
||||
- ./(emat(k_id+1).-emat(k_id)));
|
||||
- d = (cmat(k_id+1).-cmat(k_id))./(emat(k_id+1).-emat(k_id));
|
||||
+ f = exp((emat(k_id+1).*cmat(k_id)-emat(k_id).*cmat(k_id+1))
|
||||
+ ./(emat(k_id+1)-emat(k_id)));
|
||||
+ d = (cmat(k_id+1)-cmat(k_id))./(emat(k_id+1)-emat(k_id));
|
||||
a = emat(k_id);
|
||||
b = emat(k_id+1);
|
||||
|
||||
diff --git a/inst/c2t.m b/inst/c2t.m
|
||||
index 4cb0d43..6f0b55d 100644
|
||||
--- a/inst/c2t.m
|
||||
+++ b/inst/c2t.m
|
||||
@@ -109,8 +109,8 @@ function output = c2t (d2_c1_out)
|
||||
emat = log (corr_sums(idx,1));
|
||||
cmat = log (corr_sums(idx,2));
|
||||
|
||||
- b = (emat(2:end) .* cmat(1:end-1) .- emat(1:end-1) .* cmat(2:end)) ...
|
||||
- ./ (emat(2:end) .- emat(1:end-1));
|
||||
+ b = (emat(2:end) .* cmat(1:end-1) - emat(1:end-1) .* cmat(2:end)) ...
|
||||
+ ./ (emat(2:end) - emat(1:end-1));
|
||||
a = (cmat(2:end) - cmat(1:end-1)) ./ (emat(2:end) - emat(1:end-1));
|
||||
|
||||
cint = (exp (b) ./ a) ...
|
||||
diff --git a/inst/endtoend.m b/inst/endtoend.m
|
||||
index 2a9154d..e05a2ef 100644
|
||||
--- a/inst/endtoend.m
|
||||
+++ b/inst/endtoend.m
|
||||
@@ -209,7 +209,7 @@ S= reshape (S, [rows(S),1,columns(S)]);
|
||||
endwhile
|
||||
etot = original_col_S;
|
||||
for nj = 0:(rows (S) - nmaxp)
|
||||
- [x,s] = mismatch (S((1:nmaxp).+nj,1,:));
|
||||
+ [x,s] = mismatch (S((1:nmaxp)+nj,1,:));
|
||||
xj(1+nj) = x;
|
||||
sj(1+nj) = s;
|
||||
endfor
|
||||
diff --git a/inst/upo.m b/inst/upo.m
|
||||
index 4c17bf0..898fc46 100644
|
||||
--- a/inst/upo.m
|
||||
+++ b/inst/upo.m
|
||||
@@ -80,7 +80,7 @@
|
||||
## n-the orbit you need to:
|
||||
## @example
|
||||
##
|
||||
-## nth_orbit_data = orbit_data(sum(olens(1:n-1)).+(1:olens(n)));
|
||||
+## nth_orbit_data = orbit_data(sum(olens(1:n-1))+(1:olens(n)));
|
||||
##
|
||||
## @end example
|
||||
## @item acc
|
||||
diff --git a/inst/upoembed.m b/inst/upoembed.m
|
||||
index c14b160..3143629 100644
|
||||
--- a/inst/upoembed.m
|
||||
+++ b/inst/upoembed.m
|
||||
@@ -126,7 +126,7 @@ values of olens");
|
||||
## Create delay vectors
|
||||
j = (m:-1:1);
|
||||
delay_vec = @(x) orbit_data(sum(olens(1:idx(x)-1))+ ...
|
||||
- mod(((1:olens(idx(x))+1).').-...
|
||||
+ mod(((1:olens(idx(x))+1).')-...
|
||||
(j-1).*delay -1 +m.*olens(idx(x)),...
|
||||
olens(idx(x)))+1);
|
||||
output = arrayfun (delay_vec,(1:length(idx)).','UniformOutput', false);
|
||||
@@ -138,7 +138,7 @@ values of olens");
|
||||
# for k=1:olens(i)+1;
|
||||
# for j=m:-1:1;
|
||||
# output(sum(olens(1:i-1)+1)+k,m+1-j) = ...
|
||||
- # orbit_data(sum(olens(1:i-1))+mod(k.-(j-1).*delay-1+m*olens(i),olens(i))+1);
|
||||
+ # orbit_data(sum(olens(1:i-1))+mod(k-(j-1).*delay-1+m*olens(i),olens(i))+1);
|
||||
# endfor
|
||||
# endfor
|
||||
# endfor
|
||||
--
|
||||
2.47.1
|
||||
|
19
octave-forge-tisean.changes
Normal file
19
octave-forge-tisean.changes
Normal file
@ -0,0 +1,19 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Jan 1 19:25:41 UTC 2025 - Stefan Brüns <stefan.bruens@rwth-aachen.de>
|
||||
|
||||
- Fix some build issues with Octave 9.x, add
|
||||
* 0001-Fix-const-correctness-invalid-used-of-non-const-fort.patch
|
||||
* 0001-Fix-element-wise-plus-operator.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 19 08:51:06 UTC 2023 - Atri Bhattacharya <badshah400@gmail.com>
|
||||
|
||||
- Add tisean-drop-error_state-use.patch -- Drop the use of
|
||||
error_state to support octave >= 8
|
||||
(https://savannah.gnu.org/bugs/index.php?61583).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Aug 24 13:30:56 UTC 2015 - dmitry_r@opensuse.org
|
||||
|
||||
- Initial package, version 0.2.3
|
||||
|
71
octave-forge-tisean.spec
Normal file
71
octave-forge-tisean.spec
Normal file
@ -0,0 +1,71 @@
|
||||
#
|
||||
# spec file for package octave-forge-tisean
|
||||
#
|
||||
# Copyright (c) 2025 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%define octpkg tisean
|
||||
Name: octave-forge-%{octpkg}
|
||||
Version: 0.2.3
|
||||
Release: 0
|
||||
Summary: Nonlinear Time Series Analysis
|
||||
License: GPL-3.0-or-later
|
||||
Group: Productivity/Scientific/Math
|
||||
URL: https://gnu-octave.github.io/packages/tisean/
|
||||
Source0: https://downloads.sourceforge.net/project/octave/Octave%20Forge%20Packages/Individual%20Package%20Releases/%{octpkg}-%{version}.tar.gz
|
||||
# PATCH-FIX-UPSTREAM tisean-drop-error_state-use.patch badshah400@gmail.com -- Drop the use of error_state to support octave >= 8 (https://savannah.gnu.org/bugs/index.php?61583)
|
||||
Patch0: tisean-drop-error_state-use.patch
|
||||
Patch1: 0001-Fix-const-correctness-invalid-used-of-non-const-fort.patch
|
||||
Patch2: 0001-Fix-element-wise-plus-operator.patch
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: gcc-fortran
|
||||
BuildRequires: octave-devel
|
||||
Requires: octave-cli >= 4.0.0
|
||||
Requires: octave-forge-signal >= 1.3.0
|
||||
|
||||
%description
|
||||
TISEAN stands for TIme SEries ANalysis.
|
||||
This is part of Octave-Forge project.
|
||||
|
||||
%prep
|
||||
%setup -q -c %{name}-%{version}
|
||||
pushd %{octpkg}-%{version}
|
||||
%autopatch -p1
|
||||
# Fix missing namespace
|
||||
find src/ -iname \*.cc -exec sed -i -e 's@set_warning_state\s*(@octave::\0@g' '{}' \;
|
||||
popd
|
||||
%octave_pkg_src
|
||||
|
||||
%build
|
||||
%octave_pkg_build
|
||||
|
||||
%install
|
||||
%octave_pkg_install
|
||||
|
||||
%check
|
||||
%octave_pkg_test
|
||||
|
||||
%post
|
||||
%octave --eval "pkg rebuild"
|
||||
|
||||
%postun
|
||||
%octave --eval "pkg rebuild"
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%{octpackages_dir}/%{octpkg}-%{version}
|
||||
%{octlib_dir}/%{octpkg}-%{version}
|
||||
|
||||
%changelog
|
3
tisean-0.2.3.tar.gz
Normal file
3
tisean-0.2.3.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:bbc94ea6af663092863a437f88215e84d3a59a60b9f51f6ffd9dbe90606a8259
|
||||
size 715494
|
3725
tisean-drop-error_state-use.patch
Normal file
3725
tisean-drop-error_state-use.patch
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user