Mercurial > hg > octave-max
changeset 488:4481fdfb01b4
[project @ 1994-07-06 14:31:07 by jwe]
author | jwe |
---|---|
date | Wed, 06 Jul 1994 14:31:42 +0000 |
parents | b7539a7224cc |
children | 89ed09321d16 |
files | src/dassl.cc src/fsolve.cc src/lex.l src/lsode.cc src/npsol.cc src/quad.cc |
diffstat | 6 files changed, 28 insertions(+), 26 deletions(-) [+] |
line wrap: on
line diff
--- a/src/dassl.cc +++ b/src/dassl.cc @@ -38,7 +38,7 @@ #include "f-dassl.h" // Global pointer for user defined function required by dassl. -static tree *dassl_fcn; +static tree_fvc *dassl_fcn; #ifdef WITH_DLD tree_constant * @@ -94,9 +94,9 @@ args[2] = deriv; } - if (dassl_fcn != NULL_TREE) + if (dassl_fcn != (tree_fvc *) NULL) { - tree_constant *tmp = dassl_fcn->eval (args, 4, 1, 0); + tree_constant *tmp = dassl_fcn->eval (0, 1, args, 4); delete [] args; @@ -133,7 +133,7 @@ tree_constant *retval = NULL_TREE_CONST; dassl_fcn = is_valid_function (args[1], "dassl", 1); - if (dassl_fcn == NULL_TREE + if (dassl_fcn == (tree_fvc *) NULL || takes_correct_nargs (dassl_fcn, 4, "dassl", 1) != 1) return retval;
--- a/src/fsolve.cc +++ b/src/fsolve.cc @@ -38,7 +38,7 @@ #include "f-fsolve.h" // Global pointer for user defined function required by hybrd1. -static tree *fsolve_fcn; +static tree_fvc *fsolve_fcn; #ifdef WITH_DLD tree_constant * @@ -110,9 +110,9 @@ args[1] = vars; } - if (fsolve_fcn != NULL_TREE) + if (fsolve_fcn != (tree_fvc *) NULL) { - tree_constant *tmp = fsolve_fcn->eval (args, 2, 1, 0); + tree_constant *tmp = fsolve_fcn->eval (0, 1, args, 2); delete [] args; if (tmp != NULL_TREE_CONST && tmp[0].is_defined ()) { @@ -141,7 +141,7 @@ tree_constant *retval = NULL_TREE_CONST; fsolve_fcn = is_valid_function (args[1], "fsolve", 1); - if (fsolve_fcn == NULL_TREE + if (fsolve_fcn == (tree_fvc *) NULL || takes_correct_nargs (fsolve_fcn, 2, "fsolve", 1) != 1) return retval;
--- a/src/lex.l +++ b/src/lex.l @@ -52,6 +52,8 @@ #include "error.h" #include "utils.h" #include "tree.h" +#include "tree-plot.h" +#include "tree-const.h" #include "y.tab.h" #include "parse.h" #include "lex.h"
--- a/src/lsode.cc +++ b/src/lsode.cc @@ -38,7 +38,7 @@ #include "f-lsode.h" // Global pointer for user defined function required by lsode. -static tree *lsode_fcn; +static tree_fvc *lsode_fcn; #ifdef WITH_DLD tree_constant * @@ -83,9 +83,9 @@ args[1] = state; } - if (lsode_fcn != NULL_TREE) + if (lsode_fcn != (tree_fvc *) NULL) { - tree_constant *tmp = lsode_fcn->eval (args, 3, 1, 0); + tree_constant *tmp = lsode_fcn->eval (0, 1, args, 3); delete [] args; @@ -122,7 +122,7 @@ tree_constant *retval = NULL_TREE_CONST; lsode_fcn = is_valid_function (args[1], "lsode", 1); - if (lsode_fcn == NULL_TREE + if (lsode_fcn == (tree_fvc *) NULL || takes_correct_nargs (lsode_fcn, 3, "lsode", 1) != 1) return retval;
--- a/src/npsol.cc +++ b/src/npsol.cc @@ -41,8 +41,8 @@ #include "f-npsol.h" // Global pointers for user defined functions required by npsol. -static tree *npsol_objective; -static tree *npsol_constraints; +static tree_fvc *npsol_objective; +static tree_fvc *npsol_constraints; #ifdef WITH_DLD tree_constant * @@ -88,9 +88,9 @@ retval = 0.0; tree_constant objective_value; - if (npsol_objective != NULL_TREE) + if (npsol_objective != (tree_fvc *) NULL) { - tree_constant *tmp = npsol_objective->eval (args, 2, 1, 0); + tree_constant *tmp = npsol_objective->eval (0, 1, args, 2); delete [] args; @@ -168,9 +168,9 @@ // args[0] = name; args[1] = decision_vars; - if (npsol_constraints != NULL_TREE) + if (npsol_constraints != (tree_fvc *)NULL) { - tree_constant *tmp = npsol_constraints->eval (args, 2, 1, 0); + tree_constant *tmp = npsol_constraints->eval (0, 1, args, 2); delete [] args; @@ -291,7 +291,7 @@ } npsol_objective = is_valid_function (args[2], "npsol", 1); - if (npsol_objective == NULL_TREE + if (npsol_objective == (tree_fvc *) NULL || takes_correct_nargs (npsol_objective, 2, "npsol", 1) != 1) return retval; @@ -345,13 +345,13 @@ goto solved; } - npsol_constraints = NULL_TREE; + npsol_constraints = (tree_fvc *) NULL; if (nargin == 6 || nargin == 8 || nargin == 9 || nargin == 11) npsol_constraints = is_valid_function (args[nargin-2], "npsol", 0); if (nargin == 8 || nargin == 6) { - if (npsol_constraints == NULL_TREE) + if (npsol_constraints == (tree_fvc *) NULL) { ColumnVector lub = args[nargin-1].to_vector (); Matrix c = args[nargin-2].to_matrix (); @@ -424,7 +424,7 @@ if (nargin == 9 || nargin == 11) { - if (npsol_constraints == NULL_TREE) + if (npsol_constraints == (tree_fvc *) NULL) { // Produce error message. is_valid_function (args[nargin-2], "npsol", 1);
--- a/src/quad.cc +++ b/src/quad.cc @@ -39,7 +39,7 @@ #include "f-quad.h" // Global pointer for user defined function required by quadrature functions. -static tree *quad_fcn; +static tree_fvc *quad_fcn; #ifdef WITH_DLD tree_constant * @@ -67,9 +67,9 @@ // args[0] = name; args[1] = tree_constant (x); - if (quad_fcn != NULL_TREE) + if (quad_fcn != (tree_fvc *) NULL) { - tree_constant *tmp = quad_fcn->eval (args, 2, 1, 0); + tree_constant *tmp = quad_fcn->eval (0, 1, args, 2); delete [] args; @@ -105,7 +105,7 @@ tree_constant *retval = NULL_TREE_CONST; quad_fcn = is_valid_function (args[1], "fsolve", 1); - if (quad_fcn == NULL_TREE + if (quad_fcn == (tree_fvc *) NULL || takes_correct_nargs (quad_fcn, 2, "fsolve", 1) != 1) return retval;