locked
How to get inner product of 2 VariableArray<double>? RRS feed

  • Question

  •     var a = Variable.Array<double>(range)
        var b = Variable.Array<double>(range)
        var c = Variable.Sum(a.[range] * b.[range])

    There seems to be a type error.

    One alternative approach I can think of is to convert one of a or b into a vector, and then do inner product? I don't know if it would work correctly as Variable.InnerProduct(VariableArray<double>, Vector) doesn't use range at all.

    Thursday, October 16, 2014 12:04 PM

Answers

All replies