-
Notifications
You must be signed in to change notification settings - Fork 2
Estimate and EstimateM
Андрей Мулик edited this page Sep 21, 2023
·
1 revision
Estimate
is a class of types whose (immutable) size can be compared to a finite number in a finite time.
EstimateM
is a class of types whose (variable) size can be compared to a finite number in a finite time.
SizeHint
is an service type that represents additional information about the size of the structure.
Can be useful when creating or modifying a structure.
The Estimate
class functions and their variations help with working with infinite and potentially infinite structures, for example, with various types of lists and trees. For example, you can determine that a given structure es
is shorter than n
by executing the expression es .> n
, etc.
Class Estimate
added in sdp-0.2
, EstimateM
- in sdp-0.3
.
##API
Method | Estimate | Added | EstimateM | Added |
---|---|---|---|---|
Structure size hint | sizeHint | 0.3 | getSizeHint | 0.3 |
Structure size | sizeOf | 0.3 | getSizeOf | 0.3 |
Compare sizes | (<==>) | 0.2 | estimateM | 0.3 |
Compare size with number | (<.=>) | 0.2 | lestimateM | 0.3 |
Is the size equal to the number? | (.==) | 0.2 | lestimateMEQ | 0.3 |
Size not equal to number? | (./=) | 0.2 | lestimateMNE | 0.3 |
Is the size greater than or equal to the number? | (.>=) | 0.2 | lestimateMGE | 0.3 |
Is the size less than or equal to the number? | (.<=) | 0.2 | lestimateMLE | 0.3 |
Is size greater than number? | (.>) | 0.2 | lestimateMGT | 0.3 |
Size less than number? | (.<) | 0.2 | lestimateMLT | 0.3 |
Are the dimensions equal? | (.==.) | 0.2 | estimateMEQ | 0.3 |
Are the sizes not equal? | (./=.) | 0.2 | estimateMNE | 0.3 |
Longer or equal? | (.>=.) | 0.2 | estimateMGE | 0.3 |
Shorter or equal? | (.<=.) | 0.2 | estimateMLE | 0.3 |
Longer? | (.>.) | 0.2 | estimateMGT | 0.3 |
Shorter? | (.<.) | 0.2 | estimateMLT | 0.3 |
Function | Estimate | Added | EstimateM | Added |
---|---|---|---|---|
Compare number with size | (<=.>) | 0.2 | restimateM | 0.3 |
Is the number equal to the size? | (==.) | 0.2 | restimateMEQ | 0.3 |
Is the number not equal to the size? | (/=.) | 0.2 | restimateMNE | 0.3 |
Is the number greater than or equal to size? | (>=.) | 0.2 | restimateMGE | 0.3 |
Is the number less than or equal to size? | (<=.) | 0.2 | restimateMLE | 0.3 |
Is the number greater than the size? | (.>) | 0.2 | restimateMGT | 0.3 |
Is the number undersized? | (.<) | 0.2 | restimateMLT | 0.3 |