Copyright | (c) NoviSci Inc 2020 |
---|---|
License | BSD3 |
Maintainer | bsaul@novisci.com |
Safe Haskell | Safe |
Language | Haskell2010 |
Provides functions used in defining Feature
s.
Synopsis
- isNotEmpty :: [a] -> Bool
- atleastNofX :: Int -> [Text] -> Events a -> Bool
- twoXOrOneY :: [Text] -> [Text] -> Events a -> Bool
- nthConceptOccurrence :: (Events a -> Maybe (Event a)) -> [Text] -> Events a -> Maybe (Event a)
- firstConceptOccurrence :: [Text] -> Events a -> Maybe (Event a)
- allPairs :: [a] -> [b] -> [(a, b)]
- splitByConcepts :: [Text] -> [Text] -> Events a -> (Events a, Events a)
- makeConceptsFilter :: [Text] -> Events a -> Events a
- makePairedFilter :: (Intervallic i0 a, Intervallic (PairedInterval b) a) => ComparativePredicateOf2 (i0 a) (PairedInterval b a) -> i0 a -> (b -> Bool) -> [PairedInterval b a] -> [PairedInterval b a]
Container predicates
isNotEmpty :: [a] -> Bool Source #
Is the input list empty?
Does Events
have at least n
events with any of the Concept in x
.
Finding occurrences of concepts
:: (Events a -> Maybe (Event a)) | function used to select a single event |
-> [Text] | |
-> Events a | |
-> Maybe (Event a) |
Filter Events
to a single
, based on a provided function,
with the provided concepts. For example, see Maybe
Event
firstConceptOccurrence
and
lastConceptOccurrence
.
Reshaping containers
splitByConcepts :: [Text] -> [Text] -> Events a -> (Events a, Events a) Source #
Split an Events a
into a pair of Events a
. The first element contains
events have any of the concepts in the first argument, similarly for the
second element.
Create filters
Filter Events
to those that have any of the provided concepts.
makePairedFilter :: (Intervallic i0 a, Intervallic (PairedInterval b) a) => ComparativePredicateOf2 (i0 a) (PairedInterval b a) -> i0 a -> (b -> Bool) -> [PairedInterval b a] -> [PairedInterval b a] Source #