@staticmethod
def operations(nsteps):
    """Returns the number of operations needed for nsteps of CG"""
    return {'A': 1 + nsteps, 'M': 2 + nsteps, 'Ml': 2 + nsteps, 'Mr': 1 +
        nsteps, 'ip_B': 2 + 2 * nsteps, 'axpy': 2 + 2 * nsteps}
