API Reference
- class tmsnets.core.PolynomialNetConstructor[source]
Bases:
object
A class implementing algorithms for constructing (t,m,s)-networks using polynomials over finite fields.
Current implementation include Niederreiter algorithm and Rosenbloom-Tsfasman algorithm.
- static construct_niederreiter(b, t, m, s, verbose=False)[source]
Constructing (t, m, s)-net via Niederreiter algorithm
- Parameters:
b – base of (t, m, s)-net. Using for calculation over GF(b).
t – quality measure of (t, m, s)-net.
m – the number of points in the (t, m, s)-net is characterized as b^m
s – dimension of (t, m, s)-net
- static construct_rosenbloom_tsfasman(q, m, s, beta=None)[source]
Constructs a (0, m, s)-network using the Rosenblum-Tsfasman method.Due to its combinatorial nature, this method takes a long time to work.
- Parameters:
q – base of (0, m, s)-net. Using for calculation over GF(q).
m – the number of points in the (0, m, s)-net is characterized as q^m
s – dimension of (0, m, s)-net
- class tmsnets.core.TMSNet(t, m, s, b, points)[source]
Bases:
object
A class for storing, analyzing, and visualizing (t,m,s)-networks.
- Parameters:
b – base of (t, m, s)-net. Using for calculation over GF(b).
t – quality measure of (t, m, s)-net.
m – the number of points in the (t, m, s)-net is characterized as b^m
s – dimension of (t, m, s)-net
- tmsnets.core.convert_points_to_fractions(points: ndarray, b: int) ndarray [source]
Converts an array of floating-point coordinates to an array of Fraction objects. This is crucial for exact arithmetic when checking if points fall into b-adic intervals.
- tmsnets.core.generate_D_A_pairs(t: int, m: int, s: int, b: int) Dict[Tuple[int, ...], List[Tuple[int, ...]]] [source]
Generates a dictionary that maps each vector D to a list of all possible corresponding vectors A. For a given D=(d_1, …, d_s), a vector A is (a_1, …, a_s) where 0 <= a_j < b^d_j for each j.