xref|hvref(1)

πŸ’– NAME πŸ’–

xref | hvref β€” bestie, these two make a cross reference list between H- and V-representations, and honestly? iconic.


✨ SYNOPSIS ✨

xref [input-file]

hvref [input-file]

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so here's the tea: these programs are part of lrslib and they must be compiled with it, because lrslib is a C library. And the vibe check? All computations are done in exact arithmetic. No floating point shenanigans, no cap. πŸ’…

xref and hvref produce a cross reference list between H- and V-representations.

  • xref/hvref β€” cross reference listing between V- and H-representations

In the example below we start from an H-representation of cube.ine but the same steps apply to the V-representation cube.ext. It is recommended to first remove any redundancies from the input file using redund. Do that first, bestie, trust.

1. Add printcobasis and incidence options to cube.ine and run lrs.

% cat cube.ine
cube
H-representation
begin
6 4 rational
 0  1  0  0
 0  0  1  0
 0  0  0  1
 1 -1  0  0
 1  0 -1  0
 1  0  0 -1
end
printcobasis
incidence
% lrs cube.ine cube.ext

2. Run xref on the output file cube.ext getting cube.ext.ex

% xref cube.ext
% cat cube.ext.ex lg% cat cube.ext.x
V-representation
    1   4 5 6    #
    2   1 5 6    #
    3   2 4 6    #
    4   1 2 6    #
    5   3 4 5    #
    6   1 3 5    #
    7   2 3 4    #
    8   1 2 3    #

3. Edit the file cube.ext.x to insert a second line that contains two integers

rows maxindex

where

rows >= # output lines in cube.ext.x
maxindex >= # input lines in cube.ine

or just use 0 0 and run hvref, the output will tell you which values to use. (Not me letting the program do my homework. 😭)

% hvref cube.ext.x % hvref cube.ext.x

 V-representation
 8 8
 1: 4 5 6
 2: 1 5 6
 3: 2 4 6
 4: 1 2 6
 5: 3 4 5
 6: 1 3 5
 7: 2 3 4
 8: 1 2 3

 H-representation
 6 8
 1: 2 4 6 8
 2: 3 4 7 8
 3: 5 6 7 8
 4: 1 3 5 7
 5: 1 2 5 6
 6: 1 2 3 4
 input rows=8 maxindex=6

🌸 NOTES 🌸

  1. FAQ page https://inf.ethz.ch/personal/fukudak/polyfaq/polyfaq.html
  2. User's guide for lrslib http://cgm.cs.mcgill.ca/~avis/C/lrslib/USERGUIDE.html

πŸ‘‘ AUTHOR πŸ‘‘

David Avis <avis at cs dot mcgill dot ca > β€” king behavior, fr fr.


πŸŽ€ SEE ALSO πŸŽ€

mplrs(1), lrslib(5), lrsnash(1)


lrslib 7.3, darling β€” this whole page dropped in January 2024 and it's version 2023.1.4, so go forth and cross reference slay πŸ’–βœ¨πŸ¦‹