Hoogle Search
Within LTS Haskell 24.51 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
induceJust :: Ord a => AdjacencyMap (Maybe a) -> AdjacencyMap aalgebraic-graphs Algebra.Graph.Acyclic.AdjacencyMap Construct the induced subgraph of a given graph by removing the vertices that are Nothing. Complexity: O(n + m) time.
induceJust (vertex Nothing) == empty induceJust . vertex . Just == vertex
induceJust :: Ord a => AdjacencyMap (Maybe a) -> AdjacencyMap aalgebraic-graphs Algebra.Graph.AdjacencyMap Construct the induced subgraph of a given graph by removing the vertices that are Nothing. Complexity: O(n + m) time.
induceJust (vertex Nothing) == empty induceJust (edge (Just x) Nothing) == vertex x induceJust . gmap Just == id induceJust . gmap (\x -> if p x then Just x else Nothing) == induce p
induceJust :: Graph e (Maybe a) -> Graph e aalgebraic-graphs Algebra.Graph.Labelled Construct the induced subgraph of a given graph by removing the vertices that are Nothing. Complexity: O(s) time, memory and size.
induceJust (vertex Nothing) == empty induceJust (edge (Just x) Nothing) == vertex x induceJust . fmap Just == id induceJust . fmap (\x -> if p x then Just x else Nothing) == induce p
induceJust :: Ord a => AdjacencyMap e (Maybe a) -> AdjacencyMap e aalgebraic-graphs Algebra.Graph.Labelled.AdjacencyMap Construct the induced subgraph of a given graph by removing the vertices that are Nothing. Complexity: O(n + m) time.
induceJust (vertex Nothing) == empty induceJust (edge (Just x) Nothing) == vertex x induceJust . gmap Just == id induceJust . gmap (\x -> if p x then Just x else Nothing) == induce p
induceJust1 :: Graph (Maybe a) -> Maybe (Graph a)algebraic-graphs Algebra.Graph.NonEmpty Construct the induced subgraph of a given graph by removing the vertices that are Nothing. Returns Nothing if the resulting graph is empty. Complexity: O(s) time, memory and size.
induceJust1 (vertex Nothing) == Nothing induceJust1 (edge (Just x) Nothing) == Just (vertex x) induceJust1 . fmap Just == Just induceJust1 . fmap (\x -> if p x then Just x else Nothing) == induce1 p
induceJust1 :: Ord a => AdjacencyMap (Maybe a) -> Maybe (AdjacencyMap a)algebraic-graphs Algebra.Graph.NonEmpty.AdjacencyMap Construct the induced subgraph of a given graph by removing the vertices that are Nothing. Returns Nothing if the resulting graph is empty. Complexity: O(n + m) time.
induceJust1 (vertex Nothing) == Nothing induceJust1 (edge (Just x) Nothing) == Just (vertex x) induceJust1 . gmap Just == Just induceJust1 . gmap (\x -> if p x then Just x else Nothing) == induce1 p
induceJust :: Ord a => Relation (Maybe a) -> Relation aalgebraic-graphs Algebra.Graph.Relation Construct the induced subgraph of a given graph by removing the vertices that are Nothing. Complexity: O(n + m) time.
induceJust (vertex Nothing) == empty induceJust (edge (Just x) Nothing) == vertex x induceJust . gmap Just == id induceJust . gmap (\x -> if p x then Just x else Nothing) == induce p
induceJust :: Ord a => Relation (Maybe a) -> Relation aalgebraic-graphs Algebra.Graph.Relation.Symmetric Construct the induced subgraph of a given graph by removing the vertices that are Nothing. Complexity: O(n + m) time.
induceJust (vertex Nothing) == empty induceJust (edge (Just x) Nothing) == vertex x induceJust . gmap Just == id induceJust . gmap (\x -> if p x then Just x else Nothing) == induce p
induceJust :: Graph (Maybe a) -> Graph aalgebraic-graphs Algebra.Graph.Undirected Construct the induced subgraph of a given graph by removing the vertices that are Nothing. Complexity: O(s) time, memory and size.
induceJust (vertex Nothing) == empty induceJust (edge (Just x) Nothing) == vertex x induceJust . fmap Just == id induceJust . fmap (\x -> if p x then Just x else Nothing) == induce p
endsJust :: (HasCallStack, Show a, Eq a) => IO (Maybe a) -> a -> Expectationbenri-hspec Test.Hspec.Benri action `endsJust` expected sets the expectation that action returns Just expected.
Example
>>> pure (readMaybe "1" :: Maybe Int) `endsJust` 1