Introduces: - class for Picard--Fuchs operators and their ideals - class for periods (their complex linear combinations in the Frobenius bases) Implements: - method to obtain operator from period - method to get power series solution (at given indicials) to PF ideal --------- Co-authored-by: Julian Piribauer <julian.piribauer@gmail.com> Reviewed-on: #13
16 lines
571 B
Python
16 lines
571 B
Python
"""
|
|
Utility functions for the Calabi-Yau period geometry project.
|
|
"""
|
|
|
|
def _multi_indices(no_variables, total_degree: int) -> list:
|
|
# All no_variables-tuples of non-negative integers whose entries sum to at most total_degree.
|
|
def helper(remaining_vars, remaining_degree):
|
|
if remaining_vars == 0:
|
|
yield ()
|
|
return
|
|
for first in range(remaining_degree + 1):
|
|
for rest in helper(remaining_vars - 1, remaining_degree - first):
|
|
yield (first,) + rest
|
|
|
|
return list(helper(no_variables, total_degree))
|