return new Affine(finalState, a.reciprocal(), Rational.MINUS_ONE.times(b.dividedBy(a)));
}
public Affine of(Affine other, Rational newInitialState) throws OperationException {
if (!other.finalState.equals(newInitialState)) {
throw new OperationException("Op " + this + " cannot compose with op " + other);
}
return new Affine(other.initialState, a.times(other.a), a.times(other.b).plus(b));
}