A generalisation of Miller's algorithm and applications to pairing computations on abelian varieties. (March 2015)