dizk
dizk copied to clipboard
remove assumption that first column of constraint system is always 1
The edited lines were somewhat restrictive to the assumption that the first column of the constraint system is always 1. This does not appear to be necessary (even when the first component of the input vector is 1). The changes here result in equivalent evaluation for the project's example(s) and enables satisfiability for more general constraints systems.
If there is any particular reason for this that I may have overlooked, please let me know.
As an alternative, equivalent, suggestion
The line
final FieldT value = index == 0 ? one : input.get((int) index).mul(terms.get(i).value());
could also be replaced with
final FieldT value = index == 0 ? one.mul(terms.get(i).value()) : input.get((int) index).mul(terms.get(i).value());
But this doesn't appear to add much value.
This would solve Issue #11.