You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 7, 2018. It is now read-only.
This is a (low-prio) feature request. Comonad interface is very convenient for looking at a vector from all perspectives (indices) at once. It allows tranformations of the entire vector by allowing the mapping to peek into neighbouring elements . Think blurring of pixels 0, or other image transformations 1. Writing down the instance is easy:
{-# language DeriveFunctor, TupleSections #-}
moduleCoVecwhereimportCLaSH.Preludehiding (extend)
importControl.ComonadnewtypeCoVecna=CoVec (Indexn, Vecna) deriving (Eq, Show, Functor)
instanceKnownNatn=>Comonad (CoVecn) where
extract (CoVec (i, v)) = v !! i
duplicate (CoVec (i, v)) =CoVec (i, CoVec. (,v) <$> indicesI)
The question is whether one wants to add the Comonad dependency.
Another problem might be the consumption of logical resources (LUTs). I did not evaluate this issue.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
This is a (low-prio) feature request.
Comonad
interface is very convenient for looking at a vector from all perspectives (indices) at once. It allows tranformations of the entire vector by allowing the mapping to peek into neighbouring elements . Think blurring of pixels 0, or other image transformations 1. Writing down the instance is easy:The question is whether one wants to add the
Comonad
dependency.Another problem might be the consumption of logical resources (LUTs). I did not evaluate this issue.
The text was updated successfully, but these errors were encountered: