Re: Creating a matrix mirrored around it's main diagonal

2009-12-04 Thread Tiemo Kieft
This is what it should look like: >>| 1 | 2 | 3 | >> >> 1 | 0 | A | B | >> >> 2 | A | 0 | C | >> >> 3 | B | C | 0 | >> > > Perhaps I'm misapprehending the issue, but why isn't the following > sufficient: > > (defn transpo

Creating a matrix mirrored around it's main diagonal

2009-12-03 Thread Tiemo Kieft
Hi, I'm trying to create a matrix, basically it's a vector of vectors. I copied the code from ants.clj to create the matrix, however, I have to mirror the matrix around it's main diagonal (see below). Currently I'm doing this by first creating the matrix like this: (apply vector (map (fn [i]