The code could be cleaner. Couldn’t
givtgjvs + (1-givt)(1-gjvs)
be
not (givt xor gjvs)
xor
or
same givt gjvs
It would clean up the code a lot, and make it less of a hassle to read. I’d also prefer higher order functions to for loops, but that may just be me.
The code is written that way to accomodate the continuous case. I think people who aren’t C or assembly programmers will find the not(xor) more confusing; and people who are programmers will find the second unfamiliar.
I’m mainly saying the code is a bit opaque at the moment.
If you want to keep the continuous case, fine.
As long as you defined the same or similar function somewhere else, programmers would be fine.
Commenting the code would help people get to grips with it, if you don’t want to change it.
Good idea. Comments it is.
The code could be cleaner. Couldn’t
be
or
same givt gjvs
It would clean up the code a lot, and make it less of a hassle to read. I’d also prefer higher order functions to for loops, but that may just be me.
The code is written that way to accomodate the continuous case. I think people who aren’t C or assembly programmers will find the not(xor) more confusing; and people who are programmers will find the second unfamiliar.
I’m mainly saying the code is a bit opaque at the moment.
If you want to keep the continuous case, fine.
As long as you defined the same or similar function somewhere else, programmers would be fine.
Commenting the code would help people get to grips with it, if you don’t want to change it.
Good idea. Comments it is.