Page 1 of 1

Simple question regarding converting polytope to facets

Posted: 06 Oct 2020, 03:50
by paulcheung
Hi all, I have a simple question regarding the function. I have the following code

$p = new Polytope(POINTS=>[[1,1,1],[1,1,0]]);
print $p->FACES;

The result prints:

0 0 1
1 0 -1

It stands for \( 1\geq x_2 \), \( x_2 \geq 0 \). Yet, where is the condition \( x_1=1 \)? I was hoping to get

-1 1 0
1 -1 0
0 0 1
1 0 -1

Yet, it isn't the case. Why? Can anyone help me with this? Thank you!

Re: Simple question regarding converting polytope to facets

Posted: 06 Oct 2020, 09:59
by opfer
It should be available through

Code: Select all

print $p->AFFINE_HULL;
Best regards,
Thomas

Re: Simple question regarding converting polytope to facets

Posted: 06 Oct 2020, 11:20
by joswig
Yes, inequalities and equalities are kept seperate. You can use them in the way you described as input (by specifying INEQUALITIES and maybe EQUATIONS), but FACETS and AFFINE_HULL give irredundant output.

Re: Simple question regarding converting polytope to facets

Posted: 08 Oct 2020, 16:37
by paulcheung
Thank you for all the replies! I got it now.