change order of args to dot.LinearFunction, fix bug in LinearFunction.inverse