Hi Evan,
that looks very interesting indeed - as still newby I try to understand:
- u create a class Y to tackle the zero problem for different kinds of y
vectors in a common way
- u create a Signal class for the Y- signal inheriting interfaces from y
and Storable.Storable
Then u nest X and Y
- u create a class Y to tackle the zero problem for different kinds of y
vectors in a common way
Yes.
- u create a Signal class for the Y- signal inheriting interfaces from y
and Storable.Storable
I wouldn't say inheriting. It puts a restriction on 'y' saying that
it has to be in Storable
Dear all,
I'm created a timeSignal datatype as container around a Vector Double data
type (see simple code below) and subsequently started to instanciate Num
Eq to be able to perform operations on it. Additionally I want store ifno
like an index, time information and eventually an inheritence
Look into Oleg's HList (heterogeneous list) and OOHaskell
http://homepages.cwi.nl/~ralf/HList/
http://homepages.cwi.nl/~ralf/OOHaskell/
On Thu, Jun 16, 2011 at 5:08 AM, kaffeepause73 kaffeepaus...@yahoo.dewrote:
Dear all,
I'm created a timeSignal datatype as container around a Vector Double
Hi David,
thanks for the links. I had a lok at the OO-paper some time ago already,
heard however that its quite unusual and rather tricky to do OO-style
programming in Haskell. So I'm looking for suggestions how to tackle this
problem in a functional way.
Cheers Phil
--
View this message in
I've done something perhaps similar in that I have a couple of signal
types, backed by (X, Y) vectors with Y values of different types, but
the same X type. So they can share a fair amount of implementation
that depends only on X. Still more could be shared if I could know a
zero value for each