File: missing-return-value.patch

package info (click to toggle)
octave-ga 0.10.0-6
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 324 kB
  • sloc: makefile: 2
file content (23 lines) | stat: -rw-r--r-- 1,072 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Description: Define 3rd return value of __ga_problem_return_variables__
 The function __ga_problem_return_variables__ does not define a return value
 for third return argument exitflag. Up to octave release 4.2.2 this was not an
 error. From release 4.4.0 this is an error and ga algorithm fails.
Author: Georg Wiora
Bug: https://savannah.gnu.org/bugs/index.php?53857
Reviewed-by: Sébastien Villemot <sebastien@debian.org>
Last-Update: 2018-06-17
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/inst/__ga_problem_return_variables__.m
+++ b/inst/__ga_problem_return_variables__.m
@@ -24,6 +24,10 @@ function [x fval exitflag output populat
   fval = problem.fitnessfcn (x);
 
                                 #TODO exitflag
+  % 02-MAY-2018: Georg Wiora: Added missing outputs
+  % TODO: Define meaningfull exit flag according to matlab ga()
+  % See https://de.mathworks.com/help/gads/ga.html
+  exitflag = [];                                
 
   ## output.randstate and output.randnstate must be assigned at the
   ## start of the algorithm