PowerDistance

org.appliedtopology.tda4j.alpha.PowerDistance
See thePowerDistance companion object

The data the algorithm needs: a finite set of sites with power weights.

Everything in the QP is expressible through squared distances alone, because

B_ij = (x_i - x)·(x_j - x) = ( d²(i,x) + d²(j,x) - d²(i,j) ) / 2 U_i = ( p(i) - p(x) - d²(i,x) ) / 2

so the solver never sees coordinates. Coordinates are optional and used only to materialise the witness map Phi (Definition 11).

Caveat: the QP is convex only if B is positive semidefinite, i.e. only if the squared distances come from a Euclidean embedding. Feeding in a non-Euclidean metric (as Vietoris-Rips happily allows) is not supported; the notion of "alpha complex" is not defined there either.

Attributes

Companion
object
Experimental
true
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Abstract methods

def size: Int
def squaredDistance(i: Int, j: Int): Double

Squared distance between sites i and j.

Squared distance between sites i and j.

Attributes

Concrete methods

def ambientDimension: Int

Ambient dimension if the sites carry coordinates, otherwise -1. Used to bound the working set size and to build the witness map.

Ambient dimension if the sites carry coordinates, otherwise -1. Used to bound the working set size and to build the witness map.

Attributes

final def ballRadius(i: Int, a: Double): Double

Radius of the weighted ball U_i at power level a (Definition 7); negative if U_i is empty.

Radius of the weighted ball U_i at power level a (Definition 7); negative if U_i is empty.

Attributes

def coordinate(i: Int, k: Int): Double

k-th coordinate of site i. Only called when hasCoordinates.

k-th coordinate of site i. Only called when hasCoordinates.

Attributes

final def dualLinear(x: Int, i: Int): Double

U_i for the quadratic program based at x, same paragraph.

U_i for the quadratic program based at x, same paragraph.

Attributes

final def gram(x: Int, i: Int, j: Int): Double

B_ij for the quadratic program based at x -- Eq. (11) specialised in the paragraph after Eq. (13).

B_ij for the quadratic program based at x -- Eq. (11) specialised in the paragraph after Eq. (13).

Attributes

def hasCoordinates: Boolean
def weight(i: Int): Double

The power weight p(x_i) of Eq. (6). Default 0 gives the ordinary (unweighted) alpha complex. Note the sign convention: pi_i(y) = ||y - x_i||^2 - p(i), so a larger weight is a larger ball.

The power weight p(x_i) of Eq. (6). Default 0 gives the ordinary (unweighted) alpha complex. Note the sign convention: pi_i(y) = ||y - x_i||^2 - p(i), so a larger weight is a larger ball.

Attributes