minkowski¶
Module containing EdgeDefinitions based on the Minkowski Metric.
- graphnet.models.data_representation.graphs.edges.minkowski.compute_minkowski_distance_mat(x, y, c, space_coords, time_coord)[source]¶
- Compute all pairwise Minkowski distances. - Parameters:
- x ( - Tensor) – First tensor of shape (n, d).
- y ( - Tensor) – Second tensor of shape (m, d).
- c ( - float) – Speed of light, in scaled units.
- space_coords ( - Optional[- List[- int]], default:- None) – Indices of space coordinates.
- time_coord ( - Optional[- int], default:- 3) – Index of time coordinate.
 
- Return type:
- Tensor
 - Returns: Matrix of shape (n, m) of all pairwise Minkowski distances. 
- class graphnet.models.data_representation.graphs.edges.minkowski.MinkowskiKNNEdges(*args, **kwargs)[source]¶
- Bases: - EdgeDefinition- Builds edges between most light-like separated. - Initialize MinkowskiKNNEdges. - Parameters:
- nb_nearest_neighbours ( - int) – Number of neighbours to connect to.
- c ( - float) – Speed of light, in scaled units.
- time_like_weight ( - float, default:- 1.0) – Preference to time-like over space-like edges. Scales time_like distances by this value, before finding nearest neighbours.
- space_coords ( - Optional[- List[- int]], default:- None) – Coordinates of x, y, z.
- time_coord ( - Optional[- int], default:- 3) – Coordinate of time.
- args (Any) 
- kwargs (Any) 
 
- Return type:
- object