Do you mean sage: IntegerListsLex(length=2, min_sum=0, max_sum=5).list() [[5, 0], [4, 1], [4, 0], [3, 2], [3, 1], [3, 0], [2, 3], [2, 2], [2, 1], [2, 0], [1, 4], [1, 3], [1, 2], [1, 1], [1, 0], [0, 5], [0, 4], [0, 3], [0, 2], [0, 1], [0, 0]]
On 28/09/2017 15:55, u...@umich.edu wrote:
In preparation for Sage Days 91, I'm looking at the thesis of Malcolm Kotok (as in https://trac.sagemath.org/ticket/19865 ). That thesis incorporates a class to list all non-negative integer vectors of a fixed length with sum less than n. I see that we already have an IntegerVectors class for non-negative integer vectors with sum exactly n: http://doc.sagemath.org/html/en/reference/combinat/sage/combinat/integer_vector.html Would it be useful to expand that class to list vectors with sum at most n? If so, what should the input parameters look like? --Ursula Whitcher.
-- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.