Class: Google::Apis::FileV1beta1::Distribution

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/file_v1beta1/classes.rb,
generated/google/apis/file_v1beta1/representations.rb,
generated/google/apis/file_v1beta1/representations.rb

Overview

Distribution represents a frequency distribution of double-valued sample points. It contains the size of the population of sample points plus additional optional information:

  • the arithmetic mean of the samples
  • the minimum and maximum of the samples
  • the sum-squared-deviation of the samples, used to compute variance
  • a histogram of the values of the sample points

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Distribution

Returns a new instance of Distribution.



198
199
200
# File 'generated/google/apis/file_v1beta1/classes.rb', line 198

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#bucket_countsArray<Fixnum>

The number of samples in each histogram bucket. bucket_counts are optional. If present, they must sum to the count value. The buckets are defined below in bucket_option. There are N buckets. bucket_counts[0] is the number of samples in the underflow bucket. bucket_counts[1] to bucket_counts[N-1] are the numbers of samples in each of the finite buckets. And bucket_counts[N] is the number of samples in the overflow bucket. See the comments ofbucket_option below for more details. Any suffix of trailing zeros may be omitted. Corresponds to the JSON propertybucketCounts`

Returns:

  • (Array<Fixnum>)


147
148
149
# File 'generated/google/apis/file_v1beta1/classes.rb', line 147

def bucket_counts
  @bucket_counts
end

#countFixnum

The total number of samples in the distribution. Must be >= 0. Corresponds to the JSON property count

Returns:

  • (Fixnum)


152
153
154
# File 'generated/google/apis/file_v1beta1/classes.rb', line 152

def count
  @count
end

#exemplarsArray<Google::Apis::FileV1beta1::Exemplar>

Example points. Must be in increasing order of value field. Corresponds to the JSON property exemplars



157
158
159
# File 'generated/google/apis/file_v1beta1/classes.rb', line 157

def exemplars
  @exemplars
end

#explicit_bucketsGoogle::Apis::FileV1beta1::ExplicitBuckets

Describing buckets with arbitrary user-provided width. Corresponds to the JSON property explicitBuckets



162
163
164
# File 'generated/google/apis/file_v1beta1/classes.rb', line 162

def explicit_buckets
  @explicit_buckets
end

#exponential_bucketsGoogle::Apis::FileV1beta1::ExponentialBuckets

Describing buckets with exponentially growing width. Corresponds to the JSON property exponentialBuckets



167
168
169
# File 'generated/google/apis/file_v1beta1/classes.rb', line 167

def exponential_buckets
  @exponential_buckets
end

#linear_bucketsGoogle::Apis::FileV1beta1::LinearBuckets

Describing buckets with constant width. Corresponds to the JSON property linearBuckets



172
173
174
# File 'generated/google/apis/file_v1beta1/classes.rb', line 172

def linear_buckets
  @linear_buckets
end

#maximumFloat

The maximum of the population of values. Ignored if count is zero. Corresponds to the JSON property maximum

Returns:

  • (Float)


177
178
179
# File 'generated/google/apis/file_v1beta1/classes.rb', line 177

def maximum
  @maximum
end

#meanFloat

The arithmetic mean of the samples in the distribution. If count is zero then this field must be zero. Corresponds to the JSON property mean

Returns:

  • (Float)


183
184
185
# File 'generated/google/apis/file_v1beta1/classes.rb', line 183

def mean
  @mean
end

#minimumFloat

The minimum of the population of values. Ignored if count is zero. Corresponds to the JSON property minimum

Returns:

  • (Float)


188
189
190
# File 'generated/google/apis/file_v1beta1/classes.rb', line 188

def minimum
  @minimum
end

#sum_of_squared_deviationFloat

The sum of squared deviations from the mean: Sumi=1..count where each x_i is a sample values. If count is zero then this field must be zero, otherwise validation of the request fails. Corresponds to the JSON property sumOfSquaredDeviation

Returns:

  • (Float)


196
197
198
# File 'generated/google/apis/file_v1beta1/classes.rb', line 196

def sum_of_squared_deviation
  @sum_of_squared_deviation
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



203
204
205
206
207
208
209
210
211
212
213
214
# File 'generated/google/apis/file_v1beta1/classes.rb', line 203

def update!(**args)
  @bucket_counts = args[:bucket_counts] if args.key?(:bucket_counts)
  @count = args[:count] if args.key?(:count)
  @exemplars = args[:exemplars] if args.key?(:exemplars)
  @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)
  @maximum = args[:maximum] if args.key?(:maximum)
  @mean = args[:mean] if args.key?(:mean)
  @minimum = args[:minimum] if args.key?(:minimum)
  @sum_of_squared_deviation = args[:sum_of_squared_deviation] if args.key?(:sum_of_squared_deviation)
end