nLLevalAllY(double ldelta, MatrixXd const & UY, MatrixXd const & UX, VectorXd const & S)

    Parameters
    ----------
    ldelta: double
    UY: MatrixXd const &
    UX: MatrixXd const &
    S: VectorXd const &
509547
def nLLevalAllY(ldelta, UY, UX, S):
    
    return _core.nLLevalAllY(ldelta, UY, UX, S)
1088259
def model1(inps, lims, logger=None):
    
    a_arr, c_ = inps
    ilim, jlim = lims

    i_bs = sympy.symbols('i_lb i_ub', integer=True)
    i = sympy.Idx('i', i_bs)

    j_bs = sympy.symbols('j_lb j_ub', integer=True)
    j = sympy.Idx('j', j_bs)

    a = sympy.IndexedBase('a')

    c = sympy.Symbol('c', real=True)

    x = sympy.IndexedBase('x')
    y = sympy.IndexedBase('y')

    eqs = [
        sympy.Eq(x[i], (a[i]/3-1)**i+c),
        sympy.Eq(y[j], a[j]-j),
    ]

    ex_code = ExampleCode(eqs, (a[i], c), (i, j),
                          logger=logger, save_temp=True)
    x_, y_ = ex_code(inps, bounds=(ilim, jlim))
    x_ref = (a_arr/3-1)**np.arange(ilim[0], ilim[1]) + c_
    y_ref = a_arr[jlim[0]:jlim[1]] - np.arange(jlim[0], jlim[1])
    assert np.allclose(x_, x_ref)
    assert np.allclose(y_, y_ref)
298709
def make_unary(lineno, operator, operand, func=None, type_=None):
    
    return symbols.UNARY.make_node(lineno, operator, operand, func, type_)
1188623
def llt(L):
    

    assert isinstance(L, cspmatrix) and L.is_factor is True, "L must be a cspmatrix factor"

    n = L.symb.n
    snpost = L.symb.snpost
    snptr = L.symb.snptr
    chptr = L.symb.chptr
    chidx = L.symb.chidx

    relptr = L.symb.relptr
    relidx = L.symb.relidx
    blkptr = L.symb.blkptr
    blkval = L.blkval

    stack = []

    for k in snpost:

        nn = snptr[k+1]-snptr[k]       # |Nk|
        na = relptr[k+1]-relptr[k]     # |Ak|
        nj = na + nn

        # compute [I; L_{Ak,Nk}]*D_k*[I;L_{Ak,Nk}]'; store in F
        blas.trmm(blkval, blkval, side = "R", m = na, n = nn, ldA = nj,\
                  ldB = nj, offsetA = blkptr[k], offsetB = blkptr[k]+nn)
        F = matrix(0.0, (nj, nj))
        blas.syrk(blkval, F, n = nj, k = nn, offsetA = blkptr[k], ldA = nj)

        # if supernode k has any children, subtract update matrices 
        for _ in range(chptr[k],chptr[k+1]):
            Ui, i = stack.pop()
            frontal_add_update(F, Ui, relidx, relptr, i)

        # if supernode k is not a root node, push update matrix onto stack
        if na > 0:
            Uk = matrix(0.0,(na,na))
            lapack.lacpy(F, Uk, m = na, n = na, uplo = 'L', offsetA = nn*nj+nn, ldA = nj)
            stack.append((Uk,k))

        # copy leading Nk columns of F to blkval
        lapack.lacpy(F, blkval, m = nj, n = nn, ldA = nj, uplo = 'L',\
                     ldB = nj, offsetB = blkptr[k])

    L._is_factor = False

    return
1297186
def cublasCher(handle, uplo, n, alpha, x, incx, A, lda):
    

    status = _libcublas.cublasCher_v2(handle, 
                                      _CUBLAS_FILL_MODE[uplo], 
                                      n, alpha, int(x), incx, int(A), lda)
    cublasCheckStatus(status)
417868
def lnlike(self, theta):
        
        params,loglike = self.params,self.loglike
        kwargs = dict(list(zip(params,theta)))
        try:
            lnlike = loglike.value(**kwargs)
        except ValueError as AssertionError:
            lnlike = -np.inf
        return lnlike
1279978
private Context translateSingleAssignment(WyilFile.LVal lval, Expr rval, Context context) {

		// FIXME: this method is a bit of a kludge. It would be nicer,
		// eventually, to have all right-hand side expression represented in
		// WyTP directly. This could potentially be done by including an update
		// operation in WyTP ... ?

		switch (lval.getOpcode()) {
		case WyilFile.EXPR_arrayaccess:
		case WyilFile.EXPR_arrayborrow:
			return translateArrayAssign((WyilFile.Expr.ArrayAccess) lval, rval, context);
		case WyilFile.EXPR_dereference:
			return translateDereference((WyilFile.Expr.Dereference) lval, rval, context);
		case WyilFile.EXPR_recordaccess:
		case WyilFile.EXPR_recordborrow:
			return translateRecordAssign((WyilFile.Expr.RecordAccess) lval, rval, context);
		case WyilFile.EXPR_variablemove:
		case WyilFile.EXPR_variablecopy:
			return translateVariableAssign((WyilFile.Expr.VariableAccess) lval, rval, context);
		default:
			throw new SyntacticException("unknown lval encountered (" + lval + ")", context.getEnclosingFile().getEntry(),
					lval);
		}
	}
