-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathjoint_distribution.proto
61 lines (53 loc) · 2.14 KB
/
joint_distribution.proto
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
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto2";
package distbench;
message DataPoint {
// Exact value.
optional int64 exact = 1;
// Range of values inclusive of upper and lower limits.
optional int64 upper = 3;
optional int64 lower = 4;
}
// This is used to define the probility mass function (PMF) of a distribution.
message PmfPoint {
optional float pmf = 1;
// One entry for each dimension of the joint distribution:
repeated DataPoint data_points = 2;
}
// This can be used to define the cumulative distribution function (CDF) of
// a distribution. However, if the first point's cdf value is equal to zero,
// then the distribution is interpreted as piece-wise uniform with the
// first point defining the lower bound of the first interval, and the
// lower bound of each subsequent interval being (the previous value + 1)
// automatically.
// E.g. values of 5, 10, 25, 40 would
// define inclusive intervals of [5, 10], [11, 25], [26, 40].
// Note that N points define N-1 intervals.
message CdfPoint {
optional float cdf = 1;
optional int64 value = 2;
}
// This describes a (possibly) multi-dimensional joint distribution.
// For convenience it is possible to describe a 1D distribution as a CDF.
// For the more general multi-dimensional case, each pmf point can describe
// multiple dimensions of the distribution independently, with the meaning of
// each dimension being described by the coresponding field_names.
message DistributionConfig {
optional string name = 1;
repeated PmfPoint pmf_points = 2;
repeated CdfPoint cdf_points = 3;
repeated string field_names = 5;
reserved 4;
}