src.object package¶
Submodules¶
src.object.function module¶
- class src.object.function.Coordinate(*args, **metadata)¶
Bases:
CoordinateMixin
,ABC
- Parameters:
args (Any)
metadata (Metadata)
- class src.object.function.CoordinateMixin(*args, **metadata)¶
Bases:
FunctionMixin
,ABC
- Parameters:
args (Any)
metadata (Metadata)
- class src.object.function.Degree(*args, **metadata)¶
Bases:
DegreeMixin
,DenseArray
- Parameters:
args (Any)
metadata (Metadata)
- class src.object.function.DegreeMixin(*args, **metadata)¶
Bases:
FunctionMixin
,ABC
- Parameters:
args (Any)
metadata (Metadata)
- class src.object.function.FunctionMixin(*args, **metadata)¶
Bases:
ObjectMixin
,ABC
- Parameters:
args (Any)
metadata (Metadata)
- fixed_dtype¶
alias of
float64
- fixed_ndim: int = 2¶
- property nfuncs: int¶
- property npts: int¶
- class src.object.function.KNNDistance(*args, **metadata)¶
Bases:
KNNDistanceMixin
,DenseArray
- Parameters:
args (Any)
metadata (Any)
- class src.object.function.KNNDistanceMixin(*args, **metadata)¶
Bases:
FunctionMixin
,ABC
- Parameters:
args (Any)
metadata (Any)
- class src.object.function.LocalDistortion(*args, **metadata)¶
Bases:
LocalDistortionMixin
,DenseArray
- Parameters:
args (Any)
metadata (Any)
- class src.object.function.LocalDistortionMixin(*args, **metadata)¶
Bases:
FunctionMixin
,ABC
- Parameters:
args (Any)
metadata (Any)
- class src.object.function.NeighborCount(*args, **metadata)¶
Bases:
NeighborCountMixin
,DenseArray
- Parameters:
args (Any)
metadata (Any)
- class src.object.function.NeighborCountMixin(*args, **metadata)¶
Bases:
FunctionMixin
,ABC
- Parameters:
args (Any)
metadata (Any)
- fixed_dtype¶
alias of
int64
src.object.geometry_matrix_mixin module¶
- class src.object.geometry_matrix_mixin.GeometryMatrixMixin(*args, **metadata)¶
Bases:
ObjectMixin
,ABC
Mixin class providing common functionality for geometry-related matrices.
Adds default dimensionality of 2 of and default dtype of np.float64, along with convenience properties for querying matrix shape and point counts. Typically used as a base for distance, affinity, and Laplacian matrices.
- Parameters:
args (Any)
metadata (Metadata)
- fixed_dtype¶
alias of
float64
- fixed_ndim: int = 2¶
- property from_npts: int¶
Number of points corresponding to the rows of the matrix.
- Returns:
Number of rows in the matrix.
- Return type:
int
- property is_square: bool¶
Check if the matrix is square (number of rows equals number of columns).
- Returns:
True if the matrix is square, False otherwise.
- Return type:
bool
- property npts: int¶
Number of points in the matrix, assuming it is square.
- Returns:
Number of points (rows or columns) if the matrix is square.
- Return type:
int
- Raises:
ValueError – If the matrix is not square.
- property to_npts: int¶
Number of points corresponding to the columns of the matrix.
- Returns:
Number of columns in the matrix.
- Return type:
int
src.object.metadata module¶
- class src.object.metadata.Metadata(name=None, dist_type=None, aff_type=None, lap_type=None, radius=None, eps=None, ks=None, radii=None, ds=None, degree_type=None, aff_minus_id=None)¶
Bases:
object
- Parameters:
name (str | None)
dist_type (Literal['euclidean', 'cityblock', 'sqeuclidean'] | None)
aff_type (Literal['gaussian'] | None)
lap_type (Literal['geometric', 'random_walk', 'symmetric'] | None)
radius (float | None)
eps (float | None)
ks (Tuple[int, ...] | None)
radii (Tuple[float, ...] | None)
ds (Tuple[int, ...] | None)
degree_type (Literal['adjacency', 'affinity'] | None)
aff_minus_id (bool | None)
- aff_minus_id: bool | None¶
- aff_type: Literal['gaussian'] | None¶
- degree_type: Literal['adjacency', 'affinity'] | None¶
- dist_type: Literal['euclidean', 'cityblock', 'sqeuclidean'] | None¶
- ds: Tuple[int, ...] | None¶
- eps: float | None¶
- ks: Tuple[int, ...] | None¶
- lap_type: Literal['geometric', 'random_walk', 'symmetric'] | None¶
- name: str | None¶
- radii: Tuple[float, ...] | None¶
- radius: float | None¶
- src.object.metadata.optional_tuple_of_floats(instance, attribute, value)¶
- Parameters:
instance (object)
attribute (Attribute)
value (Tuple[float, ...] | None)
- Return type:
None
- src.object.metadata.optional_tuple_of_ints(instance, attribute, value)¶
- Parameters:
instance (object)
attribute (Attribute)
value (Tuple[int, ...] | None)
- Return type:
None
src.object.object_mixin module¶
Module contents¶
- class src.object.FunctionMixin(*args, **metadata)¶
Bases:
ObjectMixin
,ABC
- Parameters:
args (Any)
metadata (Any)
- fixed_dtype¶
alias of
float64
- fixed_ndim: int = 2¶
- property nfuncs: int¶
- property npts: int¶
- class src.object.GeometryMatrixMixin(*args, **metadata)¶
Bases:
ObjectMixin
,ABC
Mixin class providing common functionality for geometry-related matrices.
Adds default dimensionality of 2 of and default dtype of np.float64, along with convenience properties for querying matrix shape and point counts. Typically used as a base for distance, affinity, and Laplacian matrices.
- Parameters:
args (Any)
metadata (Any)
- fixed_dtype¶
alias of
float64
- fixed_ndim: int = 2¶
- property from_npts: int¶
Number of points corresponding to the rows of the matrix.
- Returns:
Number of rows in the matrix.
- Return type:
int
- property is_square: bool¶
Check if the matrix is square (number of rows equals number of columns).
- Returns:
True if the matrix is square, False otherwise.
- Return type:
bool
- property npts: int¶
Number of points in the matrix, assuming it is square.
- Returns:
Number of points (rows or columns) if the matrix is square.
- Return type:
int
- Raises:
ValueError – If the matrix is not square.
- property to_npts: int¶
Number of points corresponding to the columns of the matrix.
- Returns:
Number of columns in the matrix.
- Return type:
int
- class src.object.Metadata(name=None, dist_type=None, aff_type=None, lap_type=None, radius=None, eps=None, ks=None, radii=None, ds=None, degree_type=None, aff_minus_id=None)¶
Bases:
object
- Parameters:
name (str | None)
dist_type (Literal['euclidean', 'cityblock', 'sqeuclidean'] | None)
aff_type (Literal['gaussian'] | None)
lap_type (Literal['geometric', 'random_walk', 'symmetric'] | None)
radius (float | None)
eps (float | None)
ks (Tuple[int, ...] | None)
radii (Tuple[float, ...] | None)
ds (Tuple[int, ...] | None)
degree_type (Literal['adjacency', 'affinity'] | None)
aff_minus_id (bool | None)
- aff_minus_id: bool | None¶
- aff_type: Literal['gaussian'] | None¶
- degree_type: Literal['adjacency', 'affinity'] | None¶
- dist_type: Literal['euclidean', 'cityblock', 'sqeuclidean'] | None¶
- ds: Tuple[int, ...] | None¶
- eps: float | None¶
- ks: Tuple[int, ...] | None¶
- lap_type: Literal['geometric', 'random_walk', 'symmetric'] | None¶
- name: str | None¶
- radii: Tuple[float, ...] | None¶
- radius: float | None¶