sort-networks.git
16 years agosrc/sn_network.[ch]: Implement `sn_network_shift'.
Florian Forster [Thu, 20 Nov 2008 08:44:40 +0000 (09:44 +0100)]
src/sn_network.[ch]: Implement `sn_network_shift'.

16 years agosrc/sn_stage.[ch]: Implement `sn_stage_shift'.
Florian Forster [Thu, 20 Nov 2008 08:43:29 +0000 (09:43 +0100)]
src/sn_stage.[ch]: Implement `sn_stage_shift'.

16 years agosrc/sn_comparator.[ch]: Implement `sn_comparator_shift'.
Florian Forster [Thu, 20 Nov 2008 08:43:04 +0000 (09:43 +0100)]
src/sn_comparator.[ch]: Implement `sn_comparator_shift'.

16 years agosrc/sn_network.c: Add folding markers to all functions.
Florian Forster [Thu, 20 Nov 2008 07:29:04 +0000 (08:29 +0100)]
src/sn_network.c: Add folding markers to all functions.

16 years agoMerge branch 'ff/libpopulation'
Florian Forster [Sun, 13 Jul 2008 08:42:45 +0000 (10:42 +0200)]
Merge branch 'ff/libpopulation'

16 years agosrc/sn-evolution.c: Make peers and #threads configurable at runtime.
Florian Forster [Sun, 13 Jul 2008 08:41:43 +0000 (10:41 +0200)]
src/sn-evolution.c: Make peers and #threads configurable at runtime.

16 years agosrc/sn_network.c: Fix a bug/typo in the unserialize code.
Florian Forster [Sat, 12 Jul 2008 12:10:54 +0000 (14:10 +0200)]
src/sn_network.c: Fix a bug/typo in the unserialize code.

16 years agosn_network.[ch]: Implemented (un)serialize functions.
Florian Forster [Fri, 11 Jul 2008 15:00:39 +0000 (17:00 +0200)]
sn_network.[ch]: Implemented (un)serialize functions.

16 years agosn_stage.[ch]: Implemented (un)serialize functions.
Florian Forster [Fri, 11 Jul 2008 15:00:13 +0000 (17:00 +0200)]
sn_stage.[ch]: Implemented (un)serialize functions.

16 years agosn-evolution: Use the `libpopulation' library instead of `sn_population'.
Florian Forster [Fri, 11 Jul 2008 11:12:15 +0000 (13:12 +0200)]
sn-evolution: Use the `libpopulation' library instead of `sn_population'.

16 years agosrc/sn_population.c: Removed some debug messages.
Florian Forster [Fri, 11 Jul 2008 10:05:43 +0000 (12:05 +0200)]
src/sn_population.c: Removed some debug messages.

16 years agoMerge branch 'master' of git://git.verplant.org/sort-networks
Florian Forster [Sat, 10 May 2008 09:03:13 +0000 (11:03 +0200)]
Merge branch 'master' of git://git.verplant.org/sort-networks

16 years agosn-evolution: Add a SIGTERM handler.
Florian Forster [Sat, 10 May 2008 09:02:53 +0000 (11:02 +0200)]
sn-evolution: Add a SIGTERM handler.

16 years agosrc/sn_population.c: Implemented a brute force minimization for very good solutions.
Florian Forster [Sat, 10 May 2008 09:01:54 +0000 (11:01 +0200)]
src/sn_population.c: Implemented a brute force minimization for very good solutions.

16 years agosn-evolution: Remove a debug message.
Florian Forster [Sat, 10 May 2008 09:01:05 +0000 (11:01 +0200)]
sn-evolution: Remove a debug message.

16 years agosn-evolution: Added a mutation operator.
Florian Forster [Sat, 10 May 2008 07:57:39 +0000 (09:57 +0200)]
sn-evolution: Added a mutation operator.

