elementwise operator names

21 views
Skip to first unread message

David Hall

unread,
Jan 16, 2016, 3:02:20 PM1/16/16
to scala-...@googlegroups.com
As most of you know, Breeze uses operators like :* to denote elementwise operations. This is in analogy to .* from Matlab.

Unfortunately, in Scala, operator precedence is decided by the first character of the operator. This leads to a lot of bugs like, a :- b :* c does not evaluate as a :- (b :* c), as you would probably expect.

I'd like to fix this by renaming the operators. I'm inclined to go with *:*, -:-, etc.

What do you think?

-- David

Wei

unread,
Jan 30, 2016, 7:41:03 PM1/30/16
to Scala Breeze
Sounds a good idea to me. For elementwise and(or), can we just use a & b (a | b)?
Reply all
Reply to author
Forward
0 new messages