Source code for symforce.ops.impl.abstract_storage_ops
# ----------------------------------------------------------------------------# SymForce - Copyright 2022, Skydio, Inc.# This source code is under the Apache 2.0 license found in the LICENSE file.# ----------------------------------------------------------------------------importabcfromsymforceimporttypingasTElementT=T.TypeVar("ElementT")ElementOrTypeT=T.Union[ElementT,T.Type[ElementT]]
[docs]classAbstractStorageOps(abc.ABC,T.Generic[ElementT]):""" An abstract base class for StorageOps implementations. Useful for when multiple classes can implement their GroupOps and LieGroupOps implementations in terms of their storage ops in the same manner, despite having different StorageOps impelmentations. For example, classes whose storage spaces are abstract vector spaces and whose group operations are their vector operations. See :mod:`.abstract_vector_group_ops`. """# NOTE(aaron): These should be @staticmethods, this is fixed in mypy 1.9# https://github.com/python/mypy/pull/16670