torchsig.utils.coordinate_systemΒΆ

Library for overlap detection in spectrograms to control co-channel interference.

This module provides classes and functions to define 2D coordinates and axis-aligned rectangles, and to detect overlaps between rectangles using line-segment intersection and containment tests.

Functions

counter_clock_wise

Determine if three points a, b, c are in counter-clockwise order.

is_corner_in_rectangle

Check if a corner point is within the bounds of a reference rectangle.

is_rectangle_inside_rectangle

Check if rectangle_1 is completely inside rectangle_2.

is_rectangle_overlap

Check if two rectangles overlap by intersection or containment.

is_within_range

Check if a coordinate lies within a closed interval on the x-axis.

line_intersection

Check if the line segments AB and CD intersect.

Classes

Coordinate

Represents a point in 2D space with x and y coordinates.

Rectangle

Represents an axis-aligned rectangle defined by two opposite corners.