CLASS  1.1
 Tout Classes Fichiers Fonctions Variables Définitions de type
Référence du fichier IsotopicVector.hxx

Header file for IsotopicVector class. The aim of this Class is to manage any kind of IsotopicVector, and any operation between them : sum, substraction.... Plus de détails...

#include "ZAI.hxx"
#include "TObject.h"
#include <string>
#include <map>
+ Graphe des dépendances par inclusion de IsotopicVector.hxx:
+ Ce graphe montre quels fichiers incluent directement ou indirectement ce fichier :

Aller au code source de ce fichier.

Classes

class  IsotopicVector
 

Définitions de type

typedef long long int cSecond
 

Fonctions

IsotopicVector operator/ (IsotopicVector const &IVA, double F)
 
IsotopicVector operator/ (ZAI const &zai, double F)
 
IsotopicVector operator* (IsotopicVector const &IVA, double F)
 
IsotopicVector operator* (ZAI const &zai, double F)
 
IsotopicVector operator* (double F, IsotopicVector const &IVA)
 
IsotopicVector operator* (double F, ZAI const &zai)
 
IsotopicVector operator+ (IsotopicVector const &IVa, IsotopicVector const &IVb)
 
IsotopicVector operator- (IsotopicVector const &IVa, IsotopicVector const &IVb)
 
double RelativDistance (IsotopicVector IV1, IsotopicVector IV2)
 
double Distance (IsotopicVector IV1, IsotopicVector IV2, int DistanceType=0, IsotopicVector DistanceParameter=IsotopicVector())
 
double DistanceStandard (IsotopicVector IV1, IsotopicVector IV2)
 
double DistanceAdjusted (IsotopicVector IV1, IsotopicVector IV2, IsotopicVector DistanceParameter)
 
double Norme (IsotopicVector IV1, int DistanceType=0, IsotopicVector DistanceParameter=IsotopicVector())
 

Description détaillée

Header file for IsotopicVector class. The aim of this Class is to manage any kind of IsotopicVector, and any operation between them : sum, substraction....

Auteur
BaM, Marc
Version
2.0

Définition dans le fichier IsotopicVector.hxx.

Documentation des définitions de type

typedef long long int cSecond

Définition à la ligne 20 du fichier IsotopicVector.hxx.

Documentation des fonctions

double Distance ( IsotopicVector  IV1,
IsotopicVector  IV2,
int  DistanceType = 0,
IsotopicVector  DistanceParameter = IsotopicVector() 
)

Définition à la ligne 81 du fichier IsotopicVector.cxx.

82 {
83 
84  if(DistanceType==0)
85  {
86  return DistanceStandard(IV1,IV2);
87  }
88  else if(DistanceType==1||DistanceType==2){
89  return DistanceAdjusted(IV1,IV2,DistanceParameter);
90  }
91  else
92  {
93  cout << "!!ERROR!! !!!Distance!!!"
94  << " DistanceType defined by the user isn't recognized by the code"<<endl;
95 
96  exit(1);
97  }
98 
99 }
double DistanceAdjusted ( IsotopicVector  IV1,
IsotopicVector  IV2,
IsotopicVector  DistanceParameter 
)

Définition à la ligne 61 du fichier IsotopicVector.cxx.

62 {
63 
64  double d2=0;
65  IsotopicVector IVtmp = IV1 + IV2;
66  map<ZAI ,double> IVtmpIsotopicQuantity = IVtmp.GetIsotopicQuantity();
67  map<ZAI ,double >::iterator it;
68  for( it = IVtmpIsotopicQuantity.begin(); it != IVtmpIsotopicQuantity.end(); it++)
69  {
70  double Z1 = IV1.GetZAIIsotopicQuantity( (*it).first );
71  double Z2 = IV2.GetZAIIsotopicQuantity( (*it).first );
72  double lambda = DistanceParameter.GetZAIIsotopicQuantity( (*it).first );
73  d2 += lambda*abs(Z1-Z2);
74  }
75  return d2;
76 
77 }
double DistanceStandard ( IsotopicVector  IV1,
IsotopicVector  IV2 
)

Définition à la ligne 45 du fichier IsotopicVector.cxx.

