rainbowadn/rainbowadn/collection/trees/binary/core/binarysplit.py
2022-06-21 21:17:28 +03:00

28 lines
671 B
Python

from typing import Generic, TypeVar
from rainbowadn.core import *
__all__ = ('BinarySplit',)
TreeType = TypeVar('TreeType')
ActiveKeyType = TypeVar('ActiveKeyType')
MetaDataType = TypeVar('MetaDataType')
class BinarySplit(
Generic[ActiveKeyType, MetaDataType, TreeType]
):
def __init__(
self,
treel: TreeType,
key: HashPoint[ActiveKeyType],
metadata: HashPoint[MetaDataType],
treer: TreeType
):
assert isinstance(key, HashPoint)
assert isinstance(metadata, HashPoint)
self.treel = treel
self.key = key
self.metadata = metadata
self.treer = treer