Ranking Templates for Linear Loops (Logical Methods in Computer Science, 2015)