249520
def lgamma(x, context=None):
    
    return _apply_function_in_current_context(
        BigFloat,
        lambda rop, op, rnd: mpfr.mpfr_lgamma(rop, op, rnd)[0],
        (BigFloat._implicit_convert(x),),
        context,
    )
1049814
void join(final MiniSatStyleSolver s, final LNGIntVector lits, int rhs) {
    assert this.incrementalStrategy == MaxSATConfig.IncrementalStrategy.ITERATIVE;
    final LNGIntVector leftCardinalityOutlits = new LNGIntVector(this.cardinalityOutlits);
    int oldCardinality = this.currentCardinalityRhs;
    if (lits.size() > 1)
      this.build(s, lits, rhs < lits.size() ? rhs : lits.size());
    else {
      assert lits.size() == 1;
      this.cardinalityOutlits.clear();
      this.cardinalityOutlits.push(lits.get(0));
    }
    final LNGIntVector rightCardinalityOutlits = new LNGIntVector(this.cardinalityOutlits);
    this.cardinalityOutlits.clear();
    for (int i = 0; i < leftCardinalityOutlits.size() + rightCardinalityOutlits.size(); i++) {
      final int p = mkLit(s.nVars(), false);
      MaxSAT.newSATVariable(s);
      this.cardinalityOutlits.push(p);
    }
    this.currentCardinalityRhs = rhs;
    this.adder(s, leftCardinalityOutlits, rightCardinalityOutlits, this.cardinalityOutlits);
    this.currentCardinalityRhs = oldCardinality;
  }
355816
public void encode(final MiniSatStyleSolver s, final LNGIntVector lits) {
    assert lits.size() != 0;
    if (lits.size() == 1)
      addUnitClause(s, lits.get(0));
    else {
      final LNGIntVector seqAuxiliary = new LNGIntVector();
      for (int i = 0; i < lits.size() - 1; i++) {
        seqAuxiliary.push(mkLit(s.nVars(), false));
        MaxSAT.newSATVariable(s);
      }
      for (int i = 0; i < lits.size(); i++) {
        if (i == 0) {
          addBinaryClause(s, lits.get(i), not(seqAuxiliary.get(i)));
          addBinaryClause(s, not(lits.get(i)), seqAuxiliary.get(i));
        } else if (i == lits.size() - 1) {
          addBinaryClause(s, lits.get(i), seqAuxiliary.get(i - 1));
          addBinaryClause(s, not(lits.get(i)), not(seqAuxiliary.get(i - 1)));
        } else {
          addBinaryClause(s, not(seqAuxiliary.get(i - 1)), seqAuxiliary.get(i));
          addTernaryClause(s, lits.get(i), not(seqAuxiliary.get(i)), seqAuxiliary.get(i - 1));
          addBinaryClause(s, not(lits.get(i)), seqAuxiliary.get(i));
          addBinaryClause(s, not(lits.get(i)), not(seqAuxiliary.get(i - 1)));
        }
      }
    }
  }
607444
def cublasDspr(handle, uplo, n, alpha, x, incx, AP):
    

    status = _libcublas.cublasDspr_v2(handle, 
                                      _CUBLAS_FILL_MODE[uplo], n,                                       
                                      ctypes.byref(ctypes.c_double(alpha)), 
                                      int(x), incx, int(AP))                                           
    cublasCheckStatus(status)
33505
def cublasZher(handle, uplo, n, alpha, x, incx, A, lda):
    
    
    status = _libcublas.cublasZher_v2(handle, 
                                      _CUBLAS_FILL_MODE[uplo], 
                                      n, alpha, int(x), incx, int(A), lda)
    cublasCheckStatus(status)
915446
def SLT(self, o):
        

        signed_bounds_1 = self._signed_bounds()
        signed_bounds_2 = o._signed_bounds()

        ret = [ ]
        for lb_1, ub_1 in signed_bounds_1:
            for lb_2, ub_2 in signed_bounds_2:
                if ub_1 < lb_2:
                    ret.append(TrueResult())
                elif lb_1 >= ub_2:
                    ret.append(FalseResult())
                else:
                    ret.append(MaybeResult())

        if all(r.identical(TrueResult()) for r in ret):
            return TrueResult()
        elif all(r.identical(FalseResult()) for r in ret):
            return FalseResult()
        else:
            return MaybeResult()
555590
function dfl(a, b, c) {
        switch (arguments.length) {
            case 2: return a != null ? a : b;
            case 3: return a != null ? a : b != null ? b : c;
            default: throw new Error("Implement me");
        }
    }
512293
function LDB(options) {
  const result = LDB.getBackend(options);
  const backend = result.backend;
  const location = result.location;

  return new LowlevelUp(backend, location, options);
}
509810
def p_expression_sla(self, p):
        ''
        p[0] = Sll(p[1], p[3], lineno=p.lineno(1))
        p.set_lineno(0, p.lineno(1))
493982
def series_with_slh(self, other):
        
        new_S = self.S * other.S
        new_L = self.S * other.L + self.L

        def ImAdjoint(m):
            return (m.H - m) * (I / 2)

        delta = ImAdjoint(self.L.adjoint() * self.S * other.L)

        if isinstance(delta, Matrix):
            new_H = self.H + other.H + delta[0, 0]
        else:
            assert delta == 0
            new_H = self.H + other.H

        return SLH(new_S, new_L, new_H)