HereditaryStratum

class HereditaryStratum

Packages stratigraph data associated with a particular generation.

Includes differentia “fingerprint” associated with a particular generation of a line of descent and possibly additional metadata, including optional user-provided annotation.

__init__(*, annotation: Any | None = None, differentia_bit_width: int = 64, deposition_rank: int | None = None, differentia: int | None = None)[source]

Construct the stratum.

Randomly generates and stores a differentia “fingerprint” alongside other metadata, if provided.

Parameters

annotation: any, optional

Optional object to store as an annotation. Allows arbitrary user- provided to be associated with this stratum’s generation in its line of descent.

differentia_bit_width: int, optional

The bit width of the generated differentia. Default 64, allowing for 2^64 distinct values.

deposition_rankint, optional

The position of the stratum being deposited within the sequence of strata deposited into the column. Precisely, the number of strata that have been deposited before stratum.

Methods

GetAnnotation() Any | None[source]

Access arbitrary, user-specified annotation, if any.

GetDepositionRank() int | None[source]

Get the deposition order rank associated with this stratum, if stored.

Deposition rank is the number of strata deposited on a column before self. Deposition rank may not be stored if the stratum retention policy supports calculation of deposition rank from column index.

GetDifferentia() int[source]

Access differentia.

Returns the randomly-generated value that distinguishes this stratum from others generated at the same rank in other hereditary columns.

__init__(*, annotation: Any | None = None, differentia_bit_width: int = 64, deposition_rank: int | None = None, differentia: int | None = None)[source]

Construct the stratum.

Randomly generates and stores a differentia “fingerprint” alongside other metadata, if provided.

Parameters

annotation: any, optional

Optional object to store as an annotation. Allows arbitrary user- provided to be associated with this stratum’s generation in its line of descent.

differentia_bit_width: int, optional

The bit width of the generated differentia. Default 64, allowing for 2^64 distinct values.

deposition_rankint, optional

The position of the stratum being deposited within the sequence of strata deposited into the column. Precisely, the number of strata that have been deposited before stratum.