File: tools.py

package info (click to toggle)
fpylll 0.6.3-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 1,068 kB
  • sloc: python: 2,193; makefile: 172; sh: 89; ansic: 79; cpp: 48
file content (13 lines) | stat: -rw-r--r-- 227 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
# -*- coding: utf-8 -*-

from copy import copy


def compute_gram(B):
    """
        Compute the Gram matrix of the row-lattice with basis B
    """
    B.transpose()
    Bt = copy(B)
    B.transpose()
    return copy(B * Bt)