class Vector
We do this for speedier simulations, otherwise Vector is immutable.
Public Instance Methods
[]=(i, v)
click to toggle source
# File neater/rnlib/inverted_pendulum.rb, line 48 def []=(i, v) @elements[i] = v end
basis(v)
click to toggle source
Given that self vector is a basis vector, compute the component vector for v.
# File neater/rnlib/inverted_pendulum.rb, line 54 def basis(v) self * self.inner_product(v) end