SHiP.ultrametric_tree

This submodule contains all available ultrametric tree types. There are different ways how to select and use an ultrametric tree type.

Usage Example

  1. Import a specific ultrametric tree type directly from the submodule:

from SHiP import SHiP
from SHiP.ultrametric_tree import <UltrametricTreeType>

ship = SHiP(data=my_data, treeType=<UltrametricTreeType>)
  1. Use the ``UltrametricTreeType`` enum to list and access all available tree types:

from SHiP import SHiP
from SHiP.ultrametric_tree import UltrametricTreeType

for tree_type in UltrametricTreeType:
    print(tree_type)

ship = SHiP(data=my_data, treeType=UltrametricTreeType.<UltrametricTreeType>)
  1. Specify the tree type as a string (ensure it matches an available ultrametric tree type):

from SHiP import SHiP

ship = SHiP(data=my_data, treeType="<UltrametricTreeType>")
class SHiP.ultrametric_tree.UltrametricTreeType

Enum of available ultrametric tree types.

Can be used to iterate over or to select a tree type when initializing SHiP.

Example:

from SHiP.ultrametric_tree import UltrametricTreeType

for tree_type in UltrametricTreeType:
    print(tree_type)

ship = SHiP(data=my_data, treeType=UltrametricTreeType.<UltrametricTreeType>)

Members:

LoadTree

DCTree

HST

CoverTree

KDTree

MeanSplitKDTree

BallTree

MeanSplitBallTree

RPTree

MaxRPTree

UBTree

RTree

RStarTree

XTree

HilbertRTree

RPlusTree

RPlusPlusTree

__init__(*args, **kwargs)

Overloaded function.

  1. __init__(self: SHiP.ultrametric_tree.UltrametricTreeType, value: int) -> None

  2. __init__(self: SHiP.ultrametric_tree.UltrametricTreeType, arg0: str) -> None

BallTree = <UltrametricTreeType.BallTree: 6>
CoverTree = <UltrametricTreeType.CoverTree: 3>
DCTree = <UltrametricTreeType.DCTree: 1>
HST = <UltrametricTreeType.HST: 2>
HilbertRTree = <UltrametricTreeType.HilbertRTree: 14>
KDTree = <UltrametricTreeType.KDTree: 4>
LoadTree = <UltrametricTreeType.LoadTree: 0>
MaxRPTree = <UltrametricTreeType.MaxRPTree: 9>
MeanSplitBallTree = <UltrametricTreeType.MeanSplitBallTree: 7>
MeanSplitKDTree = <UltrametricTreeType.MeanSplitKDTree: 5>
RPTree = <UltrametricTreeType.RPTree: 8>
RPlusPlusTree = <UltrametricTreeType.RPlusPlusTree: 16>
RPlusTree = <UltrametricTreeType.RPlusTree: 15>
RStarTree = <UltrametricTreeType.RStarTree: 12>
RTree = <UltrametricTreeType.RTree: 11>
UBTree = <UltrametricTreeType.UBTree: 10>
XTree = <UltrametricTreeType.XTree: 13>
UltrametricTreeType.name -> str
property value
SHiP.ultrametric_tree.stringToUltrametricTreeType(arg0: str) SHiP.ultrametric_tree.UltrametricTreeType

Convert a string to a UltrametricTreeType enum.

SHiP.ultrametric_tree.ultrametricTreeTypeToString(arg0: SHiP.ultrametric_tree.UltrametricTreeType) str

Convert a UltrametricTreeType enum to a string.