Class: Google::Apis::DataflowV1b3::Base2Exponent

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

Overview

Exponential buckets where the growth factor between buckets is 2**(2**-scale) . e.g. for scale=1 growth factor is 2**(2**(-1))=sqrt(2). n buckets will have the following boundaries. - 0th: [0, gf) - i in [1, n-1]: [gf^(i), gf^(i+ 1))

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Base2Exponent

Returns a new instance of Base2Exponent.



231
232
233
# File 'lib/google/apis/dataflow_v1b3/classes.rb', line 231

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

Instance Attribute Details

#number_of_bucketsFixnum

Must be greater than 0. Corresponds to the JSON property numberOfBuckets

Returns:

  • (Fixnum)


223
224
225
# File 'lib/google/apis/dataflow_v1b3/classes.rb', line 223

def number_of_buckets
  @number_of_buckets
end

#scaleFixnum

Must be between -3 and 3. This forces the growth factor of the bucket boundaries to be between 2^(1/8) and 256. Corresponds to the JSON property scale

Returns:

  • (Fixnum)


229
230
231
# File 'lib/google/apis/dataflow_v1b3/classes.rb', line 229

def scale
  @scale
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



236
237
238
239
# File 'lib/google/apis/dataflow_v1b3/classes.rb', line 236

def update!(**args)
  @number_of_buckets = args[:number_of_buckets] if args.key?(:number_of_buckets)
  @scale = args[:scale] if args.key?(:scale)
end