16 years agosn-check-bf: Added a brute-force checker.
Florian Forster [Sat, 10 May 2008 07:44:30 +0000 (09:44 +0200)]
sn-check-bf: Added a brute-force checker.

It's a lot faster than the Perl version. \o/

16 years agosn-apply: Use `sn_stage_sort' rather than the own function.
Florian Forster [Sat, 10 May 2008 06:32:20 +0000 (08:32 +0200)]
sn-apply: Use `sn_stage_sort' rather than the own function.

16 years agosrc/sn_{network,stage}.[ch]: Add a brute force checker.
Florian Forster [Sat, 10 May 2008 06:30:43 +0000 (08:30 +0200)]
src/sn_{network,stage}.[ch]: Add a brute force checker.

And the needed actual sorting code.

16 years agosrc/*.c: Define _ISOC99_SOURCE and _POSIX_C_SOURCE in all .c files.
Florian Forster [Sat, 10 May 2008 06:04:48 +0000 (08:04 +0200)]
src/*.c: Define _ISOC99_SOURCE and _POSIX_C_SOURCE in all .c files.

16 years agosrc/Makefile: Updated the `clean' target.
Florian Forster [Sat, 10 May 2008 06:03:41 +0000 (08:03 +0200)]
src/Makefile: Updated the `clean' target.

16 years agosrc/sn-evolution.c: Added pthread support for (local) parallelization.
Florian Forster [Sat, 10 May 2008 05:57:28 +0000 (07:57 +0200)]
src/sn-evolution.c: Added pthread support for (local) parallelization.

16 years agosrc/sn-apply.c: Add tool to show the progress of the network.
Florian octo Forster [Thu, 8 May 2008 05:11:58 +0000 (07:11 +0200)]
src/sn-apply.c: Add tool to show the progress of the network.

16 years agosrc/*.[ch]: Added GPLv2 license information.
Florian Forster [Wed, 7 May 2008 15:20:35 +0000 (17:20 +0200)]
src/*.[ch]: Added GPLv2 license information.

16 years agosrc/Makefile: Added the new programs and dependencies.
Florian Forster [Wed, 7 May 2008 15:05:17 +0000 (17:05 +0200)]
src/Makefile: Added the new programs and dependencies.

16 years agosrc/sn-tex.c: Add a program to format sort networks as tikz source.
Florian Forster [Wed, 7 May 2008 15:04:36 +0000 (17:04 +0200)]
src/sn-tex.c: Add a program to format sort networks as tikz source.

16 years agosrc/sn_normalize.c: Add a program to normalize sort networks.
Florian Forster [Wed, 7 May 2008 15:03:42 +0000 (17:03 +0200)]
src/sn_normalize.c: Add a program to normalize sort networks.

16 years agosrc/sn_network.[ch]: Add `sn_network_normalize'.
Florian Forster [Wed, 7 May 2008 15:02:58 +0000 (17:02 +0200)]
src/sn_network.[ch]: Add `sn_network_normalize'.

This changes all comparators, so that they all point in the same direction.

16 years agosrc/sn_evolution.c: Print the rating of the best solution periodically.
Florian Forster [Wed, 7 May 2008 15:01:45 +0000 (17:01 +0200)]
src/sn_evolution.c: Print the rating of the best solution periodically.

16 years agosrc/sn_population.[ch]: Add `sn_population_best_rating'.
Florian Forster [Wed, 7 May 2008 15:01:16 +0000 (17:01 +0200)]
src/sn_population.[ch]: Add `sn_population_best_rating'.

16 years agosrc/sn-evolution.c: Use the sn_random module.
Florian Forster [Fri, 25 Apr 2008 09:15:43 +0000 (11:15 +0200)]
src/sn-evolution.c: Use the sn_random module.

16 years agosrc/sn-evolution.c: Write best network to output file if given.
Florian Forster [Fri, 25 Apr 2008 09:15:20 +0000 (11:15 +0200)]
src/sn-evolution.c: Write best network to output file if given.

16 years agoMakefile: Added the new modules and updated existing ones.
Florian Forster [Fri, 25 Apr 2008 09:08:12 +0000 (11:08 +0200)]
Makefile: Added the new modules and updated existing ones.

16 years agosn-evolution.c: Use the new sn_population object.
Florian Forster [Fri, 25 Apr 2008 09:07:10 +0000 (11:07 +0200)]
sn-evolution.c: Use the new sn_population object.

16 years agosn_population.[ch]: Add the sn_population object.
Florian Forster [Fri, 25 Apr 2008 09:06:26 +0000 (11:06 +0200)]
sn_population.[ch]: Add the sn_population object.

This object capsulates population handling in a thread-safe manner.

16 years agosn_random.[ch]: Add a module for random number handling.
Florian Forster [Fri, 25 Apr 2008 09:05:50 +0000 (11:05 +0200)]
sn_random.[ch]: Add a module for random number handling.

The random number handling should be thread-safe.

16 years agosn_stage.[ch]: Add the sn_stage_clone method.
Florian Forster [Fri, 25 Apr 2008 09:05:03 +0000 (11:05 +0200)]
sn_stage.[ch]: Add the sn_stage_clone method.

16 years agosn_network.[ch]: Add the sn_network_clone method.
Florian Forster [Fri, 25 Apr 2008 09:04:38 +0000 (11:04 +0200)]
sn_network.[ch]: Add the sn_network_clone method.

16 years agosn-evolution: Implemented the use of `getopt'.
Florian Forster [Mon, 11 Feb 2008 13:56:45 +0000 (14:56 +0100)]
sn-evolution: Implemented the use of `getopt'.

16 years agosrc/sn-evolution.c: Free the population before exiting.
Florian Forster [Sat, 2 Feb 2008 00:01:56 +0000 (01:01 +0100)]
src/sn-evolution.c: Free the population before exiting.

16 years agoAdded a `clean' target.
Florian Forster [Sat, 2 Feb 2008 00:01:19 +0000 (01:01 +0100)]
Added a `clean' target.

16 years agosrc/sn_network.c: Fixed two memory leaks.
Florian Forster [Sat, 2 Feb 2008 00:01:04 +0000 (01:01 +0100)]
src/sn_network.c: Fixed two memory leaks.

16 years agosrc/sn-evolution.c: Change the default number of iterations to INT_MAX.
Florian Forster [Fri, 1 Feb 2008 19:24:55 +0000 (20:24 +0100)]
src/sn-evolution.c: Change the default number of iterations to INT_MAX.

16 years agosrc/sn-evolution.c: Added an `olymp'.
Florian Forster [Fri, 1 Feb 2008 19:19:43 +0000 (20:19 +0100)]
src/sn-evolution.c: Added an `olymp'.

This means that every solution is in the population for a garuanteed number of
iterations.

16 years agosrc/sn-evolution.c: Installed a SIGINT handler to shutdown cleanly upon sigint.
Florian Forster [Fri, 1 Feb 2008 19:05:09 +0000 (20:05 +0100)]
src/sn-evolution.c: Installed a SIGINT handler to shutdown cleanly upon sigint.

The best solution is then written to STDOUT before exiting.

16 years agosrc/sn-evolution.c: Added a first version of evolutionary optimization.
Florian Forster [Fri, 1 Feb 2008 18:30:56 +0000 (19:30 +0100)]
src/sn-evolution.c: Added a first version of evolutionary optimization.

16 years agoImported the initial C files that make up a decent sorting network toolkit already.
Florian Forster [Fri, 1 Feb 2008 15:52:55 +0000 (16:52 +0100)]
Imported the initial C files that make up a decent sorting network toolkit already.

The files built up to know are:
- sn-cut:   Does a min/max cut on a given input.
- sn-merge: Merges two networks (files) by appending a bitonic merge.
- sn-show:  Pretty-prints a network to stdout.