aditya siram writes:
> byTwos :: [a] -> [(a,a)]
> byTwos []= []
> byTwos (x:[])= []
> byTwos (x:y:xs) = (x,y) : byTwos (y:xs)
byTwos l = zip l (tail l)
--
Cheers,
Feri.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http:
Hi,
I've taken a look at your code and refactored a bit to use Haskell's
list functions. The functionality should be identical.
One of the advantages of using the list functions is that you don't
have to worry about an out-of-bounds exception - which is what your
limIndex function corrects for. A
On Tuesday 25 January 2011 23:16:49, gutti wrote:
> Hi Henning,
>
> thanks for the code review -- reason that I don't use the type
> declaration a lot -- It causes trouble , because I don't yet fully
> understand it.
>
> When I declare what I think is right is fails - see Message at bottom --
> so
Hi Henning,
thanks for the code review -- reason that I don't use the type declaration a
lot -- It causes trouble , because I don't yet fully understand it.
When I declare what I think is right is fails - see Message at bottom -- so
what's wrong ?
By the way I just used lists so far - no array
On Tue, 25 Jan 2011, gutti wrote:
I created some code from scratch - probably "ugly" beginners style - so
I'm keen to get tips how to make it more pretty and faster
Can you please add type signatures? This would help me understanding.
import Data.List
-- Input Data
xi :: [Double]
xi = [0
On Tuesday 25 January 2011 22:05:34, gutti wrote:
> Hi,
>
> I created some code from scratch - probably "ugly" beginners style - so
> I'm keen to get
> tips how to make it more pretty and faster
>
> Cheers Phil
>
> import Data.List
>
> -- Input Data
> xi :: [Double]
> xi = [0 .. 10]
> yi :: [Double
Hi,
I created some code from scratch - probably "ugly" beginners style - so I'm
keen to get
tips how to make it more pretty and faster
Cheers Phil
import Data.List
-- Input Data
xi :: [Double]
xi = [0 .. 10]
yi :: [Double]
yi = [2, 3, 5, 6, 7, 8, 9, 10 , 9, 8, 7]
x = 11 :: Double
-
On Sun, 23 Jan 2011, Claude Heiland-Allen wrote:
essentially, it creates a matrix of 1d splines, but now I see that this isn't
what you wanted...
for interpolated 2d matrix lookup, something like this, perhaps:
Interpolated matrix or vector lookup can of course be written as
interpolation
Hi Phil,
On 22/01/11 23:13, gutti wrote:
- are t a b c d points or curve parameters ?
a b c d are points, t is the interpolation coefficient (between 0 and 1)
- how does lifting to matrix create a 1d spline to a 2d spline ? -- I don't
see how it works
essentially, it creates a matrix of 1
On Sat, 22 Jan 2011, gutti wrote:
I just don't fully get how it works:
- are t a b c d points or curve parameters ?
- how does lifting to matrix create a 1d spline to a 2d spline ? -- I don't see
how it works
I think it interpolates cubically between four equidistant nodes, then it
lifts
Hi Claude,
thanks a lot. - Your code looks interesting.
I just don't fully get how it works:
- are t a b c d points or curve parameters ?
- how does lifting to matrix create a 1d spline to a 2d spline ? -- I don't
see how it works
Cheers Phil
--
View this message in context:
http://ha
Hi Claude,
thanks a lot. - Your code looks interesting.
I just don't fully get how it works:
- are t a b c d points or curve parameters ?
- how does lifting to matrix create a 1d spline to a 2d spline ? -- I don't
see how it works
Cheers Phil
--
View this message in context:
http://ha
Hi Henning,
thanks - I don't claim I understand that yet with my limited haskell
knowledge, but it looks rather advanced passing modules around.
If there isn't anything "standard" of the shelf (which is important
feedback), than its probably the best for me to pull it up from scratch and
go thr
On Sat, 22 Jan 2011, gutti wrote:
I'm looking for Vector and especially Matric interpolation ala:
z = interp2 (xMatrix, yMatrix, zMatrix, x, y)
- x and y can be single values or also vectors or matrices
- indeally with the options nearest, linear, quadratic, qubic..
Any hope that ther
Hi Phil,
On 22/01/11 14:07, gutti wrote:
Dear Haskellers,
I'm looking for Vector and especially Matric interpolation ala:
z = interp2 (xMatrix, yMatrix, zMatrix, x, y)
- x and y can be single values or also vectors or matrices
- indeally with the options nearest, linear, quadrat
Dear Haskellers,
I'm looking for Vector and especially Matric interpolation ala:
z = interp2 (xMatrix, yMatrix, zMatrix, x, y)
- x and y can be single values or also vectors or matrices
- indeally with the options nearest, linear, quadratic, qubic..
Any hope that there is som
16 matches
Mail list logo