No. The array really does get created with that huge number elements.
The Haskell Array type is lazy in it's *elements*, not its keys.
Ok thanks, i understand (my error is that i want lazy datas everywhere !!)
The Array type is just your ordinary O(1) indexable structure. If you
want a data
I'am a little bit confused by the following error messages :
\begin{code}
import Array
type SignalOf = Array Int
funcSignal :: (Num a, Num b) = (Int, Int) - (a - b) - SignalOf b
funcSignal b f = listArray b [f (fromIntegral k) | k - range b]
instance (Num a) = Num (SignalOf a) where
Simon Marlow wrote:
Please send the output of command (2) with -v added to the command line.
Cheers,
Simon
I have isolated the dependancies of the packages : the work file is now :
\begin{code}
module Main where
import Data.Array
import DSP.Filter.FIR.FIR
import DSP.Filter.FIR.Sharpen
Hello,
I have some packages for doing signal and image processing stuff.
Here is a little test program :
\begin{code}
module Main where
import Hips
a = listSignal (1,10) [1..10]
b = liftSignals (:+) a a
c = fft b
main = do
putStrLn $ show a
putStrLn $ show b
putStrLn $
Is there a way to get the number of dimension of an array ? i.e.
something like :
dims :: (Ix a) = Array a b - Int
dims = ...
a = listArray (1,10) [1,2..]
b = listArray ((1,1),(10,10)) [1,2..]
dims a -- should be equal to 1
dims b -- should be equal to 2
The key is somewhere in the Ix class but
Josef Svenningsson wrote:
In a sense Haskell arrays are always one dimensional. But as you noted
tuples are used to achieve higher dimensionality. As far as I know there
is no way of asking for the dimension of an array. You could write your
own class for that though. Here's a suggestion: