Construct a polyhedral fan?

Questions and problems about using polymake go here.
Drew
Posts: 6
Joined: 07 Mar 2013, 21:33

Construct a polyhedral fan?

Postby Drew » 27 Nov 2013, 21:21

I'm sorry if this is a newbie question, but I can't find helpful documentation for application fan.

I tried:

Code: Select all

fan > $p = new PolyhedralFan(INPUT_RAYS => [[1,0],[1,3]], INPUT_CONES=>[[0,1]]); fan > print $p->F_VECTOR; 2 fan > print $p->CONES; <{0} {1} >
I had hoped that the output would be more like

1 2 1

and

# Dimension 1
0
1
#Dimension 2
0 1

respectively. What am I doing wrong?
Last edited by assarf on 28 Nov 2013, 11:00, edited 1 time in total.
Reason: added the code environment.... its pretty

User avatar
assarf
Developer
Posts: 74
Joined: 12 Oct 2011, 15:52

Re: Construct a polyhedral fan?

Postby assarf » 28 Nov 2013, 10:57

Hi there,

no need apologizing for asking a question :-)

The output is indeed not right. One should expect the following:

Code: Select all

fan > $p = new PolyhedralFan(INPUT_RAYS => [[1,0],[1,3]], INPUT_CONES=>[[0,1]]); fan > print $p->F_VECTOR; 2 1 fan > print $p->CONES; <{0} {1} > <{0,1} >
Since the apex is the only 0-dim thing in a fan f_0 will always be 1. So this is omitted from the output to reduce redundancies. Meaning you don't get the 1 at the beginning.

Your fan is kind of "special" since it is basically just one cone with its faces. Meaning there is only one maximal cone. So the last component should be shown but isn't. So thank you for finding this bug. We're gonna look into it, and hopefully this will be fixed in the next (beta) release.

BUT when you take a fan, with more than one maximal cone, then the output should be as one would expect. Example:

Code: Select all

fan > $p = new PolyhedralFan(INPUT_RAYS => [[1,0,0],[1,1,0],[1,0,1],[1,1,1]], INPUT_CONES=>[[0,1,2],[1,2,3]]); fan > print $p->F_VECTOR; 4 5 2 fan > print $p->CONES; <{0} {1} {2} {3} > <{0 1} {0 2} {1 2} {1 3} {2 3} > <{0 1 2} {1 2 3} >
no signature

User avatar
assarf
Developer
Posts: 74
Joined: 12 Oct 2011, 15:52

Re: Construct a polyhedral fan?

Postby assarf » 28 Nov 2013, 18:59

This bug has been fixed in the newest perpetual beta version. click

EDIT: if you downloaded the beta yesterday, please update your working copy with an svn up, since there where some difficulties.
no signature

Drew
Posts: 6
Joined: 07 Mar 2013, 21:33

Re: Construct a polyhedral fan?

Postby Drew » 02 Dec 2013, 19:40

Thank you for the response and bugfix!

In fact I don't think I need to construct a fan with one cone, but I was trying to understand the simplest possible case to make sure I was doing it right.


Return to “Helpdesk”