summaryrefslogtreecommitdiff
path: root/math/octave-forge-tisean/files/patch-lazy.cc
diff options
context:
space:
mode:
authorStephen Montgomery-Smith <stephen@FreeBSD.org>2018-05-14 21:34:01 +0000
committerStephen Montgomery-Smith <stephen@FreeBSD.org>2018-05-14 21:34:01 +0000
commit02cfb195e5febb564892643c94212d68fbf4665e (patch)
treefaea5a4c7217bf8584681ec14f350e67923e2dd1 /math/octave-forge-tisean/files/patch-lazy.cc
parent- Default options linear-algebra and mechanics to on. (diff)
- Add patches to unbreak.
- Bump portrevision (since octave upgraded to 4.4.0). Obtained from: https://sourceforge.net/p/octave/tisean/ci/default/tree/ except I added the -fPIC to Makefile.in.
Diffstat (limited to 'math/octave-forge-tisean/files/patch-lazy.cc')
-rw-r--r--math/octave-forge-tisean/files/patch-lazy.cc58
1 files changed, 58 insertions, 0 deletions
diff --git a/math/octave-forge-tisean/files/patch-lazy.cc b/math/octave-forge-tisean/files/patch-lazy.cc
new file mode 100644
index 000000000000..ae8631135e28
--- /dev/null
+++ b/math/octave-forge-tisean/files/patch-lazy.cc
@@ -0,0 +1,58 @@
+--- lazy.cc.orig 2015-08-14 22:25:52 UTC
++++ lazy.cc
+@@ -35,7 +35,7 @@ Performs simple nonlinear noise reductio
+ @item X\n\
+ Must be realvector. If it is a row vector then the output will be row vectors as well.\n\
+ @item m\n\
+-Embedding dimension. Must be postive integer.\n\
++Embedding dimension. Must be positive integer.\n\
+ @item rv\n\
+ If @var{rv} > 0 then it is equal to the absolute radius of the neighbourhoods. If @var{rv} < 0 then its opposite (-@var{rv}) is equal to the fraction of standard deviation used. It cannot be equal 0.\n\
+ @item imax\n\
+@@ -71,12 +71,19 @@ Uses TISEAN package lazy\n\
+ // In order to avoid clobbered warnings transposed is initialized globally.
+ bool transposed;
+
++#if defined (OCTAVE_HAVE_F77_INT_TYPE)
++# define TO_F77_INT(x) octave::to_f77_int (x)
++#else
++typedef octave_idx_type F77_INT;
++# define TO_F77_INT(x) (x)
++#endif
++
+ extern "C"
+ {
+ F77_RET_T
+ F77_FUNC (ts_lazy, TS_LAZY)
+- (const int& m, const double& rv,
+- const int& imax, const int& lines_read,
++ (const F77_INT& m, const double& rv,
++ const F77_INT& imax, const F77_INT& lines_read,
+ double* in_out1, double* in_out2);
+ }
+
+@@ -100,12 +107,12 @@ DEFUN_DLD (lazy, args, nargout, HELPTEXT
+ {
+ // Assigning inputs
+ Matrix in_out1 = args(0).matrix_value();
+- int m = args(1).int_value();
++ F77_INT m = TO_F77_INT (args(1).int_value());
+ double rv = args(2).double_value();
+- int imax = DEFAULT_IMAX;
++ F77_INT imax = DEFAULT_IMAX;
+
+ if (nargin == 4)
+- imax = args(3).int_value();
++ imax = TO_F77_INT (args(3).int_value());
+
+ // --- DATA VALIDATION ---
+
+@@ -144,7 +151,7 @@ DEFUN_DLD (lazy, args, nargout, HELPTEXT
+ in_out1 = in_out1.transpose();
+ }
+
+- int lines_read = in_out1.numel();
++ F77_INT lines_read = TO_F77_INT (in_out1.numel());
+ NDArray in_out2 (Matrix (lines_read, 1));
+
+ F77_XFCN (ts_lazy, TS_LAZY,