UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
fb_weight.hpp
1 /* fb_weight.hpp */
2 /* $Id: fb_weight.hpp 21750 2012-08-15 06:58:39Z hoot $ */
3 #ifndef __FB_Weight_hpp
4 #define __FB_Weight_hpp
5 
6 #include <map>
7 #include <utility>
8 #include <stdio.h>
9 
10 struct FBWeight
11 {
12  enum ProbType
13  {
14  EN = 0,
15  CSC,
16  CRC,
17  CDC,
18  COC,
19  SPEC,
20  POL
21  };
22 
23 
24  FBWeight(){
25  EnergyW = 0.;
26  CsCorrW = 0.;
27  CrCorrW = 0.;
28  CdCorrW = 0.;
29  CoCorrW = 0.;
30  SpectrW = 0.;
31  PolarW = 0.;
32  CsVelW = 0.;
33  CrVelW = 0.;
34  CdVelW = 0.;
35  CoVelW = 0.;
36  };
37 
38  void operator /= (const float &val)
39  {
40  if(0. != val)
41  {
42  EnergyW/=val;
43  CsCorrW/=val; CrCorrW/=val; CdCorrW/=val; CoCorrW/=val;
44  SpectrW/=val;
45  PolarW/=val;
46  CsVelW/=val; CrVelW/=val; CdVelW/=val; CoVelW/=val; }
47  else
48  { EnergyW = 0.;
49  CsCorrW = 0.; CrCorrW = 0.; CdCorrW = 0.; CoCorrW = 0.;
50  SpectrW = 0.;
51  PolarW = 0.;
52  CsVelW = 0.; CrVelW = 0.; CdVelW = 0.; CoVelW = 0.;}
53 
54  //printf("FBWeight::info: EnergyW = %g, CsCorrW = %g, CrCorrW = %g, CdCorrW = %g, CoCorrW = %g, SpectrW = %g\n",
55  // EnergyW, CsCorrW, CrCorrW, CdCorrW, CoCorrW, SpectrW);
56 
57  };
58  // identification of trace
59  int NSP;
60  int NRP;
61  int NDP;
62  char COMP;
63 
64 
65  float EnergyW; //* Weight of energy gradient factor*/
66 
67  float CsCorrW; //* Weight of correlation gradient factor in CS os type*/
68  float CrCorrW; //* Weight of correlation gradient factor in CR os type*/
69  float CdCorrW; //* Weight of correlation gradient factor in CD os type*/
70  float CoCorrW; //* Weight of correlation gradient factor in CO os type*/
71 
72  float SpectrW; //* Weight of ACF factor*/
73  float PolarW; //* Weight of Polarisation factor*/
74 
75  float CsVelW; //* Weight of time gradient factor in CS os type*/
76  float CrVelW; //* Weight of time gradient factor in CS os type*/
77  float CdVelW; //* Weight of time gradient factor in CS os type*/
78  float CoVelW; //* Weight of time gradient factor in CS os type*/
79 
80 };
81 
82 typedef std::pair<int, int> FBW_key;
83 
84 typedef std::map< FBW_key, FBWeight > FBW_Ar;
85 
86 
87 #endif /* fb_weight.hpp */
Definition: fb_weight.hpp:10