projects/nnum/interpolation/lagrangian.py
def l(self, i, t, indices):
        """Calculate the discreet Dirac Delta.

        :param i:
            The index L_i. References the current landmark.

        :param t:
            The point of interest for prediction.

        :return:
            :float: the value L_i(t).
        """
        l = 1

        for j in indices:
            if i == j:
                continue

            l *= ((t - self.X[j]) / (self.X[i] - self.X[j]))[0]

        return l
Calculate the discreet Dirac Delta.

        :param i:
            The index L_i. References the current landmark.

        :param t:
            The point of interest for prediction.

        :return:
            :float: the value L_i(t).
        
Calculate the discreet Dirac Delta.
Calculate the discreet Dirac Delta .
def l(self, i, t, indices):
        l = 1
        for j in indices:
            if i == j:
                continue
            l *= ((t - self.X[j]) / (self.X[i] - self.X[j]))[0]
        return l
def l ( self , i , t , indices ) : l = 1 for j in indices : if i == j : continue l *= ( ( t - self . X [ j ] ) / ( self . X [ i ] - self . X [ j ] ) ) [ 0 ] return l
Calculate the discreet Dirac Delta.
Calculate the discreet Dirac Delta .
"""Calculate the discreet Dirac Delta.

        :param i:
            The index L_i. References the current landmark.

        :param t:
            The point of interest for prediction.

        :return:
            :float: the value L_i(t).
        """
:float: the value L_i(t).
: float : the value L_i ( t ) .
self
i
The index L_i. References the current landmark.
The index L_i . References the current landmark .
t
The point of interest for prediction.
The point of interest for prediction .
indices