ott.geometry.grid.Grid.to_LRCGeometry#
- Grid.to_LRCGeometry(rank=0, tol=0.01, rng=None, scale=1.0)[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 matrices 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.
The conversion is exact, so
rank,tolandrngare ignored.- Parameters:
- Return type:
- Returns:
LRCGeometryobject.