bregman.ball package

Submodules

bregman.ball.base module

class bregman.ball.base.Ball(manifold: BregmanManifold, center: Point, radius: float, coords: Coords)

Bases: Generic[TBregmanManifold], CoordObject, ABC

Abstract class for geometric balls defined on Bregman manifolds.

Parameters:
  • center – Ball center.

  • radius – Ball radius.

  • manifold – Bregman manifold which the geometric ball is defined on.

abstract is_in(other: Point) bool

Boolean test if a point is in the geometric ball.

Parameters:

other – Point to be tested.

Returns:

Boolean value of if other is in the geometric ball or not.

parametrized_curve() Curve

Returns parametric curve of the geometric ball, if implemented.

Returns:

Curve object which parameterizes the boundary of the geometric ball.

bregman.ball.bregman module

class bregman.ball.bregman.BregmanBall(manifold: BregmanManifold, center: Point, radius: float, dcoords: DualCoords = DualCoords.THETA)

Bases: Ball[BregmanManifold]

Bregman ball defined on Bregman manifolds.

Parameters:

bregman_divergence – Bregman divergence being used to calculate the Bregman ball.

is_in(other: Point) bool

Boolean test if point is in the Bregman ball.

Parameters:

other – Point to be tested.

Returns:

Boolean value of if other is in the Bregman ball or not.

bregman.ball.bregman.bregman_badoiu_clarkson(manifold: BregmanManifold, points: list[Point], T: int, dcoords: DualCoords = DualCoords.THETA) BregmanBall

Generalized Badoiu & Clarkson algorithm for calculating the smallest enclosing Bregman ball from a set of points.

https://link.springer.com/chapter/10.1007/11564096_65

Parameters:
  • manifold – Bregman manifold which the Bregman ball is defined on.

  • points – Points being enclosed by the output Bregman ball.

  • T – Number of iterations of the algorithm.

  • dcoords – Bregman generator being used to construct Bregman ball.

Returns:

Approximate smallest enclosing Bregman ball.

bregman.ball.parameterized module

class bregman.ball.parameterized.KL2DBregmanBallCurve(center: Point, radius: float)

Bases: Curve

path(t: float) Point

Path from top right quadrant counter-clockwise

Module contents