h = hilbertSamuelFunction(M, n)
L = hilbertSamuelFunction(M, n0, n1)
h = hilbertSamuelFunction(q, M, n)
L = hilbertSamuelFunction(q, M, n0, n1)
Given a module over a local ring, a parameter ideal, and an integer, this method computes the Hilbert-Samuel function for the module. If parameter ideal is not given, the maximal ideal is assumed.
Note: If computing at index n is fast but slows down at n+1, try computing at range (n, n+1). On the other hand, if computing at range (n, n+m) is slow, try breaking up the range.
To learn more read Eisenbud, Commutative Algebra, Chapter 12.
Here is an example from Computations in Algebraic Geometry with Macaulay2, pp. 61:
|
|
|
|
|
|
An example of using a parameter ideal:
|
|
|
|
|
|
Hilbert-Samuel function with respect to a parameter ideal other than the maximal ideal can be slower.
The object hilbertSamuelFunction is a method function.