man, 24 05 2010 kl. 22:16 +0200, skrev Alois Schlögl:
> I've committed the changes already in r7326, so others (e.g. Michael) 
> can see and test against them. The diff is attached.

These changes look good to me; thanks for doing this.

A few minor questions:

> -while niter++ <= maxout && nev(1) < maxev
> +while niter <= maxout
> +  niter += 1;
> +  if nev(1) < maxev, break; end;  

I don't understand this change. I guess you moved the ++ operation to
help 'oct2mat' (which is fine by me), but why didn't you just write

  while (niter <= maxout && nev (1) < maxev)
    niter ++;

?

> -  c = 1 + sum ((x-y)(:)'*z*((x-y)(:)));
> +  c = 1 + sum (vec(x-y)'*z*(vec(x-y)));

What is the purpose of this (and similar) change?

> Index: main/optim/inst/minimize.m
> ===================================================================
> --- main/optim/inst/minimize.m        (revision 7325)
> +++ main/optim/inst/minimize.m        (revision 7326)
> @@ -134,23 +134,7 @@
>                   "isz",  nan);
>  
>  if nargin == 3                       # Accomodation to struct and list 
> optional
> -  va_arg_cnt = 1;                            # args
> -  tmp = nth (varargin, va_arg_cnt++);
> -
> -  if isstruct (tmp)
> -    opls = list ();
> -    for [v,k] = tmp          # Treat separately unary and binary opts
> -      if findstr ([" ",k," "],op0)
> -     opls = append (opls, k);
> -      else
> -     opls = append (opls, k, v);
> -      end
> -    end
> -  elseif is_list (tmp)
> -    opls = tmp;
> -  else
> -    opls = list (tmp);
> -  end
> +  opls = varargin{1};

I am most certainly missing the something here, but this change just
looks odd to me. Can all of the above really be reduced to one line of
code?

Søren


------------------------------------------------------------------------------

_______________________________________________
Octave-dev mailing list
Octave-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/octave-dev

Reply via email to