<henistein>
I am trying to convert a quadtree into a matrix and I am struggling hard, this is what I have done: https://pastebin.pl/view/1b3bc7b8 . The Tree to matrix doesn't work, how can I convert a quadtree to a matrix?
mxns has joined #ocaml
henistein has quit [Quit: Connection closed]
henistein41 has joined #ocaml
mfp has quit [Ping timeout: 252 seconds]
henistein41 has quit [Quit: Connection closed]
mxns has quit [Ping timeout: 245 seconds]
narimiran has joined #ocaml
<d_bot>
<Butanium> Can you show a small example of how you'd do the conversation?
mbuf has joined #ocaml
mxns has joined #ocaml
mxns has quit [Ping timeout: 260 seconds]
wonko7 has joined #ocaml
waleee-cl has quit [Quit: Connection closed for inactivity]
tryte has quit [Remote host closed the connection]
tryte has joined #ocaml
vicfred has quit [Quit: Leaving]
nullifidian has joined #ocaml
Haudegen has quit [Quit: Bin weg.]
henistein has joined #ocaml
<henistein>
I have a matrix [|[|1; 1; 1; 1|]; [|2; 2; 2; 2|]; [|3; 3; 3; 3|]; [|4; 4; 4; 4|]|] and I want to slice the nw of the matrix, there is some easy way to do it?
nullifidian has quit [Quit: Leaving]
tryte has quit [Ping timeout: 240 seconds]
tryte has joined #ocaml
<octachron>
henistein, you can either define a slice type, or copy the submatrix (by creating function that copies the first or last half or an array).
<henistein>
Hmm ok, I am trying to do a function that change a matrix by giving a number and a coordinate(nw, ne, sw, se). Like this: 'a -> int -> string -> int array array . And this seems quite hard
mgsk has quit [Quit: Connection closed for inactivity]
<henistein>
So I am thinking about create a matrix fill of -1 and then recursively change his values according to Leaf (W -> 0, B -> 1)
<henistein>
I think array array is better here than list list, since it should be easier to change, what do you think?
<octachron>
An array is better. What you want is to keep track of the coordinate in the matrix of the root tree (and the size of the quadrangle?) then update the global matrix while traversing the quadtree.
<henistein>
Exactly, since my previous slice function won't change directly the matrix it will be a little more complex
dldisha has joined #ocaml
dh` has quit [Ping timeout: 268 seconds]
dldisha has quit [Client Quit]
mxns has joined #ocaml
<Leonidas>
I am somewhat amused that ocaml is so overrepresented on lobste.rs
<d_bot>
<undu> It's good to have good visibility _somewhere_
ananya has joined #ocaml
ananya has quit [Client Quit]
Tuplanolla has joined #ocaml
waleee-cl has joined #ocaml
zebrag has joined #ocaml
mxns has quit [Ping timeout: 252 seconds]
henistein has quit [Quit: Connection closed]
zebrag has quit [Quit: Konversation terminated!]
zebrag has joined #ocaml
zebrag has quit [Client Quit]
webshinra has quit [Remote host closed the connection]
<Armael>
is it??
hackinghorn has quit [Quit: Leaving]
<Armael>
my feeling was rather that there seem to be some ocaml people hanging out, but most of the active people and the volume of comments/activity is not ocaml-related (or even ocaml-tangent)
webshinra has joined #ocaml
Haudegen has quit [Quit: Bin weg.]
<Armael>
(or were you talking about the lobste.rs irc channel?)
grimler32 has joined #ocaml
<grimler32>
any universe editors with access to the 4 bit 3 dimensional god code at the multiverse level?
dh` has joined #ocaml
<companion_cube>
🤯
vicfred has joined #ocaml
henistein has joined #ocaml
Sanduni has joined #ocaml
Sanduni has quit [Client Quit]
mxns has joined #ocaml
bartholin has quit [Quit: Leaving]
hackinghorn has joined #ocaml
mbuf has quit [Quit: Leaving]
Haudegen has joined #ocaml
tane has joined #ocaml
lindah has joined #ocaml
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
lindah has quit [Ping timeout: 252 seconds]
henistein has quit [Quit: Connection closed]
olle has quit [Ping timeout: 240 seconds]
infinigon_ has quit [Ping timeout: 246 seconds]
infinigon has joined #ocaml
Haudegen has quit [Quit: No Ping reply in 180 seconds.]
Haudegen has joined #ocaml
zebrag has joined #ocaml
narimiran has quit [Ping timeout: 260 seconds]
wonko7 has quit [Ping timeout: 240 seconds]
tane has quit [Quit: Leaving]
landonf has quit [Excess Flood]
landonf has joined #ocaml
olle has joined #ocaml
l1x has quit [Quit: Connection closed for inactivity]