Bubble sort, quicksort and merge sort implemented in Prolog:
sorting.pl. A few comparisons are
included.
Method of steepest ascent for solving quadratic programming
problems with linear constraints of arbitrary dimension,
implemented in Prolog:
ascent.pl. It uses SWI Prolog's simplex
library to determine the locally best direction. The central
predicate is maximize/5, its arguments are:
- in: objective function
- in: matrix A, as a list of rows
- in: b, the right-hand side of the linear constraints
- in: starting position
- out: computed optimum
Example:
maximize(- ((x(1) - 2)^2) - (x(2) - 4)^2,
[[1,1],[1,-1],[1,0],[-1,0]],
[4,0,1,0],
[0,0], Max).
Max = [1, 3] ;
Emacs definitions
htmlify.el: M-x htmlify
on a region replaces "ä" by "ä", "ß" by
"ß" etc.
Repgor, a report
generator.
Main page