Learn R Programming

TML (version 2.3.0)

HAR.TLineSeg: Uniformly sample from a max-plus tropical line segment

Description

This function uses a hit-and-run sampler to uniformly sample from a max-plus tropical line segment

Usage

HAR.TLineSeg(D1, D2, tadd = max)

Value

point on the line segment defined by D1 and D2

Arguments

D1

point in the tropical projective torus

D2

point in the tropical projective torus

tadd

string; max indicates max-plus addition, min indicates min-plus addition. Defaults to max

Author

Ruriko Yoshida ryoshida@nps.edu

References

Yoshida, Ruriko, Keiji Miura and David Barnhill (2022). Hit and Run Sampling from Tropically Convex Sets.

Examples

Run this code
D1 <-c(0,4,2)
D2 <- c(0,7,-1)
HAR.TLineSeg(D1, D2,tadd=max)
HAR.TLineSeg(D1, D2,tadd=min)

Run the code above in your browser using DataLab