|Maintainer||Ertugrul Soeylemez <firstname.lastname@example.org>|
This module provides an efficient connection matrix type.
- data ConnMatrix
- buildLayered :: [Int] -> IO ConnMatrix
- buildRandom :: Int -> IO ConnMatrix
- buildZero :: Int -> ConnMatrix
- cmAdd :: ConnMatrix -> ConnMatrix -> ConnMatrix
- cmDests :: forall b. Int -> (b -> Int -> Double -> b) -> b -> ConnMatrix -> b
- cmFold :: Int -> (b -> Int -> Double -> b) -> b -> ConnMatrix -> b
- cmMap :: (Int -> Int -> Double -> Double) -> ConnMatrix -> ConnMatrix
- cmSize :: ConnMatrix -> Int
- addLayer :: Int -> Int -> Int -> Int -> ConnMatrix -> IO ConnMatrix
A connection matrix is essentially a two-dimensional array of synaptic weights.
Build a layered connection matrix, where adjacent layers are fully connected.
Build a completely random connection matrix with the given edge length. The random values will be between -1 and 1 exclusive.
Build a zero connection matrix. It will represent a completely disconnected network, where all nodes are isolated.
Add two connection matrices. Note that this function is left-biased in that it will adopt the connectivity of the first connection matrix.
You may want to use the
Monoid instance instead of this function.
Strictly fold over the outputs, including zeroes.
Strictly fold over the nonzero inputs of a node.
Map over the inputs of a node.