Class: DTW::Barycenter

Inherits:
Data
  • Object
show all
Defined in:
lib/dtwrb/barycenter.rb,
sig/dtwrb.rbs

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#centerObject (readonly)

Returns the value of attribute center

Returns:

  • (Object)

    the current value of center



4
5
6
# File 'lib/dtwrb/barycenter.rb', line 4

def center
  @center
end

#countObject (readonly)

Returns the value of attribute count

Returns:

  • (Object)

    the current value of count



4
5
6
# File 'lib/dtwrb/barycenter.rb', line 4

def count
  @count
end

#dispersionObject (readonly)

Returns the value of attribute dispersion

Returns:

  • (Object)

    the current value of dispersion



4
5
6
# File 'lib/dtwrb/barycenter.rb', line 4

def dispersion
  @dispersion
end

Class Method Details

.newBarycenter

Parameters:

  • center: (::Array[untyped])
  • dispersion: (::Array[untyped])
  • count: (::Integer)

Returns:



172
# File 'sig/dtwrb.rbs', line 172

def self.new: (center: ::Array[untyped], dispersion: ::Array[untyped], count: ::Integer) -> Barycenter

Instance Method Details

#dimension::Integer

Returns:

  • (::Integer)


7
8
9
10
# File 'lib/dtwrb/barycenter.rb', line 7

def dimension
  frame = center.first
  frame.is_a?(Array) ? frame.length : 1
end

#length::Integer

Returns:

  • (::Integer)


5
# File 'lib/dtwrb/barycenter.rb', line 5

def length = center.length

#scalar?Boolean

Returns:

  • (Boolean)


12
# File 'lib/dtwrb/barycenter.rb', line 12

def scalar? = !center.first.is_a?(Array)

#to_h::Hash[::Symbol, untyped]

Returns:

  • (::Hash[::Symbol, untyped])


177
# File 'sig/dtwrb.rbs', line 177

def to_h: () -> ::Hash[::Symbol, untyped]

#withBarycenter

Parameters:

  • (Object)

Returns:



176
# File 'sig/dtwrb.rbs', line 176

def with: (**untyped) -> Barycenter