# vector(ToricDivisor) -- make the vector of coefficients

## Synopsis

• Function: vector
• Usage:
vector D
• Inputs:
• D, ,
• Outputs:
• , whose entries are the coefficients of D

## Description

This function returns the Vector whose $i$-th entry is the coefficient of $i$-th irreducible torus-invariant divisor. The indexing of the irreducible torus-invariant divisors is inherited from the indexing of the rays in the associated fan. This list can be viewed as an element of the group of torus-invariant Weil divisors.

Here are two simple examples.

 i1 : PP2 = toricProjectiveSpace 2; i2 : D1 = 2*PP2_0 - 7*PP2_1 + 3*PP2_2 o2 = 2*PP2 - 7*PP2 + 3*PP2 0 1 2 o2 : ToricDivisor on PP2 i3 : vector D1 o3 = | 2 | | -7 | | 3 | 3 o3 : ZZ i4 : assert(entries vector D1 === entries D1)
 i5 : D2 = toricDivisor convexHull (id_(ZZ^3) | - id_(ZZ^3)) o5 = D + D + D + D + D + D + D + D 0 1 2 3 4 5 6 7 o5 : ToricDivisor on normalToricVariety ({{1, 1, 1}, {-1, 1, 1}, {1, -1, 1}, {-1, -1, 1}, {1, 1, -1}, {-1, 1, -1}, {1, -1, -1}, {-1, -1, -1}}, {{0, 1, 2, 3}, {0, 1, 4, 5}, {0, 2, 4, 6}, {1, 3, 5, 7}, {2, 3, 6, 7}, {4, 5, 6, 7}}) i6 : vector D2 o6 = | 1 | | 1 | | 1 | | 1 | | 1 | | 1 | | 1 | | 1 | 8 o6 : ZZ i7 : assert(entries vector D2 === entries D2)