-
Notifications
You must be signed in to change notification settings - Fork 216
/
xtodo.txt
70 lines (62 loc) · 2.23 KB
/
xtodo.txt
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
----------------------------------------------------------------
* look at: mr -vvv test/cases/io-spec-tsv/0004/cmd
----------------------------------------------------------------
func (keeper *PercentileKeeper) EmitNamed(name string) *mlrval.Mlrval {
if name == "min" {
return keeper.EmitNonInterpolated(0.0)
} else if name == "p25" {
return keeper.EmitNonInterpolated(25.0)
} else if name == "median" {
return keeper.EmitNonInterpolated(50.0)
} else if name == "p75" {
return keeper.EmitNonInterpolated(75.0)
} else if name == "max" {
return keeper.EmitNonInterpolated(100.0)
} else if name == "iqr" {
p25 := keeper.EmitNonInterpolated(25.0)
p75 := keeper.EmitNonInterpolated(75.0)
if p25.IsNumeric() && p75.IsNumeric() {
return bifs.BIF_minus_binary(p75, p25)
} else {
return mlrval.VOID
}
} else if name == "lof" {
p25 := keeper.EmitNonInterpolated(25.0)
iqr := keeper.EmitNamed("iqr")
if p25.IsNumeric() && iqr.IsNumeric() {
return bifs.BIF_minus_binary(p25, bifs.BIF_times(fenceOuterK, iqr))
} else {
return mlrval.VOID
}
} else if name == "lif" {
p25 := keeper.EmitNonInterpolated(25.0)
iqr := keeper.EmitNamed("iqr")
if p25.IsNumeric() && iqr.IsNumeric() {
return bifs.BIF_minus_binary(p25, bifs.BIF_times(fenceInnerK, iqr))
} else {
return mlrval.VOID
}
} else if name == "uif" {
p75 := keeper.EmitNonInterpolated(75.0)
iqr := keeper.EmitNamed("iqr")
if p75.IsNumeric() && iqr.IsNumeric() {
return bifs.BIF_plus_binary(p75, bifs.BIF_times(fenceInnerK, iqr))
} else {
return mlrval.VOID
}
} else if name == "uof" {
p75 := keeper.EmitNonInterpolated(75.0)
iqr := keeper.EmitNamed("iqr")
if p75.IsNumeric() && iqr.IsNumeric() {
return bifs.BIF_plus_binary(p75, bifs.BIF_times(fenceOuterK, iqr))
} else {
return mlrval.VOID
}
} else {
return mlrval.FromError(
errors.New(
"stats1: unrecognized
),
)
}
}