fplll- Haskell bindings to <https://fplll.github.io/fplll/ fplll>

Safe HaskellNone



Bindings to FPLLL's implementation of the LLL Algorithm.



lllReduce :: LLLOptions -> [[Integer]] -> Either RedStatus [[Integer]] Source #

Compute an LLL-reduced basis for the given lattice. Each item of the list is a basis vector. Returns a Left RedStatus on failure.

lllReduceTrack :: LLLOptions -> [[Integer]] -> Either RedStatus ([[Integer]], [[Integer]]) Source #

Similar to lllReduce, but additionally return (in the second output) the operations that were applied to the basis vectors. In other words, the second return value tracks the operations applied to the basis vectors by applying them to the identity matrix as well.

lllReduceTrackInv :: LLLOptions -> [[Integer]] -> Either RedStatus ([[Integer]], [[Integer]], [[Integer]]) Source #

Like lllReduceTrackInv, but return the inverse matrix of the applied operations in the third output.

data LLLOptions Source #

Options to configure the LLL reduction algorithm.




  • delta :: Double

    δ controls the Lovász condition, i.e. how much the length of consecutive Gram-Schmidt orthogonal basis vectors can decrease.

  • eta :: Double

    η is an upper bound on the largest Gram-Schmidt coefficient, i.e. how far from orthogonal the reduced basis can be.

  • method :: LLLMethod

    LLL reduction method.

  • floatType :: FloatType

    What sort of floating point to use for orthogonalization.

  • precision :: Int

    Bits of precision for floating point if ftMpfr is used. Chooses automatically if set to zero.

  • flags :: LLLFlags

    Extra options for the LLL reduction.

Eq LLLOptions Source # 
Instance details

Defined in Math.Lattices.Fplll.LLL


(==) :: LLLOptions -> LLLOptions -> Bool

(/=) :: LLLOptions -> LLLOptions -> Bool

Ord LLLOptions Source # 
Instance details

Defined in Math.Lattices.Fplll.LLL

Show LLLOptions Source # 
Instance details

Defined in Math.Lattices.Fplll.LLL


showsPrec :: Int -> LLLOptions -> ShowS

show :: LLLOptions -> String

showList :: [LLLOptions] -> ShowS