Returns whether the constraints is satisfied trivially by using the
        last model.
767780
def eval_constraints(self, constraints):
        """"""
        # eval_ast is concretizing symbols and evaluating them, this can raise
        # exceptions.
        try:
            return all(self.eval_ast(c) for c in constraints)
        except errors.ClaripyZeroDivisionError:
            return False
957889
def is_valid(self):
        
        return super(SimpleDependency, self).is_valid() or (
            self.requirement.immediate_rebind and self._pending_ref is not None
        )
670808
def get_monotone_constraints(self):
        
        if self.monotone_constraints is None:
            self.monotone_constraints = self.get_field('monotone_constraints')
        return self.monotone_constraints
1122800
def constraints_since(self, other):
        

        constraints = [ ]
        cur = self
        while cur is not other and cur is not None:
            constraints.extend(cur.recent_constraints)
            cur = cur.parent
        return constraints
282828
def is_feasible(self, solution):
        
        newvars = solution.new.keys()
        for newvar in newvars:
            for c in self._constraints_for_var.get(newvar, []):
                values = c.extract_values(solution, use_defaults=True)
                if not c(*values):
                    return False
        return True
29749
public function last()
    {
        if ($this->count()) {
            $models = $this->getModels();
            return $models[$this->count() - 1];
        }
        return null;
    }
750061
public boolean isSimple() {
		if (isEmpty()) {
			return true;
		}

		if (getNumGeometries() > 1) {
			for (int n = 0; n < getNumGeometries(); n++) {
				if (!getGeometryN(n).isSimple()) {
					return false;
				}
			}
		} else {
			final Coordinate[] coords1 = getCoordinates();
			final Coordinate[] coords2 = getCoordinates();
			if (coords1.length > 1 && coords2.length > 1) {
				for (int i = 0; i < coords2.length - 1; i++) {
					for (int j = 0; j < coords1.length - 1; j++) {
						if (Mathlib.lineIntersects(coords2[i], coords2[i + 1], coords1[j], coords1[j + 1])) {
							return false;
						}
					}
				}
			} else {
				// TODO implement me
			}
		}

		return true;
	}
1309378
def remove_constraint(self,*names):
        
        for name in names:
            for pop in self.poplist:
                if name in pop.constraints:
                    pop.remove_constraint(name)
                else:
                    logging.info('%s model does not have %s constraint' % (pop.model,name))
            if name in self.constraints:
                self.constraints.remove(name)
629352
def no_constraints(cls, callback):
        
        cls._constraints = False

        results = callback()

        cls._constraints = True

        return results
1284927
def is_complete(self):
        """"""

        return all(p.name in self.values for p in self.parameters if p.required)
363826
function () {
			var args = slice.call(arguments),
				constraint = options.args_map.getOrPut(args, function() {
					return new Constraint(function () {
						return getter_fn.apply(options.context, args);
					});
				});
			return constraint.get();
		}
690079
private static void check(Set<ConstraintViolation<Object>> constraintViolations) {
        Iterator<ConstraintViolation<Object>> iterator = constraintViolations.iterator();
        if (iterator.hasNext()) {
            throw new ValidationException(iterator.next().getMessage());
        }
    }
520689
def _constraint(self, params):
        
        if (params["spin1x"]**2 + params["spin1y"]**2 +
                params["spin1z"]**2)**2 > 1:
            return False
        elif (params["spin2x"]**2 + params["spin2y"]**2 +
                  params["spin2z"]**2)**2 > 1:
            return False
        else:
            return True
916916
public static Constraint required() {
		return new Constraint("required", simplePayload("required")) {
			public boolean isValid(Object actualValue) {
				return !(actualValue == null || StringUtils.isBlank(actualValue.toString()));
			}
		};
	}
360705
def _minimize_constraints_fun_summation(x):
    '''
    
    '''
    summation = sum([x[i] for i in CONSTRAINT_PARAMS_IDX])
    return CONSTRAINT_UPPERBOUND >= summation >= CONSTRAINT_LOWERBOUND
1292855
def _constraints_are_whitelisted(self, constraint_tuple):
    
    if self._acceptable_interpreter_constraints == []:
      # The user wants to lint everything.
      return True
    return all(version.parse(constraint) in self._acceptable_interpreter_constraints
           for constraint in constraint_tuple)
983046
public boolean isFullRevision()
	{
		if (this.parts.size() == 1) {
			DiffPart p = this.parts.get(0);
			if (p.getAction() == DiffAction.FULL_REVISION_UNCOMPRESSED) {
				return true;
			}
		}

		return false;
	}