46 {
47 
48  double d2=0;
49  IsotopicVector IVtmp = IV1 + IV2;
50  map<ZAI ,double> IVtmpIsotopicQuantity = IVtmp.GetIsotopicQuantity();
51  map<ZAI ,double >::iterator it;
52  for( it = IVtmpIsotopicQuantity.begin(); it != IVtmpIsotopicQuantity.end(); it++)
53  {
54  double Z1 = IV1.GetZAIIsotopicQuantity( (*it).first );
55  double Z2 = IV2.GetZAIIsotopicQuantity( (*it).first );
56  d2 += pow(Z1-Z2 , 2 );
57  }
58  return sqrt(d2);
59 
60 }
double Norme ( IsotopicVector  IV1,
int  DistanceType = 0,
IsotopicVector  DistanceParameter = IsotopicVector() 
)
IsotopicVector operator* ( IsotopicVector const &  IVA,
double  F 
)

Définition à la ligne 174 du fichier IsotopicVector.cxx.

175 {
176 
177  IsotopicVector IV = IVA;
178  IV.Multiply(F);
179  return IV;
180 }
IsotopicVector operator* ( ZAI const &  zai,
double  F 
)

Définition à la ligne 149 du fichier IsotopicVector.cxx.

150 {
151 
152  IsotopicVector IVtmp;
153 
154  IVtmp.Add( zai, F);
155  return IVtmp;
156 }
IsotopicVector operator* ( double  F,
IsotopicVector const &  IVA 
)

Définition à la ligne 171 du fichier IsotopicVector.cxx.

171 {return IVA*F;}
IsotopicVector operator* ( double  F,
ZAI const &  zai 
)

Définition à la ligne 182 du fichier IsotopicVector.cxx.

182 {return zai*F;}
IsotopicVector operator+ ( IsotopicVector const &  IVa,
IsotopicVector const &  IVb 
)

Définition à la ligne 130 du fichier IsotopicVector.cxx.

131 {
132 
133  IsotopicVector IVtmp;
134  IVtmp = IVa;
135  return IVtmp += IVb;
136 }
IsotopicVector operator- ( IsotopicVector const &  IVa,
IsotopicVector const &  IVb 
)

Définition à la ligne 139 du fichier IsotopicVector.cxx.

140 {
141 
142  IsotopicVector IVtmp;
143  IVtmp = IVa;
144  return IVtmp -= IVb;
145 }
IsotopicVector operator/ ( IsotopicVector const &  IVA,
double  F 
)

Définition à la ligne 185 du fichier IsotopicVector.cxx.

186 {
187 
188  IsotopicVector IV = IVA;
189  IV.Multiply(1./F);
190  return IV;
191 }
IsotopicVector operator/ ( ZAI const &  zai,
double  F 
)

Définition à la ligne 160 du fichier IsotopicVector.cxx.

161 {
162  IsotopicVector IVtmp;
163 
164  IVtmp.Add( zai, 1./F);
165 
166  return IVtmp;
167 }
double RelativDistance ( IsotopicVector  IV1,
IsotopicVector  IV2 
)

Définition à la ligne 102 du fichier IsotopicVector.cxx.

103 {
104 
105  double d2 = 0;
106 
107  IsotopicVector IVtmp = IV1 + IV2;
108  map<ZAI ,double> IVtmpIsotopicQuantity = IVtmp.GetIsotopicQuantity();
109 
110  double Z1total = 0;
111  double Z2total = 0;
112  map<ZAI ,double >::iterator it;
113  for( it = IVtmpIsotopicQuantity.begin(); it != IVtmpIsotopicQuantity.end(); it++)
114  {
115  Z1total += IV1.GetZAIIsotopicQuantity( (*it).first );
116  Z2total += IV2.GetZAIIsotopicQuantity( (*it).first );
117  }
118  for( it = IVtmpIsotopicQuantity.begin(); it != IVtmpIsotopicQuantity.end(); it++)
119  {
120  double Z1 = IV1.GetZAIIsotopicQuantity( (*it).first );
121  double Z2 = IV2.GetZAIIsotopicQuantity( (*it).first );
122  d2 += pow( (Z1/Z1total - Z2/Z2total) , 2 );
123  }
124 
125 
126  return sqrt(d2);
127 }