Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions src/lineagetree/_mixins/spatial_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,19 @@
gabriel_graph,
idx3d,
neighbours_in_radius,
angles,
asphericity,
displacement,
displacement_ratio,
duration,
max_displacement,
mean_squared_displacement,
outreach_ratio,
overall_angle,
speed,
straightness,
track_length,
velocity,
)

from ._methodize import AutoMethodizeMeta
Expand All @@ -19,3 +32,28 @@ class SpatialMixin(metaclass=AutoMethodizeMeta):
spatial_edges = spatial_edges
spatial_density = spatial_density
neighbours_in_radius = neighbours_in_radius
angles = angles

asphericity = asphericity

displacement = displacement

displacement_ratio = displacement_ratio

duration = duration

max_displacement = max_displacement

mean_squared_displacement = mean_squared_displacement

outreach_ratio = outreach_ratio

overall_angle = overall_angle

speed = speed

straightness = straightness

track_length = track_length

velocity = velocity
36 changes: 36 additions & 0 deletions src/lineagetree/approximation/approximations.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
from __future__ import annotations

from abc import ABC
from typing import TYPE_CHECKING



if TYPE_CHECKING:
from ..lineage_tree import LineageTree


class TreeApproximator(ABC):

def build_approximated_tree(self):
"""This functionm will create the nod list and the adjacency_list"""

def get_norm(self):
"""Return the distance of the approximated tree to the null tree."""

def __init__(
self,
lT: LineageTree,
starting_node: int,
ending_timepoint: int | None = None,
) -> None:
"""_summary_

Parameters
----------
lT : LineageTree
_description_
starting_node : int
_description_
ending_timepoint : int | None, optional
_description_, by default None
"""
Loading
Loading