def _vector_to_algnumber(vector_repr, field):
    """
    vector (w.r.t. theta) -> omega
    """
    int_vector, denom = module._toIntegerMatrix(vector_repr)
    int_vector = int_vector[1].compo  # Submodule -> list
    omega = algfield.BasicAlgNumber([int_vector, denom], field.polynomial)
    return omega
Exemple #2
0
def _vector_to_algnumber(vector_repr, field):
    """
    vector (w.r.t. theta) -> omega
    """
    int_vector, denom = module._toIntegerMatrix(vector_repr)
    int_vector = int_vector[1].compo # Submodule -> list
    omega = algfield.BasicAlgNumber(
            [int_vector, denom], field.polynomial)
    return omega
def _matrix_to_algnumber_list(matrix_repr, field):
    """
    matrix (w.r.t. theta) -> [omega_i]
    """
    int_matrix, denom = module._toIntegerMatrix(matrix_repr)
    omega = []
    for i in range(1, int_matrix.column + 1):
        omega_i = algfield.BasicAlgNumber([int_matrix[i], denom],
                                          field.polynomial)
        omega.append(omega_i)
    return omega
Exemple #4
0
def _matrix_to_algnumber_list(matrix_repr, field):
    """
    matrix (w.r.t. theta) -> [omega_i]
    """
    int_matrix, denom = module._toIntegerMatrix(matrix_repr)
    omega = []
    for i in range(1, int_matrix.column + 1):
        omega_i = algfield.BasicAlgNumber(
            [int_matrix[i], denom], field.polynomial)
        omega.append(omega_i)
    return omega