Estimate time needed to run nsteps iterations with deflation

        Uses timings from :py:attr:`linear_system` if it is an instance of
        :py:class:`~krypy.linsys.TimedLinearSystem`. Otherwise, an
        :py:class:`~krypy.utils.OtherError`
        is raised.

        :param nsteps: number of iterations.
        :param ndefl: number of deflation vectors.
        :param deflweight: (optional) the time for the setup and application of
          the projection for deflation is multiplied by this factor. This can
          be used as a counter measure for the evaluation of Ritz vectors.
          Defaults to 1.

def estimate_time(self, nsteps, ndefl, deflweight=1.0):
        '''Estimate time needed to run nsteps iterations with deflation

        Uses timings from :py:attr:`linear_system` if it is an instance of
        :py:class:`~krypy.linsys.TimedLinearSystem`. Otherwise, an
        :py:class:`~krypy.utils.OtherError`
        is raised.

        :param nsteps: number of iterations.
        :param ndefl: number of deflation vectors.
        :param deflweight: (optional) the time for the setup and application of
          the projection for deflation is multiplied by this factor. This can
          be used as a counter measure for the evaluation of Ritz vectors.
          Defaults to 1.
        '''
        # get ops for nsteps of this solver
        solver_ops = self.operations(nsteps)

        # define ops for deflation setup + application with ndefl deflation
        # vectors
        proj_ops = {'A': ndefl,
                    'M': ndefl,
                    'Ml': ndefl,
                    'Mr': ndefl,
                    'ip_B': (ndefl*(ndefl+1)/2
                             + ndefl**2 + 2*ndefl*solver_ops['Ml']),
                    'axpy': (ndefl*(ndefl+1)/2 + ndefl*ndefl
                             + (2*ndefl+2)*solver_ops['Ml'])
                    }

        # get timings from linear_system
        if not isinstance(self.linear_system, linsys.TimedLinearSystem):
            raise utils.RuntimeError(
                'A `TimedLinearSystem` has to be used in order to obtain '
                'timings.')
        timings = self.linear_system.timings

        return (timings.get_ops(solver_ops)
                + deflweight*timings.get_ops(proj_ops))