Miguel M
97ab74bbd0
misc: check if permutations can be skipped at any point
2023-06-03 19:08:21 +01:00
Miguel M
384257825b
Simpler iteration timing/prediction code
2023-05-30 16:17:57 +01:00
Miguel M
3ef2e95c69
(Parallel) timing code
2023-05-24 22:28:53 +01:00
Miguel M
c7fe98e620
Party swapping was broken
2023-05-08 12:50:10 +01:00
Miguel M
30f9cdc120
Merge the permutations back into the Cg-P conversion
...
As promised.
2023-05-04 19:49:43 +01:00
Miguel M
18940c8fb8
Split the permutation into its own step
...
(Rather than having, as before, the permutation merged into the Cg-P
step.) I'll revert this commit in a moment, to make sure the issue
really was just with the matrix parsing.
2023-05-04 19:45:42 +01:00
Miguel M
3ee003e55e
Off by one in writing the last entry when parsing input
2023-05-04 19:41:32 +01:00
Miguel M
ed739fed17
--p-raw option
2023-05-03 15:53:36 +01:00
Miguel M
ef438d8e5c
Conditional out label permutations should consider the permuted in labels
2023-05-02 19:42:02 +01:00
Miguel M
6ac08cee1b
Output format controlled by a flag
2023-05-02 00:04:37 +01:00
Miguel M
2d7abc6dee
Need to initialize conditional output generators
2023-05-02 00:04:28 +01:00
Miguel M
f8eadd3523
2222 produces correct result (two classes)
2023-05-01 20:01:07 +01:00
Miguel M
05ed0ad350
MatrixFree + release memory for debug purposes
2023-05-01 17:37:59 +01:00
Miguel M
1ad3a4c813
Fixed allocation size of cg_buf
...
This mistake was responsible for the weird overruns of `seen`.
Seems to be at least partially working, need to check that permuting the
players reduces the remaining 3 lines.
2023-05-01 17:36:57 +01:00
Miguel M
b10d646ea0
Checkpoint. Very weird things are happening (memory overrunning?)
2023-05-01 17:17:58 +01:00
Miguel M
94c1aa1ae8
Added comparison code; not working, but a good skeleton
2023-05-01 15:26:36 +01:00
Miguel M
678d1e1008
cg-p conversion accounts for permutations
2023-05-01 14:49:36 +01:00
Miguel M
4b1db5cec0
checkpoint commit
2023-05-01 14:38:56 +01:00
Miguel M
bba8aa9e17
Formatting to match Google style
2023-04-30 20:21:12 +01:00
Miguel M
216836f7f9
CG-P-CG conversion working correctly
...
Tested the correctness by converting the rows of data/2222_inq.txt from
CG to P and back and verifying the start and end result matched.
2023-04-30 20:20:13 +01:00
Miguel M
8c1bf8a57f
checkpoint: cg-p conversion not quite working yet
2023-04-30 18:26:02 +01:00
Miguel M
37f8b0a30a
Checkpoint: about to rewrite/erase this approach, because CG-P-CG conversions are needed
2023-04-29 18:35:25 +01:00
Miguel M
6531273021
Matrix is again parsed form input as-is
...
CG-P conversions will be handled separately. See also 1bf3c6a1
, from
which a lot of the changes in matrix.c and matrix.h are lifted.
2023-04-29 18:30:56 +01:00
Miguel M
44df5472c8
Rewrite after new problem statement
...
Still not working, but probably for theoretical reasons, now.
2023-04-29 16:53:36 +01:00
Miguel M
cf685d6a91
Fix to permutations.c
2023-04-29 16:52:47 +01:00
Miguel M
83fcf178a9
Heap's algorithm to generate permutations
2023-04-29 09:58:13 +01:00
Miguel M
7346b90d76
Commit before starting over
...
Turns out I had the wrong problem statement. I'm given input in CG
notation, but it is not enough to check under permutations for this
representation. Therefore, I should instead first convert to joint
probability representation before checking the permutations, which then
become trivial.
2023-04-27 16:27:39 +01:00
Miguel M
1bf3c6a19d
Radical simplification of matrix_t
...
Treating the matrix entries as strings only served to introduce a level
of indirection which wasn't needed, since all of the given real-world
data has simple (very small) signed integer values. Now I just parse
those into a contiguous region of memory.
2023-04-26 17:09:07 +01:00
Miguel M
f299b689f2
misc. corrections
2023-04-26 15:48:11 +01:00
Miguel M
c5f5a5f1ff
Function to write out a row
2023-04-26 15:47:44 +01:00
Miguel M
5b41def60a
grid_data_t->matrix_data_t, for consistency
2023-04-26 15:25:56 +01:00
Miguel M
65f0c1dc95
Removed stb since it was unused
2023-04-26 15:11:05 +01:00
Miguel M
b3de17e14d
Matrix parsing based on compile-time information
2023-04-26 14:24:57 +01:00
Miguel M
77d61f36e4
Google style changes + write errors to stderr
2023-04-23 19:36:36 +01:00
Miguel M
eebca1914d
Factored matrix (formerly grid) into a header
...
Includes also the memory compacting after all the input is read.
2023-04-22 19:42:58 +01:00
Miguel M
709bc6f8c0
Can consume input
2023-04-21 19:39:21 +01:00
Miguel M
fe3d00a5f5
Input consuming.
...
It's possible that this commit contains errors, since I'm writing this
on a Windows machine and the compiler seems bad. I'll compile this in a
Linux machine and fix any errors present in the following commit.
2023-04-21 17:06:12 +01:00
Miguel M
bc3125dcc8
initial commit
2023-04-20 17:03:54 +01:00