#include <EdbMath.h>
|
| static Double_t | BuildValue (Int_t major, Int_t minor) |
| |
◆ TIndex2() [1/2]
◆ TIndex2() [2/2]
| TIndex2::TIndex2 |
( |
int |
size | ) |
|
|
inline |
◆ ~TIndex2()
| virtual TIndex2::~TIndex2 |
( |
| ) |
|
|
inlinevirtual |
◆ BuildIndex()
| void TIndex2::BuildIndex |
( |
int |
n, |
|
|
double * |
w |
|
) |
| |
361 Int_t *ind =
new Int_t[n];
362 TMath::Sort(n,
w,ind,0);
364 for (Int_t i=0;i<n;i++) {
365 (*this)[i] =
w[ind[i]];
void w(int rid=2, int nviews=2)
Definition: test.C:27
◆ BuildValue()
| static Double_t TIndex2::BuildValue |
( |
Int_t |
major, |
|
|
Int_t |
minor |
|
) |
| |
|
inlinestatic |
57 {
return major+minor*1e-9;}
◆ Find()
| Int_t TIndex2::Find |
( |
Int_t |
major, |
|
|
Int_t |
minor |
|
) |
| |
372 if (GetSize()<1)
return -1;
374 Int_t i = TMath::BinarySearch( fN, GetArray(), value);
375 if (i < 0)
return -1;
376 if (TMath::Abs((*
this)[i] - value) > 1.e-10)
return -1;
static Double_t BuildValue(Int_t major, Int_t minor)
Definition: EdbMath.h:57
◆ FindIndex()
| Int_t TIndex2::FindIndex |
( |
Int_t |
major | ) |
|
385 Double_t value = (Double_t)major;
386 Int_t i = TMath::BinarySearch( fN, GetArray(), value);
387 if (i < -1)
return -1;
389 if(i>fN-1)
return -1;
390 if( (*
this)[i]<major ) i++;
391 if(i>fN-1)
return -1;
392 if (TMath::Abs((*
this)[i] - value) > .5)
return -1;
393 return (Int_t)( ((*this)[i]-value+1e-10)*1e+9 );
◆ FindIndexArr()
| Int_t TIndex2::FindIndexArr |
( |
Int_t |
major, |
|
|
TArrayI & |
mina |
|
) |
| |
403 Double_t value = (Double_t)major;
404 Int_t i = TMath::BinarySearch( fN, GetArray(), value);
405 if (i < -1)
return -1;
407 if(i>fN-1)
return -1;
408 if( (*
this)[i]<major ) i++;
409 if(i>fN-1)
return -1;
410 if (TMath::Abs((*
this)[i] - value) > .5)
return -1;
414 for(ia=0; ia<na; ia++) {
415 if( (*
this)[i+ia] > value+1-1e-10 )
break;
416 mina[ia] = (Int_t)( ((*
this)[i+ia]-value+1e-10)*1e+9 );
◆ Major()
| Int_t TIndex2::Major |
( |
int |
i | ) |
|
|
inline |
60 {
return (Int_t)((*this)[i]); }
◆ Minor()
| Int_t TIndex2::Minor |
( |
int |
i | ) |
|
|
inline |
61 {
return (Int_t)(((*this)[i]- (Double_t)
Major(i)+1e-10)*1e+9 ); }
Int_t Major(int i)
Definition: EdbMath.h:60
◆ Print()
424 for(
int i=0; i<fN; i++)
Int_t Minor(int i)
Definition: EdbMath.h:61
◆ SetMinor()
| void TIndex2::SetMinor |
( |
int |
i, |
|
|
Int_t |
minor |
|
) |
| |
|
inline |
The documentation for this class was generated from the following files: