API reference
nascor
nascor.Age
Source code in nascor/__init__.py
nascor.Age.__init__(n, unit)
An age is a duration of time
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
n
|
int
|
number of units of time |
required |
unit
|
Unit
|
one of |
required |
nascor.AgeRange
Source code in nascor/__init__.py
nascor.AgeRange.__init__(lower, upper)
nascor.AgeRange.is_in(other)
Is this range inside another range?
Source code in nascor/__init__.py
nascor.AgeRange.subdivide(cuts)
Break this range down into smaller ranges
Source code in nascor/__init__.py
nascor.parse_range(x)
Parse an age range string
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
str
|
string |
required |
Returns: an AgeRange, or a ParseFailure
Source code in nascor/__init__.py
nascor.tile(parts, whole)
Does a set of AgeRanges cover another AgeRange, with no gaps or overlap?
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
parts
|
Iterable[AgeRange]
|
member |
required |
whole
|
AgeRange
|
larger |
required |
Returns: boolean