> On Dec 17, 2016, at 9:21 AM, Pedro Carvalho <
pedro...@gmail.com> wrote:
>
> Right, but when I try doing real * vector it gives me the vector / vector error
If you have (real * vector), the result is vector. Same with (vector * real).
You can do (row_vector * vector) and get a real, or (vector * row_vector)
and get a matrix. But you can't do (vector * vector) because the dimensions
don't conform to matrix multiplication.
> (which cannot really be corrected by pointwise division because the vectors' sizes are different),
Do you have a simple example of the types you want
to define and operations you want to perform? We can help
with specifics of error messages.
> and there's also the problem where scale[country] doesn't work because country is a vector (even though what I really mean is scale[country[i]] for every i, as defined in the for loop).
country is going to be an array if it's an index. and if
it's an array of K elements, then scale[country] will also
have K elements, (scale[country[1]], ..., scale[country[K]])
- Bob