stdlib/matrix.rb
#
# Returns the inner product of this vector with the other.
#   Vector[4,7].inner_product Vector[10,1]  => 47
#
Returns the inner product of this vector with the other.
Returns the inner product of this vector with the other .
def inner_product(v)
    Vector.Raise ErrDimensionMismatch if size != v.size
    p = 0
    each2(v) {|v1, v2|
      p += v1 * v2.conj
    }
    p
  end
def inner_product ( v ) Vector . Raise ErrDimensionMismatch if size != v . size p = 0 each2 ( v ) { | v1 , v2 | p += v1 * v2 . conj } p end
Returns the inner product of this vector with the other.
Returns the inner product of this vector with the other .
v
<not_specific>