Skip to main content

AlgorithmRegistry

Registry of all known identity algorithms.

Usage

Source

AlgorithmRegistry()

Methods

Name Description
register() Create and register an algorithm.

register()

Create and register an algorithm.

Usage

Source

register(
    name,
    kind,
    identity_fn,
    geometry_fn=default_geometry_fn,
    parent_algorithm=None
)
Parameters
name: str

Unique algorithm name.

kind: IdentityKind

Category of identity produced.

identity_fn: IdentityProtocol

Function generating the identity string.

geometry_fn: GeometryProtocol = default_geometry_fn

Function reconstructing a geometry from an identity.

parent_algorithm: Algorithm | None = None
Algorithm whose identity disambiguates other_geos, if any.
Returns
Algorithm
The registered algorithm.
Raises
AlgorithmAlreadyRegisteredError
If an algorithm with name is already registered.