# Path: clrs/_src/algorithms/geometry.py
# def segments_intersect(xs: _Array, ys: _Array) -> _Out:
#   def cross_product(x1, y1, x2, y2):
#   def direction(xs, ys, i, j, k):
#   def on_segment(xs, ys, i, j, k):
# def graham_scan(xs: _Array, ys: _Array) -> _Out:
#   def counter_clockwise(xs, ys, i, j, k):
# def jarvis_march(xs: _Array, ys: _Array) -> _Out:
#   def counter_clockwise(xs, ys, i, j, k):


from absl.testing import absltest
from absl.testing import parameterized
from clrs._src.algorithms import geometry
import numpy as np
    self.assertFalse(out)

    xs_yes = np.array([0, 1, 1, 0])
    ys_yes = np.array([0, 1, 0, 1])
    out, _ = geometry.segments_intersect(xs_yes, ys_yes)
    self.assertTrue(out)

    xs_just = np.array([-3, 5, 5, -4])
    ys_just = np.array([-3, 5, 5, -4])
    out, _ = geometry.segments_intersect(xs_just, ys_just)
    self.assertTrue(out)

  def test_segments_colinear(self):
    xs_no = np.array([-1, 1, 2, 4])
    ys_no = np.array([-1, 1, 2, 4])
    out, _ = geometry.segments_intersect(xs_no, ys_no)
    self.assertFalse(out)

    xs_yes = np.array([-3, 5, 1, 2])
    ys_yes = np.array([-3, 5, 1, 2])
    out, _ = geometry.segments_intersect(xs_yes, ys_yes)
    self.assertTrue(out)

    xs_just = np.array([-3, 5, 5, 7])
    ys_just = np.array([-3, 5, 5, 7])
    out, _ = geometry.segments_intersect(xs_just, ys_just)
    self.assertTrue(out)

  @parameterized.named_parameters(
      ("Graham scan convex hull", geometry.graham_scan),

# Path: clrs/_src/algorithms/geometry.py
# def segments_intersect(xs: _Array, ys: _Array) -> _Out:
#   def cross_product(x1, y1, x2, y2):
#   def direction(xs, ys, i, j, k):
#   def on_segment(xs, ys, i, j, k):
# def graham_scan(xs: _Array, ys: _Array) -> _Out:
#   def counter_clockwise(xs, ys, i, j, k):
# def jarvis_march(xs: _Array, ys: _Array) -> _Out:
#   def counter_clockwise(xs, ys, i, j, k):


# Path: clrs/_src/algorithms/geometry_test.py
from absl.testing import absltest
from absl.testing import parameterized
from clrs._src.algorithms import geometry
import numpy as np

    self.assertFalse(out)

    xs_yes = np.array([0, 1, 1, 0])
    ys_yes = np.array([0, 1, 0, 1])
    out, _ = geometry.segments_intersect(xs_yes, ys_yes)
    self.assertTrue(out)

    xs_just = np.array([-3, 5, 5, -4])
    ys_just = np.array([-3, 5, 5, -4])
    out, _ = geometry.segments_intersect(xs_just, ys_just)
    self.assertTrue(out)

  def test_segments_colinear(self):
    xs_no = np.array([-1, 1, 2, 4])
    ys_no = np.array([-1, 1, 2, 4])
    out, _ = geometry.segments_intersect(xs_no, ys_no)
    self.assertFalse(out)

    xs_yes = np.array([-3, 5, 1, 2])
    ys_yes = np.array([-3, 5, 1, 2])
    out, _ = geometry.segments_intersect(xs_yes, ys_yes)
    self.assertTrue(out)

    xs_just = np.array([-3, 5, 5, 7])
    ys_just = np.array([-3, 5, 5, 7])
    out, _ = geometry.segments_intersect(xs_just, ys_just)
    self.assertTrue(out)

  @parameterized.named_parameters(
      ("Graham scan convex hull", geometry.graham_scan),

      ("Jarvis' march convex hull", geometry.jarvis_march),