[root] / trunk / hist / hist / src / TPrincipal.cxx Repository:
ViewVC logotype

Log of /trunk/hist/hist/src/TPrincipal.cxx

Parent Directory Parent Directory


Links to HEAD: (view) (download) (as text) (annotate)
Sticky Revision:

Revision 44507 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jun 4 12:30:41 2012 UTC (2 years, 7 months ago) by axel
File length: 53639 byte(s)
Diff to previous 44225
Remove
  using namespace std;
from Riostream.h, which has huge consequences for all of ROOT.
Riostream.h is now a simple wrapper for fstream, iostream, iomanip for backward compatibility; Riosfwd.h simply wraps iosfwd.

Because of templates and their inline functions, Riostream.h needed to be included in headers, too (e.g. TParameter.h), which violated the assumption that Riostream.h is not exposing its using namespace std to headers.
ROOT now requires R__ANSISTREAM, R__SSTREAM, which does not change the set of supported compilers.

Without "using namespace std", several identifiers are now prefixed by std::; e.g. roofit/* source files now have a using namespace std to keep their coding style.
TFile::MakeProject() now generates "using namespace std" to convert the CINT-style class names into C++ ones.

Revision 44225 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri May 11 07:43:46 2012 UTC (2 years, 8 months ago) by moneta
File length: 52969 byte(s)
Diff to previous 35247
apply several Coverity fixes for Hist (mainly to check return pointer values)

Revision 35247 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Sep 13 14:10:41 2010 UTC (4 years, 4 months ago) by brun
File length: 52949 byte(s)
Diff to previous 34982
Fix uninitialized data member coverity CID 11209

Revision 34982 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Aug 25 09:18:42 2010 UTC (4 years, 5 months ago) by brun
File length: 52674 byte(s)
Diff to previous 33115
Fix memory leaks reported by coverity

Revision 33115 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Apr 21 08:31:18 2010 UTC (4 years, 9 months ago) by brun
File length: 52581 byte(s)
Diff to previous 25111
Remove a useless paragraph in the documentation

Revision 25111 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Aug 11 07:05:43 2008 UTC (6 years, 5 months ago) by brun
File length: 52714 byte(s)
Diff to previous 25090
Force eigenvalues to be positive (negative values can be obtained
due to rounding problems)

Revision 25090 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Aug 8 08:10:01 2008 UTC (6 years, 5 months ago) by brun
File length: 52573 byte(s)
Diff to previous 25089
Add a protection for case reported at: <http://savannah.cern.ch/bugs/?39892>

Revision 25089 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Aug 8 08:01:31 2008 UTC (6 years, 5 months ago) by brun
File length: 52513 byte(s)
Diff to previous 23421
fix for <http://savannah.cern.ch/bugs/?39897>
thanks to Gene Van Buren

Revision 23421 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Apr 23 09:24:23 2008 UTC (6 years, 9 months ago) by brun
File length: 52513 byte(s)
Diff to previous 22694
Fix shadowed variable

Revision 22694 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Mar 17 20:23:21 2008 UTC (6 years, 10 months ago) by rdm
File length: 52519 byte(s)
Diff to previous 20882
move hist, histpainter, spectrum and spectrumpainter in the hist package.

Revision 20882 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Nov 19 11:31:26 2007 UTC (7 years, 2 months ago) by rdm
Original Path: trunk/hist/src/TPrincipal.cxx
File length: 52519 byte(s)
Diff to previous 19826
Set property svn:eol-style LF on all source and Makefiles. This should avoid
problems with Win32 line endings ending up in the repository. All MS tools
support LF eols fine.

Revision 19826 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Sep 19 19:56:11 2007 UTC (7 years, 4 months ago) by rdm
Original Path: trunk/hist/src/TPrincipal.cxx
File length: 52519 byte(s)
Diff to previous 19825
imported svn:keywords Id property

Revision 19825 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Sep 19 19:49:10 2007 UTC (7 years, 4 months ago) by rdm
Original Path: trunk/hist/src/TPrincipal.cxx
File length: 52625 byte(s)
Diff to previous 17648
remove :$ from tag line

Revision 17648 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Feb 3 06:40:26 2007 UTC (7 years, 11 months ago) by brun
Original Path: trunk/hist/src/TPrincipal.cxx
File length: 52635 byte(s)
Diff to previous 15167
From Eddy:
Remove the inclusion of TMath.h in TMatrixTUtils.h and fix all the consequences

Revision 15167 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed May 24 14:55:26 2006 UTC (8 years, 8 months ago) by brun
Original Path: trunk/hist/src/TPrincipal.cxx
File length: 52616 byte(s)
Diff to previous 15134
Fix coding conventions violations

Revision 15134 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue May 23 04:47:42 2006 UTC (8 years, 8 months ago) by brun
Original Path: trunk/hist/src/TPrincipal.cxx
File length: 52536 byte(s)
Diff to previous 15072
From Federico Carminati:

"I have implemented all copy and equal operators needed to silence all
warnings in AliRoot, as requested. I have implemented shallow copies as
would do the default operators synthetized by the compiler.
Most operators are protected. If users complain, you just have to move
them into the public area, but class derivation is of course supported.
It has been a terrible job, I have modified 278 files, but the changes
are backward compabile, and this goes a long way to permitting user to
use the effc++ flag with root headers."

Revision 15072 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed May 17 09:37:21 2006 UTC (8 years, 8 months ago) by couet
Original Path: trunk/hist/src/TPrincipal.cxx
File length: 51328 byte(s)
Diff to previous 13987
- Coding conventions.

Revision 13987 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Feb 3 21:55:39 2006 UTC (8 years, 11 months ago) by pcanal
Original Path: trunk/hist/src/TPrincipal.cxx
File length: 51271 byte(s)
Diff to previous 12647
Update of spacing and documentation to match the coding rule

Revision 12647 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Sep 5 10:02:38 2005 UTC (9 years, 4 months ago) by brun
Original Path: trunk/hist/src/TPrincipal.cxx
File length: 50592 byte(s)
Diff to previous 9154
Fix remaining coding conventions in hist.
This has required many changes in TSpectrum and helper classes.

Revision 9154 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jun 9 13:40:02 2004 UTC (10 years, 7 months ago) by brun
Original Path: trunk/hist/src/TPrincipal.cxx
File length: 49693 byte(s)
Diff to previous 8195
From Eddy Offermann
Replave TMatrixDSym by TMatrixD for back compatibility with old versions of TPrincipal
saved in ROOT files.

Revision 8195 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Feb 13 14:27:00 2004 UTC (10 years, 11 months ago) by rdm
Original Path: trunk/hist/src/TPrincipal.cxx
File length: 49947 byte(s)
Diff to previous 8013
added missing cvs "// @(#)..." ident lines.

Revision 8013 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Jan 25 20:33:32 2004 UTC (11 years ago) by brun
Original Path: trunk/hist/src/TPrincipal.cxx
File length: 49338 byte(s)
Diff to previous 7204
New Linear Algebra package from Eddy Offermann.
This new package reimplements the previous classes TMatrix and TMatrixD.
The new classes should be back compatible with the previous version except
the function GetElements.
New classes have been introduced for symmetric matrices,
lazy matrices.
New algorithms (LU, SVD) have been introduced.
A new test suite test/stressLinear.cxx is introduced.
A complete description of this package will be posted in the coming days.
The classes are well documented in the implementation headers.

Revision 7204 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Sep 3 06:08:34 2003 UTC (11 years, 4 months ago) by brun
Original Path: trunk/hist/src/TPrincipal.cxx
File length: 49244 byte(s)
Diff to previous 5717
Change the format of the Gegin_html, End_html to follow Axel's prescriptions.

Revision 5717 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Dec 2 18:50:12 2002 UTC (12 years, 1 month ago) by rdm
Original Path: trunk/hist/src/TPrincipal.cxx
File length: 49239 byte(s)
Diff to previous 4405
mega patch to remove almost all compiler warnings on MacOS X where the
compiler is by default in pedantic mode (LHCb also like to use this option).
The following issues have been fixed:
- removal of unused arguments
- comparison between signed and unsigned integers
- not calling of base class copy ctor in copy ctor's
To be done, the TGeo classes where we get still many hundred warnings of
the above nature. List forwarded to Andrei.

Revision 4405 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Apr 26 10:14:59 2002 UTC (12 years, 9 months ago) by brun
Original Path: trunk/hist/src/TPrincipal.cxx
File length: 49213 byte(s)
Diff to previous 3748
Set fTrace variable to 0 in constructor

Revision 3748 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jan 24 11:39:31 2002 UTC (13 years ago) by rdm
Original Path: trunk/hist/src/TPrincipal.cxx
File length: 49178 byte(s)
Diff to previous 3742
rename IOSFwd.h and IOStream.h to Riosfwd.h and Riostream.h. The change
is necessary because on Windows which is case insensitive IOStream.h
hides the real iostream.h.

Revision 3742 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jan 23 17:52:52 2002 UTC (13 years ago) by rdm
Original Path: trunk/hist/src/TPrincipal.cxx
File length: 49179 byte(s)
Diff to previous 3578
use IOSFwd.h in headers instead of <iosfwd> or many other ifdef'ed variant
and IOStream.h in the source instead of <iostream[.h]>, <fstream[.h]> and
<iomanip[.h]>.

Revision 3578 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jan 4 08:07:38 2002 UTC (13 years ago) by brun
Original Path: trunk/hist/src/TPrincipal.cxx
File length: 49230 byte(s)
Diff to previous 3326
Implement the following improvements by Eddy A.J.M. Offermann (Renaissance Technologies Corp.)
Somebody at Renaissance asked me how to get eigenvectors/values with ROOT.
I knew of the existance of the proper routines in TPrincipal by Christian.
However, no convenient way existed to apply them to an existing matrix.
So I did the following:

1) Took the routines to Tridiagonalize, Calculate eigenvectors/values
    and Sort and inserted them into TMatrix(D)
2) Have TPrincipal use the TMatrixD method EigenVector
3) Have the three routines mentioned above directly access the TMatrix/
   TVector data member fElements, so no having the go through the
   "()" operator (remember that TMatrix stores Fortran-wise)
4) Have the routine index starting at 0 instead of 1 (Still puzzles me
   how Cambridge-Press let them get away with it in Num. Recipes)
5) Change TPrincipal so that it also starts indexing at 0, changed also
   the tex/html comments.
6) Changed TVector(D).h so that TMatrix is also a friend (TVector was
    already a friend of TMatrix)
7) Checked that principal.C in tutorials still does its thing.

What is still lacking:

1) Support for non-symmetrical matrices.
   I might tackle this by importing Single-Value-Decomposition routines.
   Although maybe not the most efficient solution, it does have the
   advantage of also making those routines available.
2) Support for returning/calculating only those eigenvectors
   that belong to the largest eigenvalues.

Revision 3326 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Nov 29 08:27:39 2001 UTC (13 years, 1 month ago) by brun
Original Path: trunk/hist/src/TPrincipal.cxx
File length: 59459 byte(s)
Diff to previous 3034
Christion Holm Christensen has made the following improvements:
I've just realised that I've done something extreemly stupid in
TPrincipal::MakeHistograms which can make one waste enourmous amounts
of space and time.  The problem was, that the method looped over the
user data wether or not you actually wanted to plot it or not, thereby
wasting a lot of time.  Also, I allocated arrays via new in each
iteration, which is ofcourse a waste of time, so I moved that outside
the loop and added a zeroing loop instead.

Further,  I added the option 'd' to the CTOR, so that one may opt to
_not_ store the input data.  This reguired a new data member, and
hence a version bumb.  The default is to store the input data.  I
think this is a useful option for some, since the data arrays can
become quite large.

Thirdly, I modified the histogram names to be 0 padded upto 3 digits.
That is, the format is "%03d" rather than "%d", since that allows for
better overview in the browser.

Revision 3034 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Oct 15 15:49:50 2001 UTC (13 years, 3 months ago) by brun
Original Path: trunk/hist/src/TPrincipal.cxx
File length: 58983 byte(s)
Diff to previous 3016
A bug fix from Christian Holm Christiansen in function Add.
Was dividing in two places by (fNumberOfPoints-1) instead
of fNumberOfPoints.

Revision 3016 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Oct 12 06:46:56 2001 UTC (13 years, 3 months ago) by brun
Original Path: trunk/hist/src/TPrincipal.cxx
File length: 58989 byte(s)
Diff to previous 2136
Do not add the TPrincipal and TMultiDimFit objects to the list of special objects in gROOT.
This was preventing the creation of more than one instance of these classes.

Revision 2136 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon May 7 18:41:49 2001 UTC (13 years, 8 months ago) by rdm
Original Path: trunk/hist/src/TPrincipal.cxx
File length: 59483 byte(s)
Diff to previous 1719
additional MacOS X changes by Keisuke Fujii.

Revision 1719 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Feb 28 11:04:07 2001 UTC (13 years, 10 months ago) by brun
Original Path: trunk/hist/src/TPrincipal.cxx
File length: 59518 byte(s)
Diff to previous 1319
More changes (hopefully last cleanup) introducing constness in the API.

Revision 1319 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jan 5 21:07:01 2001 UTC (14 years ago) by brun
Original Path: trunk/hist/src/TPrincipal.cxx
File length: 59494 byte(s)
Diff to previous 1205
New version from Christian with some bug fixes

Revision 1205 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Dec 13 15:13:57 2000 UTC (14 years, 1 month ago) by brun
Original Path: trunk/hist/src/TPrincipal.cxx
File length: 59353 byte(s)
Diff to previous 700
      W A R N I N G   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     ==================================================================
A very long list of changes in this pre-release of version 3.00.
We have modified the signature of many functions (in particular TObject)
to introduce more constness in the system.
You must change your code if your class derives from TObject and uses
one of the modified functions such as ls, Print, Compare, Hash, etc.
The modified functions in TObject have the following signature:
   virtual TObject    *Clone() const;
   virtual Int_t       Compare(const TObject *obj) const;
   virtual void        Delete(Option_t *option=""); // *MENU*
   virtual void        DrawClass() const; // *MENU*
   virtual void        DrawClone(Option_t *option="") const; // *MENU*
   virtual void        Dump() const; // *MENU*
   virtual TObject    *FindObject(const TObject *obj) const;
   virtual char       *GetObjectInfo(Int_t px, Int_t py) const;
   virtual ULong_t     Hash() const;
   virtual void        Inspect() const; // *MENU*
   virtual Bool_t      IsEqual(const TObject *obj) const;
   virtual void        ls(Option_t *option="") const;
   virtual void        Print(Option_t *option="") const;

A similar operation has been done with classes such as TH1, TVirtualPad,
TTree, etc.

Revision 700 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Oct 1 20:50:08 2000 UTC (14 years, 3 months ago) by brun
Original Path: trunk/hist/src/TPrincipal.cxx
File length: 59347 byte(s)
Diff to previous 488
Fix typo in Chritian Holm Christensen name

Revision 488 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Aug 17 09:44:43 2000 UTC (14 years, 5 months ago) by brun
Original Path: trunk/hist/src/TPrincipal.cxx
File length: 59345 byte(s)
Diff to previous 478
TPrincipal is now derived from TNamed instead of TObject.
In the constructor, the TPrincipal object, named "principal" by default
is automatically added the gROOT->GetListOfSpecials().

Revision 478 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Aug 15 12:49:34 2000 UTC (14 years, 5 months ago) by brun
Original Path: trunk/hist/src/TPrincipal.cxx
File length: 58837 byte(s)
Diff to previous 472
Several minor changes.
Replace the name of the static variables in the generated code by
names starting by g rather thab fg

Revision 472 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Aug 15 09:49:21 2000 UTC (14 years, 5 months ago) by brun
Original Path: trunk/hist/src/TPrincipal.cxx
File length: 58858 byte(s)
Diff to previous 469
Replace Char_t by char and convert source to usual Root style

Revision 469 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Aug 15 09:22:33 2000 UTC (14 years, 5 months ago) by brun
Original Path: trunk/hist/src/TPrincipal.cxx
File length: 58905 byte(s)
Diff to previous 468
To avoid a fatal error in MakeRealCode on SGI with gcc2.95, replace:
  Char_t* prefix   = (isMethod ? Form("%s::", classname) : "");
  Char_t* cv_qual  = (isMethod ? "" : "static ");
by
  const Char_t* prefix   = (isMethod ? Form("%s::", classname) : "");
  const Char_t* cv_qual  = (isMethod ? "" : "static ");

Revision 468 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Aug 15 09:00:43 2000 UTC (14 years, 5 months ago) by brun
Original Path: trunk/hist/src/TPrincipal.cxx
File length: 58893 byte(s)
Diff to previous 465
Remove the non-portable const_cast in TPrincipal::MakeHistograms

Revision 465 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Aug 15 08:44:15 2000 UTC (14 years, 5 months ago) by brun
Original Path: trunk/hist/src/TPrincipal.cxx
File length: 58903 byte(s)
Diff to previous 464
One more correction with multiple loop index declaration

Revision 464 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Aug 15 08:41:53 2000 UTC (14 years, 5 months ago) by brun
Original Path: trunk/hist/src/TPrincipal.cxx
File length: 58909 byte(s)
Diff to previous 463
Many corrections to avoid multiple declarations of the loop index i,j,k

Revision 463 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Aug 15 08:30:50 2000 UTC (14 years, 5 months ago) by brun
Original Path: trunk/hist/src/TPrincipal.cxx
File length: 59025 byte(s)
Diff to previous 462
replace the following include declarations:
#include <fstream>
#include <iostream>
#include <iomanip>
by
#include <fstream.h>
#include <iostream.h>
#include <iomanip.h>

Revision 462 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Aug 15 08:25:36 2000 UTC (14 years, 5 months ago) by brun
Original Path: trunk/hist/src/TPrincipal.cxx
File length: 59019 byte(s)
Diff to previous 459
Correct code in makeSumOfResiduals. There was a declaration of arrays for which
the dimension was not a constant expression.

Revision 459 - (view) (download) (as text) (annotate) - [select for diffs]
Added Tue Aug 15 07:48:50 2000 UTC (14 years, 5 months ago) by brun
Original Path: trunk/hist/src/TPrincipal.cxx
File length: 59088 byte(s)
Introduction of a new class TPrincipal implemented by Christian Holm Cristensen.
The Principal Components Analysis class
=======================================
In many applications of various fields of research, the treatment of
large amounts of data requires powerful techniques capable of rapid
data reduction and analysis. Usually, the quantities most
conveniently measured by the experimentalist, are not necessarily the
most significant for classification and analysis of the data. It is
then useful to have a way of selecting an optimal set of variables
necessary for the recognition process and reducing the dimensionality
of the problem, resulting in an easier classification procedure.

TPrincipal is the implementation of one such method of
feature selection, namely the principal components analysis.
This multidimensional technique is well known in the field of pattern
recognition and and its use in Particle Physics has been documented
elsewhere (cf. H. Wind, <I>Function Parameterization</I>, CERN
72-21).

This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, enter a numeric revision.

  Diffs between and
  Type of Diff should be a

Sort log by:

Subversion Admin
ViewVC Help
Powered by ViewVC 1.0.9