zonoseg {zonohedra} | R Documentation |
zonoseg construction, querying, and printing
Description
Construct a zonoseg from a numeric matrix with one row.
A zonoseg ("zonotope" + "segment") is my own personal term
for a 1-dimensional zonotope.
I could not find an alternative term.
It is a linear image of the unit cube [0,1]^n
in the real numbers,
and a compact segment of reals.
The order of the generators has no effect on the zonoseg.
The image of the 2-transition subcomplex of [0,1]^n
is a compact subsegment of the zonoseg.
The order of the generators affects this subsegment in a major way.
Usage
zonoseg( mat, e0=0, ground=NULL )
## S3 method for class 'zonoseg'
getsegment( x )
## S3 method for class 'zonoseg'
getsegment2trans( x )
## S3 method for class 'zonoseg'
print( x, ... )
Arguments
mat |
a numeric matrix with 1 row whose entries determine the zonoseg.
One or more entries must be non-zero.
It is OK to have both positive and negative entries.
|
e0 |
threshold for an entry of |
ground |
The ground set of the associated matroid of rank 1 -
an integer vector in strictly increasing order, or |
x |
a |
... |
not used |
Details
A zonoseg object is a list with only 3 items:
the associated matroid, the endpoints of the segment,
and endpoints of the 2-transition subsegment.
print.zonoseg()
prints some information about the generators,
and the endpoints of the segment plus the 2 vertices of the unit cube
that map to these endpoints.
It prints similar data for the 2-transition subsegment.
Finally, it prints data on the associated matroid.
Value
zonoseg()
returns a list with S3 class 'zonoseg'
.
In case of error, e.g. invalid mat
,
the function prints an error message and returns NULL
.
getsegment()
and getsegment2trans()
return numeric 2-vectors - the min and max endpoints of the corresponding
segments.
print.zonoseg()
returns TRUE
or FALSE
.
Note
The ground set of positive integers should not be too sparse; otherwise performance may suffer.
References
Matroid - Wikipedia.
https://en.wikipedia.org/w/index.php?title=Matroid&oldid=1086234057
See Also
rank()
Examples
zono1 = zonoseg( c(1,-2,3,0,-3,-4) )
zono1
# generators: 6 -- 3 negative, 2 positive, and 1 loops.
#
# segment: [-9,4]
# value pcube.1 pcube.2 pcube.3 pcube.4 pcube.5 pcube.6
# zmin -9 0 1 0 0 1 1
# zmax 4 1 0 1 0 0 0
#
# 2-transition subsegment: [-8,3]
# value source.1 source.2 source.3 source.4 source.5 source.6
# tmin-2trans -8 1 1 0 0 1 1
# tmax-2trans 3 0 0 1 1 0 0
#
# matroid:
# ground set: 6 points {1 2 3 4 5 6}
# hyperplanes: 1 {4}
# rank: 1
# loops: 1 {4}
# multiple groups: 1 {1 2 3 5 6}
# uniform: FALSE
# paving: TRUE
# simple: FALSE
# This matroid is constructed from a 1x6 real matrix.
# 1 2 3 4 5 6
# [1,] 1 -2 3 0 -3 -4
#
# The summary of the simplified matroid is:
# ground set: 1 points {1}
# Point 1 corresponds to the multiple group {1 2 3 5 6} in the original ...
# hyperplanes: 1 {}
# rank: 1
# loops: 0 {}
# multiple groups: 0 {}
# uniform: TRUE
# paving: TRUE
# simple: TRUE
# This matroid is constructed from a 1x1 real matrix.
# 1+...+6
# [1,] -13
## so the 2-transition subsegment is a proper subset of the zonoseg