From 290e2d3a5c1195faeeacb110eb64a92f4dc6360e Mon Sep 17 00:00:00 2001 From: Karl Wette Date: Sun, 7 Feb 2016 20:20:42 +0100 Subject: [PATCH] octave: update manual and CHANGES.current --- CHANGES.current | 9 +++++++++ Doc/Manual/Octave.html | 10 ++++++++++ 2 files changed, 19 insertions(+) diff --git a/CHANGES.current b/CHANGES.current index 9ac2a4cb0..206b6bd68 100644 --- a/CHANGES.current +++ b/CHANGES.current @@ -5,6 +5,15 @@ See the RELEASENOTES file for a summary of changes in each release. Version 3.0.9 (in progress) =========================== +2016-02-07: kwwette + [Octave] recognise various unary functions + * Use __float__() for numeric conversions, e.g. when calling double() + * Map various unary functions, e.g. abs() to __abs__(), see full list + in section 32.3.10 of manual; only available in Octave 3.8.0 or later + +2016-02-07: kwwette + [Octave] export function swig_octave_prereq() for testing Octave version + 2016-02-06: pjohangustavsson [C#] Fix duplicate symbol problems when linking the source generated from multiple SWIG modules into one shared library for the -namespace diff --git a/Doc/Manual/Octave.html b/Doc/Manual/Octave.html index efdd751ce..9b9744f65 100644 --- a/Doc/Manual/Octave.html +++ b/Doc/Manual/Octave.html @@ -66,6 +66,7 @@ Also, there are a dozen or so examples in the Examples/octave directory, and hun

As of SWIG 3.0.7, the Octave module is regularly tested with Octave versions 3.2.4, 3.8.1, and 4.0.0. Use of older Octave versions is not recommended, as these versions are no longer tested with SWIG. +The SWIG runtime exports the function swig_octave_prereq() for checking the version of Octave.

32.2 Running SWIG

@@ -643,6 +644,15 @@ octave:3> printf("%s\n",a); octave:4> a.__str__() 4 + +

+Similarly, Octave can use the __float__ method to convert an object to a numeric value. +

+ +

+Octave 3.8.0 and later versions will also map unary functions X() to the corresponding __X__ method, where X includes: abs(), acos(), acosh(), angle(), arg(), asin(), asinh(), atan(), atanh(), cbrt(), ceil(), conj(), cos(), cosh(), dawson(), erf(), erfc(), erfcinv(), erfcx(), erfi(), erfinv(), exp(), expm1(), finite(), fix(), floor(), gamma(), imag(), isalnum(), isalpha(), isascii(), iscntrl(), isdigit(), isgraph(), isinf(), islower(), isna(), isnan(), isprint(), ispunct(), isspace(), isupper(), isxdigit(), lgamma(), log(), log10(), log1p(), log2(), real(), round(), roundb(), signbit(), signum(), sin(), sinh(), sqrt(), tan(), tanh(), toascii(), tolower(), toupper() +

+

32.3.11 C++ templates