ott.geometry.grid.Grid.to_LRCGeometry#

Grid.to_LRCGeometry(scale=1.0, **kwargs)[source]#

Converts grid to low-rank geometry.

Conversion is carried out by taking advantage of the fact that the true cost matrix of a grid geometry is a sum of kronecker products of local cost matrices (for each dimension) with matrice of 1’s (both on left and right sides) of varying dimension. Each of the matrices in that sum can be factorized if each of these cost matrices can be factorized, which we do by forcing a conversion to a low rank geometry object.

Parameters
  • scale (float) – Value used to rescale the factors of the low-rank geometry. Useful when this geometry is used in the linear term of fused GW.

  • kwargs (Any) – Keyword arguments, such as rank, to to_LRCGeometry() used when geometries on each slice are not low-rank.

Return type

LRCGeometry

Returns

LRCGeometry object.