| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell98 |
RegExDot.ConsumptionProfile
Description
AUTHOR- Dr. Alistair Ward
DESCRIPTION
A ConsumptionProfile is composed from both a capacity to consume, & an ability to discriminate based on the specific data.
The former is described by consumptionBounds & the latter by both hasSpecificRequirement & canConsumeAnything.
- type AccumulatedConsumptionProfiles = [ConsumptionProfile]
- data ConsumptionProfile = MkConsumptionProfile {}
- zero :: ConsumptionProfile
- accumulateFrom :: ConsumptionProfile -> [ConsumptionProfile] -> AccumulatedConsumptionProfiles
- aggregateFromConcatenation :: [ConsumptionProfile] -> ConsumptionProfile
- (|+|) :: ConsumptionProfile -> ConsumptionProfile -> ConsumptionProfile
- (<>) :: ConsumptionProfile -> ConsumptionProfile -> ConsumptionProfile
- withinConsumptionBounds :: DataLength -> ConsumptionProfile -> Bool
Types
Type-synonyms
type AccumulatedConsumptionProfiles = [ConsumptionProfile] Source
The ConsumptionProfiles of all the aggregated tails of a list of Consumers.
Data-types
data ConsumptionProfile Source
- A
Consumeris considered to have aConsumptionProfilecomposed from both a capacity to consume, & an ability to discriminate. - Whilst
hasSpecificRequirement&canConsumeAnythinglook like opposites, they can assume independent values; the instance can be both, but only be neither when empty.
Constructors
| MkConsumptionProfile | |
Fields
| |
Constants
zero :: ConsumptionProfile Source
Both minimum & maximum set to zero; which can be used as the initial value when accumulating the sum of a list.
Functions
accumulateFrom :: ConsumptionProfile -> [ConsumptionProfile] -> AccumulatedConsumptionProfiles Source
Accumulate the specified list of ConsumptionProfiles, from the specified initial value.
aggregateFromConcatenation :: [ConsumptionProfile] -> ConsumptionProfile Source
The aggregate of the specified concatenation of ConsumptionProfiles.
Operators
(|+|) :: ConsumptionProfile -> ConsumptionProfile -> ConsumptionProfile infixr 5 Source
The net effect of two concatenated ConsumptionProfiles.
(<>) :: ConsumptionProfile -> ConsumptionProfile -> ConsumptionProfile infixr 2 Source
The net effect of two alternative ConsumptionProfiles.
Predicates
withinConsumptionBounds Source
Arguments
| :: DataLength | The actual quantity of data consumed. |
| -> ConsumptionProfile | The bounds within which data-consumption is required to fall. |
| -> Bool |
Predicate, which is True if the specified data-length, falls within the specified ConsumptionBounds.