/usr/include/root/TPrincipal.h is in libroot-hist-dev 5.34.14-1build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | // @(#)root/hist:$Id$
// Author: Christian Holm Christensen 1/8/2000
/*************************************************************************
* Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. *
* All rights reserved. *
* *
* For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/
#ifndef ROOT_TPrincipal
#define ROOT_TPrincipal
#ifndef ROOT_TNamed
#include "TNamed.h"
#endif
#ifndef ROOT_TVectorD
#include "TVectorD.h"
#endif
#ifndef ROOT_TMatrixD
#include "TMatrixD.h"
#endif
#ifndef ROOT_TList
#include "TList.h"
#endif
class TPrincipal : public TNamed {
protected:
Int_t fNumberOfDataPoints; // Number of data points
Int_t fNumberOfVariables; // Number of variables
TVectorD fMeanValues; // Mean value over all data points
TVectorD fSigmas; // vector of sigmas
TMatrixD fCovarianceMatrix; // Covariance matrix
TMatrixD fEigenVectors; // Eigenvector matrix of trans
TVectorD fEigenValues; // Eigenvalue vector of trans
TVectorD fOffDiagonal; // elements of the tridiagonal
TVectorD fUserData; // Vector of original data points
Double_t fTrace; // Trace of covarience matrix
TList *fHistograms; // List of histograms
Bool_t fIsNormalised; // Normalize matrix?
Bool_t fStoreData; // Should we store input data?
TPrincipal(const TPrincipal&);
TPrincipal& operator=(const TPrincipal&);
void MakeNormalised();
void MakeRealCode(const char *filename, const char *prefix, Option_t *option="");
public:
TPrincipal();
virtual ~TPrincipal();
TPrincipal(Int_t nVariables, Option_t *opt="ND");
virtual void AddRow(const Double_t *x);
virtual void Browse(TBrowser *b);
virtual void Clear(Option_t *option="");
const TMatrixD *GetCovarianceMatrix() const {return &fCovarianceMatrix;}
const TVectorD *GetEigenValues() const {return &fEigenValues;}
const TMatrixD *GetEigenVectors() const {return &fEigenVectors;}
TList *GetHistograms() const {return fHistograms;}
const TVectorD *GetMeanValues() const {return &fMeanValues;}
const Double_t *GetRow(Int_t row);
const TVectorD *GetSigmas() const {return &fSigmas;}
const TVectorD *GetUserData() const {return &fUserData;}
Bool_t IsFolder() const { return kTRUE;}
virtual void MakeCode(const char *filename ="pca", Option_t *option=""); // *MENU*
virtual void MakeHistograms(const char *name = "pca", Option_t *option="epsdx"); // *MENU*
virtual void MakeMethods(const char *classname = "PCA", Option_t *option=""); // *MENU*
virtual void MakePrincipals(); // *MENU*
virtual void P2X(const Double_t *p, Double_t *x, Int_t nTest);
virtual void Print(Option_t *opt="MSE") const; // *MENU*
virtual void SumOfSquareResiduals(const Double_t *x, Double_t *s);
void Test(Option_t *option=""); // *MENU*
virtual void X2P(const Double_t *x, Double_t *p);
ClassDef(TPrincipal,2) // Principal Components Analysis
}
;
#endif
|