Commit 305ac203 authored by Bastian Kauschke's avatar Bastian Kauschke
Browse files

compute... -> enumerate...

parent 44672224
......@@ -268,7 +268,7 @@ instance MinimizationInterface f => MinimizationInterface (AbsorbingPolynomial f
updateInner ((PolyLabel i Nothing):|ll) = (PolyLabel i Nothing):ll
innerLbls = map $ \(PolyLabel _ lbl) -> fromJust lbl
innerFunctors = computeInnerFunctors poly
innerFunctors = enumerateInnerFunctors poly
innerFunctor :: Int -> f ()
innerFunctor i = case innerFunctors V.! i of
......@@ -305,7 +305,7 @@ instance (PrintMorphism f, Show1 f, Show (Label f), Show (F1 f)) => PrintMorphis
printMorphismPoint
(() <$ poly)
f1'
(V.toList $ V.imap convertFunctor (computeInnerFunctors poly))
(V.toList $ V.imap convertFunctor (enumerateInnerFunctors poly))
where
convertFunctor :: Int -> Inner f () -> (Label Polynomial, Build.Builder)
convertFunctor v (Direct ()) = (v, snd $ fromJust (find (\(PolyLabel n _, _) -> n == v) (edges)))
......
......@@ -9,7 +9,7 @@
-- | Polynomial functor with co-products, products, exponentials and constants
module Copar.Functors.Polynomial
( computeInnerFunctors
( enumerateInnerFunctors
, printPolynomial
-- * Types exported for easier testing
, Polynomial(..)
......@@ -98,8 +98,8 @@ $(deriveEq1 ''Polynomial)
$(deriveShow1 ''Factor)
$(deriveShow1 ''Polynomial)
computeInnerFunctors :: Polynomial a -> V.Vector a
computeInnerFunctors (Polynomial (Sum (prods))) = foldMap products prods
enumerateInnerFunctors :: Polynomial a -> V.Vector a
enumerateInnerFunctors (Polynomial (Sum (prods))) = foldMap products prods
where
products (Product (fact)) = foldMap factors fact
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment