euporie.core.data_structures
Contain commonly used data structures.
Functions
|
Typed version of namedtuple. |
|
Least-recently-used cache decorator. |
Classes
|
A tuple of four bools with directions. |
|
A tuple of four integers with directions. |
|
A tuple of four strings with directions. |
|
A tuple of four weighted integers. |
|
Ainterger with an associated weight. |
- class euporie.core.data_structures.DiBool(top: bool = False, right: bool = False, bottom: bool = False, left: bool = False)
Bases:
NamedTuple
A tuple of four bools with directions.
- count(value, /)
Return number of occurrences of value.
- index(value, start=0, stop=9223372036854775807, /)
Return first index of value.
Raises ValueError if the value is not present.
- class euporie.core.data_structures.DiInt(top: int = 0, right: int = 0, bottom: int = 0, left: int = 0)
Bases:
NamedTuple
A tuple of four integers with directions.
- count(value, /)
Return number of occurrences of value.
- index(value, start=0, stop=9223372036854775807, /)
Return first index of value.
Raises ValueError if the value is not present.
- class euporie.core.data_structures.DiStr(top: str = '', right: str = '', bottom: str = '', left: str = '')
Bases:
NamedTuple
A tuple of four strings with directions.
- count(value, /)
Return number of occurrences of value.
- index(value, start=0, stop=9223372036854775807, /)
Return first index of value.
Raises ValueError if the value is not present.
- class euporie.core.data_structures.WeightedDiInt(top: WeightedInt, right: WeightedInt, bottom: WeightedInt, left: WeightedInt)
Bases:
NamedTuple
A tuple of four weighted integers.
- bottom: WeightedInt
Alias for field number 2
- count(value, /)
Return number of occurrences of value.
- index(value, start=0, stop=9223372036854775807, /)
Return first index of value.
Raises ValueError if the value is not present.
- left: WeightedInt
Alias for field number 3
- right: WeightedInt
Alias for field number 1
- top: WeightedInt
Alias for field number 0
- class euporie.core.data_structures.WeightedInt(weight: int, value: int)
Bases:
NamedTuple
Ainterger with an associated weight.
- count(value, /)
Return number of occurrences of value.
- index(value, start=0, stop=9223372036854775807, /)
Return first index of value.
Raises ValueError if the value is not present.