Ajoute le radical r de numéro i à la map des radicaux du lemme.

        :param i: Index de radical
        :type i: int
        :param r: Radical à ajouter
        :type r: Radical
321106
def ajRadical(self, i, r=None):
        
        if r:
            self._radicaux[i].append(r)
174251
def par_u1step(i):
    
    """

    global mp_U1
    grpind = slice(mp_grp[i], mp_grp[i+1])
    mp_U1[grpind] += mp_alpha*(mp_X[grpind] - mp_Y1[grpind])
480117
def _R2deriv(self,R,phi=0.,t=0.):
        
        return self._Pot.R2deriv(R,0.,phi=phi,t=t,use_physical=False)
341225
def ncr(n, r):
    
    r = min(r, n - r)
    numer = reduce(op.mul, range(n, n - r, -1), 1)
    denom = reduce(op.mul, range(1, r + 1), 1)
    return numer // denom
820794
def map(self, callable):
        
        for k,v in self.iteritems():
            self[k] = callable(v)
623444
def rdist(x, y):
    
    result = 0.0
    for i in range(x.shape[0]):
        result += (x[i] - y[i]) ** 2

    return result
916136
def get_raw_index(self, i):
        
        if self.is_indexed:
            return int(self.order[i])
        if self.data.base is None:
            return int(i)
        return int(self.data_start - self.base_start + i)
182050
def index(elem):
    '''
    
    '''
    parent = elem.getparent()
    for x in range(0, len(parent.getchildren())):
        if parent.getchildren()[x] == elem:
            return x
    return -1
125924
def assign_rotatable(mol):
    """"""
    mol.require("Valence")
    mol.require("Topology")
    bs = set([(u, v) for u, v, _ in mol.bonds_iter()])
    for r in mol.rings:
        for a, b in iterator.consecutive(r + [r[0]], 2):
            bs -= {(a, b)}
            bs -= {(b, a)}
    for u, v in bs:
        unc = mol.neighbor_count(u)
        vnc = mol.neighbor_count(v)
        bc = mol.bond(u, v).order
        if bc == 1 and (unc > 1 and vnc > 1):
            mol.bond(u, v).rotatable = True
    mol.descriptors.add("Rotatable")
1202093
private double rdist(double[] x1, double[] x2) {
        double d = 0.0;
        for (int i = 0; i < x1.length; i++) {
            double t = x1[i] - x2[i];
            d += t * t;
        }
        return Math.sqrt(d);
    }
1220964
def _ixs(self, i, axis=0):
        
        label = self.index[i]
        if isinstance(label, Index):
            return self.take(i, axis=axis)
        else:
            return self._get_val_at(i)
943910
def gep(self, i):
        
        if not isinstance(i.type, IntType):
            raise TypeError(i.type)
        return self.elements[i.constant]
483035
def LDRH(self, params):
        
        try:
            Ra, Rb, Rc = self.get_three_parameters(self.THREE_PARAMETER_WITH_BRACKETS, params)
        except iarm.exceptions.ParsingError:
            # LDRB Rn, [Rk] translates to an offset of zero
            Ra, Rb = self.get_two_parameters(r'\s*([^\s,]*),\s*\[([^\s,]*)\](,\s*[^\s,]*)*\s*', params)
            Rc = '#0'

        if self.is_immediate(Rc):
            self.check_arguments(low_registers=(Ra, Rb), imm6_2=(Rc,))

            def LDRH_func():
                # TODO does memory read up?
                if (self.register[Rb]) % 2 != 0:
                    raise iarm.exceptions.HardFault(
                        "Memory access not half word aligned; Register: {}  Immediate: {}".format(self.register[Rb],
                                                                                                  self.convert_to_integer(
                                                                                                      Rc[1:])))
                self.register[Ra] = 0
                for i in range(2):
                    self.register[Ra] |= (self.memory[self.register[Rb] + self.convert_to_integer(Rc[1:]) + i] << (8 * i))
        else:
            self.check_arguments(low_registers=(Ra, Rb, Rc))

            def LDRH_func():
                # TODO does memory read up?
                if (self.register[Rb] + self.register[Rc]) % 2 != 0:
                    raise iarm.exceptions.HardFault(
                        "Memory access not half word aligned; Register: {}  Immediate: {}".format(self.register[Rb],
                                                                                                  self.register[Rc]))
                self.register[Ra] = 0
                for i in range(2):
                    self.register[Ra] |= (self.memory[self.register[Rb] + self.register[Rc] + i] << (8 * i))

        return LDRH_func
12913
function mapToValues(v){
        function mapRec(e){
            if(!isAVector(e)) return e;
            return mapRec(e.get(0));
        }
        return v.map(mapRec);
    }
446309
def rel2id(self, xs):
        
        if isinstance(xs, list):
            return [self._rel2id[x] for x in xs]
        return self._rel2id[xs]
1207842
function addToList(i, L, R) {
    R[L[i + 1]] = R[i];
    L[R[i]] = L[i + 1];
    R[i] = i + 1;
    L[i + 1] = i;
}
1175084
def _map_tril_1d_on_2d(indices, dims):
    

    N = (dims * dims - dims) / 2

    m = np.ceil(np.sqrt(2 * N))
    c = m - np.round(np.sqrt(2 * (N - indices))) - 1
    r = np.mod(indices + (c + 1) * (c + 2) / 2 - 1, m) + 1

    return np.array([r, c], dtype=np.int64)