HLearn-approximation 1.0.0 → 1.1.0
raw patch · 3 files changed
+9/−1 lines, 3 files
Files
- HLearn-approximation.cabal +1/−1
- src/HLearn/NPHard/BinPacking.hs +4/−0
- src/HLearn/NPHard/Scheduling.hs +4/−0
HLearn-approximation.cabal view
@@ -1,5 +1,5 @@ Name: HLearn-approximation-Version: 1.0.0+Version: 1.1.0 Description: Approximation algorithms for NP-hard problems Category: Data Mining, Machine Learning, Data Structures License: BSD3
src/HLearn/NPHard/BinPacking.hs view
@@ -75,6 +75,10 @@ type FunctorConstraint (BinPacking n) x = (Ord x, Norm x, SingI n) fmap f sched = bfd $ CK.fmap f $ vector sched +instance CK.Monad (BinPacking n) where+ return = train1dp+ join (BinPacking v _) = bfd $ CK.join $ CK.fmap vector v+ ------------------------------------------------------------------------------- -- Training
src/HLearn/NPHard/Scheduling.hs view
@@ -103,6 +103,10 @@ type FunctorConstraint (Scheduling n) x = (Ord x, Norm x, SingI n) fmap f sched = lptf $ CK.fmap f $ vector sched +instance CK.Monad (Scheduling n) where+ return = train1dp+ join (Scheduling v _) = lptf $ CK.join $ CK.fmap vector v+ ------------------------------------------------------------------------------- -- Training