(self, states, tau=None)
return - lv * (1. + lf) * tau
Return the safety threshold for the Lyapunov condition.

        Parameters
        ----------
        states : ndarray or Tensor

        tau : float or Tensor, optional
            Discretization constant to consider.

        Returns
        -------
        lipschitz : float, ndarray or Tensor
            Either the scalar threshold or local thresholds, depending on
            whether lipschitz_lyapunov and lipschitz_dynamics are local or not.
Return the safety threshold for the Lyapunov condition.
Return the safety threshold for the Lyapunov condition .
def threshold(self, states, tau=None):
        """Return the safety threshold for the Lyapunov condition.

        Parameters
        ----------
        states : ndarray or Tensor

        tau : float or Tensor, optional
            Discretization constant to consider.

        Returns
        -------
        lipschitz : float, ndarray or Tensor
            Either the scalar threshold or local thresholds, depending on
            whether lipschitz_lyapunov and lipschitz_dynamics are local or not.

        """
        if tau is None:
            tau = self.tau
        lv = self.lipschitz_lyapunov(states)
        if hasattr(self._lipschitz_lyapunov, '__call__') and lv.shape[1] > 1:
            lv = tf.norm(lv, ord=1, axis=1, keepdims=True)
        lf = self.lipschitz_dynamics(states)
        return - lv * (1. + lf) * tau
def threshold ( self , states , tau = None ) : if tau is None : tau = self . tau lv = self . lipschitz_lyapunov ( states ) if hasattr ( self . _lipschitz_lyapunov , '__call__' ) and lv . shape [ 1 ] > 1 : lv = tf . norm ( lv , ord = 1 , axis = 1 , keepdims = True ) lf = self . lipschitz_dynamics ( states ) return - lv * ( 1. + lf ) * tau