My Elixir page
Here's a zip file with all the public Elixir files: all_public.zip. I'll try to keep this as current as possible.
My Elixir programs
Here are some of my general Elixir programs/scripts.
- read_test.exs: Check regular expression ~r/.*a.*b.*c.*d.*e.*/,
~r/*.b.*c.*d.*e.*f.*/, ... on a word list.
- Mix project Euler euler.zip (as a zip file): Project Euler problems 1..50.
My Elixir CP (Fixpoint) models
These models use Boris Okner's Fixppoint constraint modelling module.
Note: many models imports the cp_utils.ex (CPUtils) module.
- all_interval.ex: All interval problem
- assignment.ex: Some assignment problems
- coins_grid.ex: Coins grid problem
- cp_utils.ex: CPUtils module for some utilities/constraints
-
timeit(fun)
: Timing a function
-
mat_at(matrix, i, j)
: Accessing the [i,j]'th element in a matrix
-
transpose(matrix)
: Transposing a matrix
-
print_matrix(matrix_as_list,rows, cols, format)
: Pretty print a (1d) list representing a rows x cols matrix.
-
latin_square(matrix)
: Constraint that ensures that the matrix is a Latin square
-
scalar_produc(xs,ys,total)
: scalar product: total = xs*ys
-
decreasing(x)
: Ensures that x is in decreasing order
-
increasing(x)
: Ensures that x is in increasing order
- increasing_test.ex: Test of the
increasing/1
constraint
- least_diff.ex: Least diff problem
- minesweeper.ex: Minesweeper
Instances (to be used with read_instance/1
):
- quasigroup_completion.ex: Quasigroup completion
- send_most_money.ex: SEND+MOST=MONEY, (maximize MONEY and find all solutions)
- seseman.ex: Seseman's convent problem
- set_covering.ex: Set covering problem (Winston)
- set_covering3.ex: Set covering problem (Murty)
- set_covering_deployment.ex: Set covering deployment problem
- subset_sum.ex: Subset sum (Murty)
- survo_puzzle.ex: Survo puzzle
- xkcd.ex: XKCD (#287) subset-sum problem