Class: Google::Apis::DiscoveryengineV1alpha::GoogleApiDistributionBucketOptions
- Inherits:
-
Object
- Object
- Google::Apis::DiscoveryengineV1alpha::GoogleApiDistributionBucketOptions
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/discoveryengine_v1alpha/classes.rb,
lib/google/apis/discoveryengine_v1alpha/representations.rb,
lib/google/apis/discoveryengine_v1alpha/representations.rb
Overview
BucketOptions
describes the bucket boundaries used to create a histogram for
the distribution. The buckets can be in a linear sequence, an exponential
sequence, or each bucket can be specified explicitly. BucketOptions
does not
include the number of values in each bucket. A bucket has an inclusive lower
bound and exclusive upper bound for the values that are counted for that
bucket. The upper bound of a bucket must be strictly greater than the lower
bound. The sequence of N buckets for a distribution consists of an underflow
bucket (number 0), zero or more finite buckets (number 1 through N - 2) and an
overflow bucket (number N - 1). The buckets are contiguous: the lower bound of
bucket i (i > 0) is the same as the upper bound of bucket i - 1. The buckets
span the whole range of finite values: lower bound of the underflow bucket is -
infinity and the upper bound of the overflow bucket is +infinity. The finite
buckets are so-called because both bounds are finite.
Instance Attribute Summary collapse
-
#explicit_buckets ⇒ Google::Apis::DiscoveryengineV1alpha::GoogleApiDistributionBucketOptionsExplicit
Specifies a set of buckets with arbitrary widths.
-
#exponential_buckets ⇒ Google::Apis::DiscoveryengineV1alpha::GoogleApiDistributionBucketOptionsExponential
Specifies an exponential sequence of buckets that have a width that is proportional to the value of the lower bound.
-
#linear_buckets ⇒ Google::Apis::DiscoveryengineV1alpha::GoogleApiDistributionBucketOptionsLinear
Specifies a linear sequence of buckets that all have the same width (except overflow and underflow).
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleApiDistributionBucketOptions
constructor
A new instance of GoogleApiDistributionBucketOptions.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleApiDistributionBucketOptions
Returns a new instance of GoogleApiDistributionBucketOptions.
165 166 167 |
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 165 def initialize(**args) update!(**args) end |
Instance Attribute Details
#explicit_buckets ⇒ Google::Apis::DiscoveryengineV1alpha::GoogleApiDistributionBucketOptionsExplicit
Specifies a set of buckets with arbitrary widths. There are size(bounds) + 1
(= N) buckets. Bucket i
has the following boundaries: Upper bound (0 <= i <
N-1): bounds[i] Lower bound (1 <= i < N); bounds[i - 1] The bounds
field
must contain at least one element. If bounds
has only one element, then
there are no finite buckets, and that single element is the common boundary of
the overflow and underflow buckets.
Corresponds to the JSON property explicitBuckets
143 144 145 |
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 143 def explicit_buckets @explicit_buckets end |
#exponential_buckets ⇒ Google::Apis::DiscoveryengineV1alpha::GoogleApiDistributionBucketOptionsExponential
Specifies an exponential sequence of buckets that have a width that is
proportional to the value of the lower bound. Each bucket represents a
constant relative uncertainty on a specific value in the bucket. There are
num_finite_buckets + 2
(= N) buckets. Bucket i
has the following boundaries:
Upper bound (0 <= i < N-1): scale * (growth_factor ^ i). Lower bound (1 <= i <
N): scale * (growth_factor ^ (i - 1)).
Corresponds to the JSON property exponentialBuckets
153 154 155 |
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 153 def exponential_buckets @exponential_buckets end |
#linear_buckets ⇒ Google::Apis::DiscoveryengineV1alpha::GoogleApiDistributionBucketOptionsLinear
Specifies a linear sequence of buckets that all have the same width (except overflow and underflow). Each bucket represents a constant absolute uncertainty on the specific value in the bucket. There are `num_finite_buckets
- 2
(= N) buckets. Bucket
i` has the following boundaries: Upper bound (0 <= i < N-1): offset + (width * i). Lower bound (1 <= i < N): offset + (width * (i - 1)).
Corresponds to the JSON property
linearBuckets
163 164 165 |
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 163 def linear_buckets @linear_buckets end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
170 171 172 173 174 |
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 170 def update!(**args) @explicit_buckets = args[:explicit_buckets] if args.key?(:explicit_buckets) @exponential_buckets = args[:exponential_buckets] if args.key?(:exponential_buckets) @linear_buckets = args[:linear_buckets] if args.key?(:linear_buckets) end |