The default labels of the ground set of a matroid with cardinality n is from 0 to n-1. How to change it to from 1 to n ? Thanks.

Internally, polymake will always use indices starting at zero.

But you can use LABELS to make things look differently.

Code: Select all

```
matroid > $F = fano_matroid;
matroid > print $F->CIRCUITS;
{0 1 6}
{0 2 5}
{0 3 4}
{1 2 3}
{1 4 5}
{2 4 6}
{3 5 6}
{0 1 2 4}
{0 1 3 5}
{0 2 3 6}
{0 4 5 6}
{1 2 5 6}
{1 3 4 6}
{2 3 4 5}
```

Code: Select all

```
matroid > $F->LABELS="1 2 3 4 a b c";
matroid > print $F->LABELS->[0];
1
matroid > print rows_labeled($F->CIRCUITS,undef,$F->LABELS);
0:1 2 c
1:1 3 b
2:1 4 a
3:2 3 4
4:2 a b
5:3 a c
6:4 b c
7:1 2 3 a
8:1 2 4 b
9:1 3 4 c
10:1 a b c
11:2 3 b c
12:2 4 a c
13:3 4 a b
```

Thanks a lot.

But if use the following, labels in the figure are still from 0 to 6. Is it related to VISUAL()?

Code: Select all

```
$l=$F->LATTICE_OF_FLATS;
$l->VISUAL();
```

Powered by phpBB® Forum Software © phpBB Limited