Last active
January 22, 2016 21:09
-
-
Save cinquemb/18e494348045725e2b60 to your computer and use it in GitHub Desktop.
Number of legal Go positions matrix representation lies on a complex lie group
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <vector> | |
#include <cmath> | |
#include <numeric> | |
#include <algorithm> | |
#include <functional> | |
#include <map> | |
#include <armadillo> | |
/* | |
MAKE FILE | |
CFLAGS= -Wall -Os -O2 -std=gnu++11 -pedantic /usr/local/lib/libarmadillo.dylib | |
CPP= ccache clang++ | |
all: | |
$(CPP) go_conj_trans_test.cpp -o g_c_j_t $(CFLAGS) | |
clean: | |
rm g_c_j_t | |
input: | |
0 0 0 0 2 2 2 0 1 1 0 0 2 0 1 1 1 0 1 | |
2 1 1 2 1 2 0 0 2 1 2 1 0 0 0 2 2 0 2 | |
2 1 0 0 2 1 0 1 1 1 1 1 0 1 1 1 1 1 2 | |
0 0 2 2 0 1 1 0 2 0 0 1 2 1 0 2 0 1 0 | |
1 0 2 0 2 0 1 2 0 1 1 2 2 1 0 0 1 2 1 | |
1 0 0 0 1 1 1 2 0 2 2 0 0 0 2 0 1 2 2 | |
0 0 2 1 2 0 0 2 0 0 1 1 1 0 2 0 2 0 0 | |
0 0 2 2 0 2 2 2 0 0 0 2 1 0 1 0 0 0 2 | |
2 1 0 0 2 0 2 2 2 2 1 0 0 2 1 1 1 2 1 | |
2 0 0 1 0 2 2 1 2 1 1 2 2 0 2 0 1 2 0 | |
2 1 1 1 0 0 2 1 0 0 2 2 1 2 2 2 0 1 1 | |
2 2 1 2 0 1 1 1 0 2 0 1 2 0 2 2 2 0 2 | |
2 0 1 0 1 2 1 1 0 1 1 0 2 1 2 0 0 2 1 | |
2 0 0 0 1 2 2 1 1 2 0 2 2 0 0 1 0 1 0 | |
1 1 2 2 0 0 1 2 2 0 2 0 2 0 1 2 2 1 0 | |
2 0 1 0 0 1 1 0 2 1 2 1 2 1 1 0 2 2 0 | |
2 2 1 1 2 0 1 0 2 0 1 2 0 2 1 2 1 0 0 | |
0 0 0 1 1 2 2 1 0 2 1 0 1 0 2 1 1 2 0 | |
2 2 0 2 1 0 2 2 0 0 2 1 1 1 1 1 2 2 2 | |
Output: 4.79573e+06 | |
*/ | |
int main(int argc, char *argv[]){ | |
arma::mat tm; | |
tm.load("test.mat", arma::raw_ascii); | |
arma::mat c_tm_t = arma::conj(tm).t(); | |
std::cout << arma::det(c_tm_t) << std::endl; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment