Ejemplo n.º 1
0
    def __init__(self, n, npairs=5, **kwargs):
        """
        See the documentation of `InverseLBFGS` for complete information.

        :keywords:
            :vars: List of variables participating in the quasi-Newton
                   update. If `None`, all variables participate.
        """
        self.on = n  # Original value of n.
        self.vars = kwargs.get('vars', None)  # None means all variables.
        if self.vars is None:
            nvars = n
        else:
            nvars = len(self.vars)

        # This next initialization will set self.n to nvars.
        # The original value of n was saved in self.on.
        InverseLBFGS.__init__(self, nvars, npairs, **kwargs)
Ejemplo n.º 2
0
Archivo: ldfp.py Proyecto: joeywen/nlpy
    def __init__(self, n, npairs=5, **kwargs):
        """
        See the documentation of `InverseLBFGS` for complete information.

        :keywords:
            :vars: List of variables participating in the quasi-Newton
                   update. If `None`, all variables participate.
        """
        self.on = n   # Original value of n.
        self.vars = kwargs.get('vars', None)  # None means all variables.
        if self.vars is None:
            nvars = n
        else:
            nvars = len(self.vars)

        # This next initialization will set self.n to nvars.
        # The original value of n was saved in self.on.
        InverseLBFGS.__init__(self, nvars, npairs, **kwargs)
Ejemplo n.º 3
0
 def __init__(self, n, npairs=5, **kwargs):
     InverseLBFGS.__init__(self, n, npairs, **kwargs)
Ejemplo n.º 4
0
Archivo: ldfp.py Proyecto: b45ch1/nlpy
 def __init__(self, n, npairs=5, **kwargs):
     InverseLBFGS.__init__(self, n, npairs, **kwargs)