Compute current matching endpoints.

        Evaluated as a property to defer evaluation.
339601
def find_matching_endpoints(self, discovery_ns):
        
        def match_func(operation, ns, rule):
            return operation in self.matching_operations

        return list(iter_endpoints(self.graph, match_func))
698796
def eval(self, valuation=None, trace=None):
        
        return super().eval(valuation=valuation, trace=trace)
547178
def _check_ep(interface, ep_index, ep_dir, ep_type):
    """"""
    ep = interface[ep_index]
    return (usb.util.endpoint_direction(ep.bEndpointAddress) == ep_dir) \
        and (usb.util.endpoint_type(ep.bmAttributes) == ep_type)
841470
def _get_valid_endpoint(resp, name, entry_type):
        
        catalog = resp.get('token', {}).get('catalog', [])
        for entry in catalog:
            if (
                entry.get('name')
                and entry.get('type')
                and entry.get('name') == name
                and entry.get('type') == entry_type
            ):
                # Collect any endpoints on the public or internal interface
                valid_endpoints = {}
                for ep in entry.get('endpoints'):
                    interface = ep.get('interface', '')
                    if interface in ['public', 'internal']:
                        valid_endpoints[interface] = ep.get('url')

                if valid_endpoints:
                    # Favor public endpoints over internal
                    return valid_endpoints.get('public', valid_endpoints.get('internal'))

        return None
1272050
def connect_to_endpoints_nowait(self, *endpoints: ConnectionConfig) -> None:
        
        self._throw_if_already_connected(*endpoints)
        for endpoint in endpoints:
            asyncio.ensure_future(self._await_connect_to_endpoint(endpoint))
78673
async def AddRelation(self, endpoints):
        '''
        
        '''
        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Application',
                   request='AddRelation',
                   version=3,
                   params=_params)
        _params['endpoints'] = endpoints
        reply = await self.rpc(msg)
        return reply
1133497
def method_missing(m, *array)
      endpoint = Scale.descendants(Scale::Endpoints::Endpoint).find { |e| e.match? m }
      return endpoint.new(self, *array).process if endpoint
      super
    end
1330440
def endpoint(url, method="GET", expected_status=200):
    
    def dec(obj):
        obj.ENDPOINT = url
        obj.METHOD = method
        obj.EXPECTED_STATUS = expected_status
        return obj

    return dec
800943
def _distance_last_evaluations(self):
        
        if self.X.shape[0] < 2:
            # less than 2 evaluations
            return np.inf
        return np.sqrt(np.sum((self.X[-1, :] - self.X[-2, :]) ** 2))
419038
def eval(self, iteration, feval):
        """""""
        return self.bst.eval_set(self.watchlist, iteration, feval)
567278
def _eval_progress(self, match):
        '''
        
        '''
        _locals = {k: safe_float(v) for k, v in match.groupdict().items()}
        if "x" not in _locals:
            _locals["x"] = [safe_float(x) for x in match.groups()]
        try:
            return int(eval(self.progress_expr, {}, _locals))
        except:
            return None
750514
def get_matching(self, source_id):
        
        value = self._accessor.get_by_id(source_id)
        if not value is None:
            reg = get_current_registry()
            prx_fac = reg.getUtility(IDataTraversalProxyFactory)
            prx = prx_fac.make_proxy(value,
                                     self._accessor,
                                     self.relationship_direction,
                                     self.relation_operation)
        else:
            prx = None
        return prx
512647
def __clientDefer(self, c):
        """"""
        def handle_headers(r):
            self.gotHeaders(c.response_headers)
            return r

        return c.deferred.addBoth(handle_headers)
1005215
def _evaluate(self,x,return_indices = False):
        '''
        
        '''
        return self._evalOrDer(x,True,False)[0]
1073754
def execution_order(self, refcounts):
        
        return iter(nx.topological_sort(
            self.graph.subgraph(
                {term for term, refcount in refcounts.items() if refcount > 0},
            ),
        ))
119936
def next_iteration(self, ref_point, bounds=None):
        
        if bounds:
            self.problem.points = reachable_points(
                self.problem.points, self.problem.ideal, bounds
            )
        if not utils.isin(self.fh, self.problem.points) or ref_point != self.ref_point:
            self.ref_point = list(ref_point)
            self._update_fh()

        self._update_zh(self.zh, self.fh)

        self.fh_lo = list(self.lower_bounds_factory.result(self.zh))
        self.fh_up = list(self.upper_bounds_factory.result(self.zh))

        logging.debug(f"Updated upper boundary: {self.fh_up}")
        logging.debug(f"Uppadet lower boundary: {self.fh_lo}")

        if not np.all(np.array(self.fh_up) > np.array(self.fh_lo)):
            warn(self.NegativeIntervalWarning())

        assert utils.isin(self.fh_up, self.problem.points)
        assert utils.isin(self.fh_lo, self.problem.points)

        dist = self.distance(self.zh, self.fh)

        # Reachable points
        self.update_points()

        lP = len(self.problem.points)
        self.current_iter -= 1

        return dist, self.fh, self.zh, self.fh_lo, self.fh_up, lP
363253
private void reflect(IntStack stack, IAtom beg, IAtom end) {
        Point2d begP = beg.getPoint2d();
        Point2d endP = end.getPoint2d();
        reflect(stack, begP, endP);
    }