-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Haskell bindings to -- -- Haskell bindings to fplll @package fplll @version 0.1.0.0 module Math.Lattices.Fplll.Internal newtype LLLMethod LLLMethod :: CInt -> LLLMethod newtype FloatType FloatType :: CInt -> FloatType newtype RedStatus RedStatus :: CInt -> RedStatus -- | Flags controlling LLL reduction. Can be combined using \/. newtype LLLFlags LLLFlags :: CInt -> LLLFlags allocaMpz :: Int -> (Ptr MPZ -> IO a) -> IO a peekBasis :: Int -> Int -> Ptr MPZ -> IO [[Integer]] pokeBasis :: Int -> Int -> Ptr MPZ -> [[Integer]] -> IO () allocaAndPokeBasis :: [[Integer]] -> (Int -> Int -> Ptr MPZ -> IO a) -> IO a allEqual :: Eq a => [a] -> Bool c_lllDefaultDelta :: Ptr CDouble c_lllDefaultEta :: Ptr CDouble c_lmWrapper :: Ptr CInt c_lmProved :: Ptr CInt c_lmHeuristic :: Ptr CInt c_lmFast :: Ptr CInt c_lllMethodStr :: Ptr (Ptr CString) c_lllVerbose :: Ptr CInt c_lllEarlyRed :: Ptr CInt c_lllSiegel :: Ptr CInt c_lllDefault :: Ptr CInt c_ftDefault :: Ptr CInt c_ftDouble :: Ptr CInt c_ftLongDouble :: Ptr CInt c_ftDpe :: Ptr CInt c_ftDD :: Ptr CInt c_ftQD :: Ptr CInt c_ftMpfr :: Ptr CInt c_floatTypeStr :: Ptr (Ptr CString) c_redSuccess :: Ptr CInt c_redGsoFailure :: Ptr CInt c_redBabaiFailure :: Ptr CInt c_redLllFailure :: Ptr CInt c_redEnumFailure :: Ptr CInt c_redBkzFailure :: Ptr CInt c_redBkzTimeLimit :: Ptr CInt c_redBkzLoopsLimit :: Ptr CInt c_redHlllFailure :: Ptr CInt c_redHlllNormFailure :: Ptr CInt c_redHlllSrFailure :: Ptr CInt c_redStatusStr :: Ptr (Ptr CString) c_lll_reduction :: CInt -> CInt -> Ptr MPZ -> CDouble -> CDouble -> LLLMethod -> FloatType -> CInt -> LLLFlags -> IO RedStatus c_lll_reduction_u_id :: CInt -> CInt -> Ptr MPZ -> Ptr MPZ -> CDouble -> CDouble -> LLLMethod -> FloatType -> CInt -> LLLFlags -> IO RedStatus c_lll_reduction_uinv_id :: CInt -> CInt -> Ptr MPZ -> Ptr MPZ -> Ptr MPZ -> CDouble -> CDouble -> LLLMethod -> FloatType -> CInt -> LLLFlags -> IO RedStatus instance Foreign.Storable.Storable Math.Lattices.Fplll.Internal.LLLFlags instance GHC.Classes.Ord Math.Lattices.Fplll.Internal.LLLFlags instance GHC.Classes.Eq Math.Lattices.Fplll.Internal.LLLFlags instance Foreign.Storable.Storable Math.Lattices.Fplll.Internal.RedStatus instance GHC.Classes.Ord Math.Lattices.Fplll.Internal.RedStatus instance GHC.Classes.Eq Math.Lattices.Fplll.Internal.RedStatus instance Foreign.Storable.Storable Math.Lattices.Fplll.Internal.FloatType instance GHC.Classes.Ord Math.Lattices.Fplll.Internal.FloatType instance GHC.Classes.Eq Math.Lattices.Fplll.Internal.FloatType instance Foreign.Storable.Storable Math.Lattices.Fplll.Internal.LLLMethod instance GHC.Classes.Ord Math.Lattices.Fplll.Internal.LLLMethod instance GHC.Classes.Eq Math.Lattices.Fplll.Internal.LLLMethod module Math.Lattices.Fplll.Types data LLLMethod -- | Automatically select the LLL implementation. lmWrapper :: LLLMethod -- | Use a slower method that has proven precision. lmProved :: LLLMethod -- | Use the heuristic method. lmHeuristic :: LLLMethod -- | Use the fast but less precise LLL method. lmFast :: LLLMethod data FloatType -- | Automatically select floating point type. ftDefault :: FloatType -- | Use double precision. ftDouble :: FloatType -- | Use the long double type. ftLongDouble :: FloatType -- | Use DPE (Double Plus Exponent) floating point representation, which -- can represent values with extra large exponents. ftDpe :: FloatType -- | Use double-double arithmetic, where each value is represented as the -- sum of two double values, representing the most and least significant -- bits, respectively. ftDD :: FloatType -- | Use quad-double arithmetic. Values are represented as the sum of four -- doubles. ftQD :: FloatType -- | Use MPFR for arbitrary precision arithmetic. ftMpfr :: FloatType -- | Flags controlling LLL reduction. Can be combined using \/. data LLLFlags -- | Default options, i.e. no flags. lllDefault :: LLLFlags lllVerbose :: LLLFlags lllEarlyRed :: LLLFlags lllSiegel :: LLLFlags data RedStatus -- | Algorithm returned successfully. In some cases a RedStatus is -- only returned in case of an error, such as with lllReduce, in -- which case this value will never be returned. redSuccess :: RedStatus redGsoFailure :: RedStatus redBabaiFailure :: RedStatus redLllFailure :: RedStatus redEnumFailure :: RedStatus redBkzFailure :: RedStatus redBkzTimeLimit :: RedStatus redBkzLoopsLimit :: RedStatus redHlllFailure :: RedStatus redHlllNormFailure :: RedStatus redHlllSrFailure :: RedStatus instance GHC.Show.Show Math.Lattices.Fplll.Internal.LLLMethod instance GHC.Show.Show Math.Lattices.Fplll.Internal.FloatType instance GHC.Show.Show Math.Lattices.Fplll.Internal.RedStatus instance GHC.Show.Show Math.Lattices.Fplll.Internal.LLLFlags instance Algebra.Lattice.JoinSemiLattice Math.Lattices.Fplll.Internal.LLLFlags instance Algebra.Lattice.MeetSemiLattice Math.Lattices.Fplll.Internal.LLLFlags instance Algebra.Lattice.Lattice Math.Lattices.Fplll.Internal.LLLFlags instance Algebra.Lattice.BoundedJoinSemiLattice Math.Lattices.Fplll.Internal.LLLFlags instance Algebra.Lattice.BoundedMeetSemiLattice Math.Lattices.Fplll.Internal.LLLFlags instance Algebra.SemiBoundedLattice.LowerBoundedLattice Math.Lattices.Fplll.Internal.LLLFlags instance Algebra.SemiBoundedLattice.UpperBoundedLattice Math.Lattices.Fplll.Internal.LLLFlags instance Algebra.Lattice.BoundedLattice Math.Lattices.Fplll.Internal.LLLFlags instance Algebra.SemiBoundedLattice.DistributiveLattice Math.Lattices.Fplll.Internal.LLLFlags instance Algebra.SemiBoundedLattice.LowerBoundedDistributiveLattice Math.Lattices.Fplll.Internal.LLLFlags instance Algebra.SemiBoundedLattice.UpperBoundedDistributiveLattice Math.Lattices.Fplll.Internal.LLLFlags instance Algebra.SemiBoundedLattice.SemiHeytingAlgebra Math.Lattices.Fplll.Internal.LLLFlags instance Algebra.SemiBoundedLattice.SemiCoHeytingAlgebra Math.Lattices.Fplll.Internal.LLLFlags instance Algebra.SemiBoundedLattice.HeytingAlgebra Math.Lattices.Fplll.Internal.LLLFlags instance Algebra.SemiBoundedLattice.CoHeytingAlgebra Math.Lattices.Fplll.Internal.LLLFlags instance Algebra.SemiBoundedLattice.BiHeytingAlgebra Math.Lattices.Fplll.Internal.LLLFlags instance Algebra.SemiBoundedLattice.BooleanAlgebra Math.Lattices.Fplll.Internal.LLLFlags -- | Bindings to FPLLL's implementation of the LLL Algorithm. module Math.Lattices.Fplll.LLL -- | Compute an LLL-reduced basis for the given lattice. Each item of the -- list is a basis vector. Returns a Left RedStatus on -- failure. lllReduce :: LLLOptions -> [[Integer]] -> Either RedStatus [[Integer]] -- | 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. lllReduceTrack :: LLLOptions -> [[Integer]] -> Either RedStatus ([[Integer]], [[Integer]]) -- | Like lllReduceTrackInv, but return the inverse matrix of the -- applied operations in the third output. lllReduceTrackInv :: LLLOptions -> [[Integer]] -> Either RedStatus ([[Integer]], [[Integer]], [[Integer]]) -- | Options to configure the LLL reduction algorithm. data LLLOptions LLLOptions :: Double -> Double -> LLLMethod -> FloatType -> Int -> LLLFlags -> LLLOptions -- | δ controls the Lovász condition, i.e. how much the length of -- consecutive Gram-Schmidt orthogonal basis vectors can decrease. [delta] :: LLLOptions -> Double -- | η is an upper bound on the largest Gram-Schmidt coefficient, i.e. how -- far from orthogonal the reduced basis can be. [eta] :: LLLOptions -> Double -- | LLL reduction method. [method] :: LLLOptions -> LLLMethod -- | What sort of floating point to use for orthogonalization. [floatType] :: LLLOptions -> FloatType -- | Bits of precision for floating point if ftMpfr is used. Chooses -- automatically if set to zero. [precision] :: LLLOptions -> Int -- | Extra options for the LLL reduction. [flags] :: LLLOptions -> LLLFlags defaultLLL :: LLLOptions instance GHC.Show.Show Math.Lattices.Fplll.LLL.LLLOptions instance GHC.Classes.Ord Math.Lattices.Fplll.LLL.LLLOptions instance GHC.Classes.Eq Math.Lattices.Fplll.LLL.LLLOptions