Re: TMatrix inverting/ binomial coefficients

From: Valery Fine (fine@bnl.gov)
Date: Sun Aug 22 1999 - 19:57:33 MEST


>
> 3) Or: is there already a straight-forward least-square fitting algorithm
> for polynomials?

Have a look:

http://www.nr.com/

or

http://wwwinfo.cern.ch/asdoc/cernlib.html

or

http://wwwinfo.cern.ch/asd/lhc++/Nag_Fortran/mk18.htm


  I mean sometimes it is much much faster and better to call some
well-known and well-tested Fortran subroutine to solve YOUR problem
from C++ code rather looking for "the good for all" the object model of
"the  vector / matrix ". I think the best ( well-defined at least) object
model
 of those are just an array of the floating  (single or double) point
numbers
(why not ?) and the best method  of such  "virtual class" is some Fortran
 (converted to C may be) subroutine. At least very this sort of model (C++
 class) should be implemented first.

 Lacking C++ class for the "trivial" vector / matrix object model (with a
trivial
pointer to the trivial plain array as its data-member) caused  97 % of the
problem we are fighting with.

  I mean very often it is much cheaper to collect one's data one
re-distributed
across his/her object model into the single array and call well-known and
tested
numerical code

  Try. I believe it will take you much less time ( 1 day at most) the get
the result
rather seeking  / learning  / debugging  / deriving / implementing and
adjusting
your data model to fit that universal  C++_class_vector_matrix  object
model.
(Ohh. well I forgot then you will fight a problem how to save / store your
results
and transfer it to somebody )

  Do not forget all future readers of your code (and you yourself included)
must
  keep in mind what the statement

                                          c = a*b;

  really does. (Is it cross product or scalar one, for example )


  Hope this helps,

   With my best regards,
                                         Valery



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:43:38 MET