vezenchio has quit ["Ayn Rand encapsulates the rage that every teenager feels on finding that his first paycheque has had taxes taken out of it"]
Smerdyakov has joined #ocaml
Smerdyakov has quit [Client Quit]
Smerdyakov has joined #ocaml
Smerdyakov has quit []
cjohnson has joined #ocaml
ulfdoz_ has joined #ocaml
ulfdoz has quit [Read error: 60 (Operation timed out)]
cjohnson has quit [Read error: 110 (Connection timed out)]
__DL__ has joined #ocaml
Herrchen has joined #ocaml
maml has quit [Read error: 113 (No route to host)]
Snark has joined #ocaml
pango_ has quit [Remote closed the connection]
Herrchen has quit ["leaving"]
Herrchen has joined #ocaml
mlh_ has quit [Client Quit]
xidaux has joined #ocaml
xidaux is now known as dodecahedron
smimou has joined #ocaml
dodecahedron has quit ["leaving"]
ionOS has joined #ocaml
vodka-goo has joined #ocaml
_fab has joined #ocaml
pango has joined #ocaml
vezenchio has joined #ocaml
lus|wats has joined #ocaml
vezenchio has quit [Read error: 110 (Connection timed out)]
pango has quit [Read error: 54 (Connection reset by peer)]
Submarine has joined #ocaml
_fab has quit [Remote closed the connection]
shawn_ has joined #ocaml
maml has joined #ocaml
_shawn has quit [Read error: 110 (Connection timed out)]
vezenchio has joined #ocaml
lus|wats has quit [Read error: 110 (Connection timed out)]
Smerdyakov has joined #ocaml
cjohnson has joined #ocaml
Smerdyakov has quit ["fly"]
cjohnson has quit [Connection timed out]
cjohnson has joined #ocaml
Gueben has joined #ocaml
_fab has joined #ocaml
mikeX has joined #ocaml
mikeX has quit ["Leaving"]
Snark has quit [Read error: 110 (Connection timed out)]
_fab has joined #ocaml
menace has joined #ocaml
cjohnson has quit [""We live like penguins in the desert...""]
pango has joined #ocaml
Submarine has quit ["Leaving"]
monochrom has joined #ocaml
smimram has joined #ocaml
Snark has joined #ocaml
smimou has quit [Read error: 110 (Connection timed out)]
TeXitoi has joined #ocaml
smimou has joined #ocaml
Snark has left #ocaml []
smimram has quit [Read error: 110 (Connection timed out)]
Gueben has quit ["plouf"]
<
maml>
I have a "matrix" type define like this:
<
maml>
type 'a t = Empty | Node of 'a * 'a t * 'a t
<
maml>
where Empty stand for the "empty matrix" and Node (x, east, south) represent the element "x" on the left of "east" and above "south".
<
monochrom>
by all means, this looks like a binary tree.
<
maml>
In fact it's a graph without cycle but which can contain circuit.
<
maml>
It is'nt a tree.
<
maml>
for exemple, the matrix:
<
maml>
Is represented by:
<
maml>
let four = Node (4, Empty, Empty) in
<
maml>
let two = Node (2, Empty, four) in
<
maml>
let three = Node (3, four, Empty) in
<
maml>
Node (1, two, three)
<
maml>
I'm looking for a good, elegant and efficient way to transpose a such matrix.
<
maml>
This function:
<
maml>
let rec transpose = function
<
maml>
Empty -> Empty
<
maml>
| Node (x, e, s) -> Node (x, transpose s, transpose e)
<
maml>
works and is elegant but requires an exponential time.
<
ulfdoz_>
hard stuff, but interesting.
<
ulfdoz_>
But what do you mean by circuit and where is the difference to a cycle?
<
maml>
In a circuit i consider orientation, i don't in a cycle.
<
maml>
This the graph for the matrix:
<
maml>
Good night all, i'll be back tomorrow ;).
maml is now known as maml-tv
<
ulfdoz_>
Good night
__DL__ has quit [Remote closed the connection]
Herrchen has quit ["leaving"]
mikeX has joined #ocaml
<
mikeX>
hello, how can I signify the end of a match statement?
<
mikeX>
using ;; gets me out of the function scope
<
mauke>
there are no match statements
<
mikeX>
I mean a pattern matching
<
mauke>
that's a match expression
<
mauke>
you can limit expressions with ( )
<
mikeX>
I see, thanks
<
mauke>
(or begin/end)
<
mikeX>
yeap, just didn't cross my mind, still pretty new to ocaml : /
mikeX has quit ["Leaving"]
mlh_ has joined #ocaml