hgeometry-0.11.0.0: Geometric Algorithms, Data structures, and Data types.

Algorithms.Geometry.Diameter.Naive

Synopsis

# Documentation

diameter :: (Ord r, Floating r, Arity d) => [Point d r :+ p] -> r Source #

diametralPair :: (Ord r, Num r, Arity d) => [Point d r :+ p] -> Maybe (Point d r :+ p, Point d r :+ p) Source #

Computes the Euclidean diametral pair by naively trying all pairs.

running time: $$O(n^2)$$

diametralPairWith :: Ord r => (Point d r -> Point d r -> r) -> [Point d r :+ p] -> Maybe (Point d r :+ p, Point d r :+ p) Source #

Given a distance function and a list of points pts, computes the diametral pair by naively trying all pairs.

running time: $$O(n^2)$$
{"ft_lang_label":"__label__en","ft_lang_prob":0.5544815,"math_prob":0.9985441,"size":260,"snap":"2021-21-2021-25","text_gpt3_token_len":85,"char_repetition_ratio":0.15625,"word_repetition_ratio":0.0,"special_character_ratio":0.33076924,"punctuation_ratio":0.1923077,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99987984,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2021-05-15T06:26:51Z\",\"WARC-Record-ID\":\"<urn:uuid:739e1c62-2819-4720-9f67-dbafb2530679>\",\"Content-Length\":\"8205\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:800cfc8d-eea0-4457-99c0-c528c90acfc4>\",\"WARC-Concurrent-To\":\"<urn:uuid:59f9a27e-c857-4c01-8867-b9ee31d53d2b>\",\"WARC-IP-Address\":\"151.101.248.68\",\"WARC-Target-URI\":\"https://hackage.haskell.org/package/hgeometry-0.11.0.0/docs/Algorithms-Geometry-Diameter-Naive.html\",\"WARC-Payload-Digest\":\"sha1:33S7BG42ZT6QADZV2DGLHCMROVJPVZSD\",\"WARC-Block-Digest\":\"sha1:3Z6OKISPZVISLGWFM47A5TDOWSMYDCSG\",\"WARC-Identified-Payload-Type\":\"application/xhtml+xml\",\"warc_filename\":\"/cc_download/warc_2021/CC-MAIN-2021-21/CC-MAIN-2021-21_segments_1620243989812.47_warc_CC-MAIN-20210515035645-20210515065645-00186.warc.gz\"}"}