OpendTect  6.6
stattype.h
Go to the documentation of this file.
1 #pragma once
2 /*+
3 ________________________________________________________________________
4 
5  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
6  Author: Bert Bril
7  Date: Sep 2006
8  RCS: $Id$
9 ________________________________________________________________________
10 
11 -*/
12 
13 #include "enums.h"
14 #include "algomod.h"
15 
16 namespace Stats
17 {
18 
19  /* One-dimensional statistical properties of value series */
20 enum Type
21 {
27  MostFreq
28 };
30 
31  /* When resampling a denser sampling */
32 enum UpscaleType
33 {
34  TakeNearest,
35  UseAvg, UseMed, UseRMS, UseMostFreq
36 };
37 mDeclareNameSpaceEnumUtils(Algo,UpscaleType)
38 
39 inline Type typeFor( UpscaleType ut )
40 {
41  return ut == UseAvg ? Average
42  : (ut == UseRMS ? RMS
43  : (ut == UseMostFreq ? MostFreq
44  : Median));
45 }
46 
47 inline UpscaleType upscaleTypeFor( Type st )
48 {
49  return st == Average ? UseAvg
50  : (st == RMS ? UseRMS
51  : (st == MostFreq ? UseMostFreq
52  : (st == Median ? UseMed
53  : TakeNearest)));
54 }
55 
56 
57 }; // namespace Stats
58 
59 
Stats::Sum
@ Sum
Definition: stattype.h:26
Stats::Median
@ Median
Definition: stattype.h:23
Stats::Average
@ Average
Definition: stattype.h:23
Stats::Count
@ Count
Definition: stattype.h:22
Stats::MostFreq
@ MostFreq
Definition: stattype.h:27
Stats::upscaleTypeFor
UpscaleType upscaleTypeFor(Type st)
Definition: stattype.h:47
Stats::StdDev
@ StdDev
Definition: stattype.h:24
Stats::Type
Type
Definition: stattype.h:21
Stats::NormVariance
@ NormVariance
Definition: stattype.h:24
Stats::RMS
@ RMS
Definition: stattype.h:23
Stats::Variance
@ Variance
Definition: stattype.h:24
Stats::mDeclareNameSpaceEnumUtils
mDeclareNameSpaceEnumUtils(Algo, Type) enum UpscaleType
Definition: stattype.h:29
Stats::SqSum
@ SqSum
Definition: stattype.h:26
Stats::Min
@ Min
Definition: stattype.h:25
enums.h
Stats
Statistics.
Definition: array2dinterpol.h:27
Stats::Max
@ Max
Definition: stattype.h:25
Stats::Extreme
@ Extreme
Definition: stattype.h:25

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B.V. 1995-2021