With the following Proto expression:
m * v;
with m in the matrix_domain and v in the vector_domain.
vector_domain is a sub-domain of matrix_domain, so the common domain is
We want the '*' operation to model the matrix multiplication.
matrix times vector yields a vector.
Therefore, the result of m * v should be in the vector_domain.
If we define operator* ourselves, then we can easily put the domain we
want when calling proto::make_expr.
However, using Proto-provided operator overloads, this doesn't appear to
Is there a mechanism in Proto to define how the domain of a node new
should be computed depending on the tag and the domains of the children?
proto mailing list