> 1). About Dot_Product:
>
> a) The second argument to be optional, so
> Dot_Product(x) => x'*x
> Now we have to do: Dot_Product(x,x)
Why, apart from saving two keystrokes?
> b) Why so long name? Dot_Prod, or simply DProd would be so clear
> This function people use a lot and this long name in the
> formula some times
> makes some difficulties to read some codes.
This allows for easy-to-understand code (is `D' `DOT' or `DOUBLE'?) and
is less likely to conflict with users' own routines.
> This function could be also more general in the following way
> Dot_Product(x,y,oper='operator')
>
> so,
>
> Dot_Product(x,y,oper='Sqrt') => Sqrt(x'*y)
Why not just SQRT(DOT_PRODUCT(X,Y))?
> 2). Why to use two names for a very similar functions MinVal and MaxVal,
> MinLoc,MaxLoc?
>
> Val(x , oper='min' , mask) => MinVal(x,mask)
> Val(x , oper='max' , mask) => MaxVal(x,mask)
> Loc(x , oper='min' , mask) => MinLoc(x,mask)
> Loc(x , oper='max' , mask) => MaxLoc(x,mask)
Seems more complicated than the present solution.
> Why a subroutine Random_Number instead of function random number? I
> think that people prefer intrinsic functions than intrinsic subroutines.
I STRONGLY believe that FUNCTIONs should not have side effects. I think
the fact that many standards people agree, at least in this context, is
the reason RANDOM_NUMBER is a SUBROUTINE.
> Why to define a subroutine for computing the cpu time instead of
> function?
Ditto.
--
Phillip Helbig Email ......... [log in to unmask]
Nuffield Radio Astronomy Laboratories Tel. .... +44 1477 571 321 (ext. 297)
Jodrell Bank Fax ................ +44 1477 571 618
Macclesfield Telex ................ 36149 JODREL G
UK-Cheshire SK11 9DL Web ... http://www.jb.man.ac.uk/~pjh/
My opinions are not necessarily those of NRAL or the University of Manchester.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|