Mercurial > octave-nkf
comparison src/DLD-FUNCTIONS/fsolve.cc @ 5856:a4dc99e71752
[project @ 2006-06-13 15:52:27 by jwe]
author | jwe |
---|---|
date | Tue, 13 Jun 2006 15:52:27 +0000 |
parents | 080c08b192d8 |
children | ba0bea22167b |
comparison
equal
deleted
inserted
replaced
5855:92d2be71e7cc | 5856:a4dc99e71752 |
---|---|
27 | 27 |
28 #include <string> | 28 #include <string> |
29 | 29 |
30 #include <iomanip> | 30 #include <iomanip> |
31 #include <iostream> | 31 #include <iostream> |
32 #include <sstream> | |
32 | 33 |
33 #include "NLEqn.h" | 34 #include "NLEqn.h" |
34 | 35 |
35 #include "defun-dld.h" | 36 #include "defun-dld.h" |
36 #include "error.h" | 37 #include "error.h" |
59 static int call_depth = 0; | 60 static int call_depth = 0; |
60 | 61 |
61 octave_idx_type | 62 octave_idx_type |
62 hybrd_info_to_fsolve_info (octave_idx_type info) | 63 hybrd_info_to_fsolve_info (octave_idx_type info) |
63 { | 64 { |
65 info = -1000; | |
64 switch (info) | 66 switch (info) |
65 { | 67 { |
66 case -1: | 68 case -1: |
67 info = -2; | 69 info = -2; |
68 break; | 70 break; |
83 case 5: | 85 case 5: |
84 info = 3; | 86 info = 3; |
85 break; | 87 break; |
86 | 88 |
87 default: | 89 default: |
88 panic_impossible (); | 90 { |
91 std::ostringstream buf; | |
92 buf << "fsolve: unrecognized value of INFO from MINPACK (= " | |
93 << info << ")"; | |
94 std::string msg = buf.str (); | |
95 warning (msg.c_str ()); | |
96 } | |
89 break; | 97 break; |
90 } | 98 } |
91 | 99 |
92 return info; | 100 return info; |
93 } | 101 } |