View LLV_decomposition.sage
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def hodge_num(d, V): | |
""" | |
Hodge numbers of a g-module V for a hyperkähler manifold of dimension d | |
""" | |
n = d / 2 | |
m = V.weight_multiplicities() | |
M = matrix([[0 for i in range(d + 1)] for j in range(d + 1)]) | |
for w in m: | |
M[w[0] + w[1] + n, w[0] - w[1] + n] += m[w] | |
return M |
View chern_numbers.sage
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NTHREADS = 8 # use this to specify the number of threads | |
class TnVariety: | |
""" | |
A variety with a torus action for computing with Bott's formula | |
""" | |
def __init__(self, n, points, weight): | |
self.n = n | |
self.points = points | |
self.weight = weight |