Skip to content

avocardio/bohemian_matrices

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

bohemian_matrices

A place for experimenting with Bohemian Matrices.

?

This code generates and visualizes the eigenvalues of Bohemian matrices. Bohemian matrices are matrices with entries from a discrete set of integers. The visualization of their eigenvalues often creates beautiful patterns and, many people don't know this, but they hold the key to the universe. More here: http://www.bohemianmatrices.com/.

Usage

You can run the program from the command line with the following arguments:

  • --random: If provided, the code will generate a random Bohemian matrix.
  • --config : The type of matrix to generate. Options are golfball, normal, eigenfish, and random. Default is golfball.
  • --size: The size of the matrix to generate. Default is 5.
  • --num_matrices: The number of matrices to generate. Default is $10^6$.
  • --cmap: The colormap to use for the visualization. If not provided, the default colormap is used.
  • --n: The number of iterations to run. Default is 1.

For example, to generate a golfball matrix of size 5, you would use the following command:

python main.py --config golfball --size 5

And to generate a random matrix, you would use the following command:

python main.py --random

Output

The output of the program is a .png image of the eigenvalue visualization, saved in the images directory. The filename includes the configuration, the matrix size, and the colormap used.

Along with the .png image, the program also saves a .txt file containing detailed information about the matrix configuration, the number of matrices, the size of the matrix, the colormap used, and examples of the generated matrix and its eigenvalues. The .txt file is saved in the images directory and shares the same base name as the .png image file.

About

A place for experimenting with Bohemian Matrices

Topics

Resources

License

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages