Skip to contents

Rotate one adjacent face into the query's face before constructing a local chart. This function certifies a conservative one- or two-face chart; it does not force a chart through a corner or through three or more faces.

Usage

unfold.simplex.chart(X, query, face.tol = 1e-12, distance.tol = 1e-08)

Arguments

X

Nonnegative numeric matrix, with support points in rows. Each row must have a positive maximum; rows are max-normalized internally.

query

Nonnegative query vector with length ncol(X) and positive maximum.

face.tol

Nonnegative tolerance for identifying tied maxima.

distance.tol

Positive absolute tolerance for agreement between unfolded Euclidean chords and intrinsic distances.

Value

A list with certified, status, coordinates, query, faces, radius, clearance and distance.error. Coordinates and query are NULL when the chart is uncertified. Coordinates retain the constant reference column.

Details

On reference face i, an adjacent-face j point is mapped to v[i]=1, v[j]=2-u[i], retaining the other coordinates. The query is included when identifying faces. Tied maxima or more than two faces yield an uncertified chart. For two faces, the intrinsic support radius must be less than the query's distance to every other face, and all support/query pair distances must agree with the unfolded chords. Distances use dgraphs::linf.simplex.distances(), including intermediate faces. Certification costs quadratic work and memory in the local support size. A failed certificate does not prove that no useful chart exists.

Examples

X <- rbind(c(1, .9, .2), c(.9, 1, .2), c(1, .8, .3))
unfold.simplex.chart(X, c(1, .95, .2))
#> $certified
#> [1] TRUE
#> 
#> $status
#> [1] "two.faces"
#> 
#> $coordinates
#>  [,1] [,2] [,3]
#>     1  0.9  0.2
#>     1  1.1  0.2
#>     1  0.8  0.3
#> 
#> $query
#> [1] 1.00 0.95 0.20
#> 
#> $faces
#> [1] 1 2
#> 
#> $radius
#> [1] 0.1802776
#> 
#> $clearance
#> [1] 0.8
#> 
#> $distance.error
#> [1] 1.110223e-16
#>