Squashed commit for niching changes.

The niching available in cilib previously was not very scalable and potentially
contained errors. This new implementation by Filipe is more functional
and focuses on methods behaving like functions that always return the
newly created modified data.

In future, cilib will be moving to this structure as it allows for much
improved testing and simplifies the API completely. Additionally, the
planned removal of the XML simulator will further simplify our code
base.

Signed-off-by: Gary Pamparà <gpampara@gmail.com>

The individual commits are listed below (before the feature branch was
squashed).

commit 0c7b5216569af590a9ca5867558fce7fac98ba47
Author: Filipe <filinep@gmail.com>
Date:   Tue Apr 24 12:17:13 2012 +0200

    Removed unused file.

    Signed-off-by: Gary Pamparà <gpampara@gmail.com>

commit 53f133b5df8ebe3b7f6752767d2aa092bea03864
Author: Filipe <filinep@gmail.com>
Date:   Tue Apr 24 12:08:37 2012 +0200

    Cleaned up a bit of the code.

    Signed-off-by: Gary Pamparà <gpampara@gmail.com>

commit bf279e720bfef5f46af71883c7b0ad36725fb604
Author: Filipe <filinep@gmail.com>
Date:   Mon Apr 23 15:45:16 2012 +0200

    Removed old vector based code. Changed a few implementation details.

    Signed-off-by: Gary Pamparà <gpampara@gmail.com>

commit 8d6d6ddb63f54005246020d007cb71b641a8b4d8
Author: Filipe <filinep@gmail.com>
Date:   Mon Apr 23 13:59:36 2012 +0200

    Changed niche creation implementation to prevent an entity from being evaluated multiple times.

    Signed-off-by: Gary Pamparà <gpampara@gmail.com>

commit 3588d7ed9f49fcf7e904a34d288322a56a51e0aa
Author: Filipe <filinep@gmail.com>
Date:   Mon Apr 23 13:57:56 2012 +0200

    Changed running of the algorithm from calling run to an explicit loop because at the end of a run the algorithm stack is removed.

    Signed-off-by: Gary Pamparà <gpampara@gmail.com>

commit ff480145c67568d1159d5eb4bd9d83d0c610b223
Author: Filipe <filinep@gmail.com>
Date:   Mon Apr 23 13:56:25 2012 +0200

    Selection strategy wasnt being cloned.

    Signed-off-by: Gary Pamparà <gpampara@gmail.com>

commit ea23bdc60ffc1885548f60622050bc57295b6131
Author: Filipe <filinep@gmail.com>
Date:   Fri Apr 20 16:51:53 2012 +0200

    Added getMainSwarm and getSubSwarms to NichingSwarms to make it clearer that _1 and _2.

    Signed-off-by: Gary Pamparà <gpampara@gmail.com>

commit df7a0e82bd2315b8fe9de0c3ec7a7d7a16933c8f
Author: Filipe <filinep@gmail.com>
Date:   Fri Apr 20 15:47:10 2012 +0200

    VectorBased starting to work now :D

    Signed-off-by: Gary Pamparà <gpampara@gmail.com>

commit ae215f1d6badf8bcdeb9f9ea02ca44023386fc3b
Author: Filipe <filinep@gmail.com>
Date:   Fri Apr 20 10:27:03 2012 +0200

    Git must ignore the gradle folder.

    Signed-off-by: Gary Pamparà <gpampara@gmail.com>

commit 71d94e10a5ebb42df63a32b51a8d9690f61c2f17
Author: Filipe <filinep@gmail.com>
Date:   Thu Apr 19 14:46:32 2012 +0200

    VectorBased almost working now.

    Signed-off-by: Gary Pamparà <gpampara@gmail.com>

commit 955f42583455eafc4592fd3363e706c9a87a72ce
Author: Filipe <filinep@gmail.com>
Date:   Wed Apr 18 11:00:34 2012 +0200

    Made name more consistent.

    Signed-off-by: Gary Pamparà <gpampara@gmail.com>

commit 7536e6098ed50d934c65505073116edff3b053ff
Author: Filipe <filinep@gmail.com>
Date:   Mon Apr 16 13:38:42 2012 +0200

    Renamed members in NicheAlgorithm to make it clearer/shroter.

    Signed-off-by: Gary Pamparà <gpampara@gmail.com>

commit 52d37d118d1298e3f4ab5b29e97f8f784a266721
Author: Filipe <filinep@gmail.com>
Date:   Mon Apr 16 13:21:21 2012 +0200

    More refactoring.

    Signed-off-by: Gary Pamparà <gpampara@gmail.com>

commit 6a0a78c7dbabc66325b135b764d8c3c1595ad809
Author: Filipe <filinep@gmail.com>
Date:   Mon Apr 16 10:33:49 2012 +0200

    Added iteration functions for niche algorithms.

    Signed-off-by: Gary Pamparà <gpampara@gmail.com>

commit 3f5769893a4b3c1dbd01383a985071890620f497
Author: Filipe <filinep@gmail.com>
Date:   Fri Apr 13 16:56:07 2012 +0200

    Playing around with functions.

    Signed-off-by: Gary Pamparà <gpampara@gmail.com>

commit 5b4970b94038b1ad84445d20c4ba420c6efa6e28
Author: Filipe <filinep@gmail.com>
Date:   Fri Apr 13 13:44:37 2012 +0200

    Added more lift functions. Removed functions that return unit. Refactored some things.

    Signed-off-by: Gary Pamparà <gpampara@gmail.com>

commit 33f71c2848ea09b2141acba0c54394c23f8ae42e
Author: Filipe <filinep@gmail.com>
Date:   Thu Apr 12 17:00:53 2012 +0200

    DeratingNichePSO is now an IterationStrategy. Added lift methods in util package to separate them from unrelated Niche functions.

    Signed-off-by: Gary Pamparà <gpampara@gmail.com>

commit 52678003df9867137306365d8ba33fdd12eb7f72
Author: Filipe <filinep@gmail.com>
Date:   Thu Apr 12 13:04:58 2012 +0200

    Moving things around, having trouble with vector based pso.

    Signed-off-by: Gary Pamparà <gpampara@gmail.com>

commit 82a1d72e6cf592609f25c2dc7618008fde1c195c
Author: Filipe Nepomuceno <filinep@gmail.com>
Date:   Wed Apr 11 22:45:01 2012 +0200

    Moved/renamed a few things.

    Signed-off-by: Gary Pamparà <gpampara@gmail.com>

commit f43a0dc0338f32c9622423ba763dbec163051ef6
Author: Filipe Nepomuceno <filinep@gmail.com>
Date:   Sun Apr 8 15:31:34 2012 +0200

    Shortened copy constructor.

    Signed-off-by: Gary Pamparà <gpampara@gmail.com>

commit 68674030f4d7f5cf0710eeaac4bf36f07c7102f3
Author: Filipe Nepomuceno <filinep@gmail.com>
Date:   Sun Apr 8 11:57:29 2012 +0200

    Fixed species seed topology and added a test.

    Signed-off-by: Gary Pamparà <gpampara@gmail.com>

commit 04292e70db577c1aad9264a5b293a7cff43e14ac
Author: Filipe <filinep@gmail.com>
Date:   Wed Apr 4 16:16:10 2012 +0200

    Fixed niche xml.

    Signed-off-by: Gary Pamparà <gpampara@gmail.com>

commit 506984426fd1d438e00b106e9130b7884e15db66
Author: Filipe <filinep@gmail.com>
Date:   Wed Apr 4 16:15:38 2012 +0200

    started vector based PSO and playing around with some signatures.

    Signed-off-by: Gary Pamparà <gpampara@gmail.com>

commit da0e6ddc818ec5a79308453acf700215094b3dd7
Author: Filipe <filinep@gmail.com>
Date:   Wed Apr 4 16:14:15 2012 +0200

    Added another constructor to make it cleaner to create instances of these classes in code.

    Signed-off-by: Gary Pamparà <gpampara@gmail.com>

commit 43bf2314338fe4164d535bb20eafa9eccdde0803
Author: Filipe <filinep@gmail.com>
Date:   Wed Apr 4 10:32:22 2012 +0200

    Fixed errors from rebase.

    Signed-off-by: Gary Pamparà <gpampara@gmail.com>

commit 13734edbcd2e2ede59ebe194633de237b67a284b
Author: Filipe <filinep@gmail.com>
Date:   Tue Apr 3 17:51:16 2012 +0200

    Started speciation code.

    Signed-off-by: Gary Pamparà <gpampara@gmail.com>

commit dd77849aeda29c0da22cdae4443b7f8f0874eb0a
Author: Filipe Nepomuceno <filinep@gmail.com>
Date:   Sat Mar 31 17:05:25 2012 +0200

    Moved all niching code out of pso package into niching package.

    Signed-off-by: Gary Pamparà <gpampara@gmail.com>

commit 9aeb175c55baaa413218bb237f1be83433be6fae
Author: Filipe Nepomuceno <filinep@gmail.com>
Date:   Sat Mar 31 16:49:59 2012 +0200

    Finalised DeratingNichePSO, moved the derating algorithms to a new package and added a NichingFunction class to improve readability.

    Signed-off-by: Gary Pamparà <gpampara@gmail.com>

commit 84e8ae3dfc91a11ca257506a5f01fff76eac6060
Author: Filipe Nepomuceno <filinep@gmail.com>
Date:   Sat Mar 31 16:43:42 2012 +0200

    Cleared pso topology when initialising the PSO.

    Signed-off-by: Gary Pamparà <gpampara@gmail.com>

commit 34110ad4baead53fc4247e6a7fecf9be84c1a820
Author: Filipe Nepomuceno <filinep@gmail.com>
Date:   Sat Mar 31 15:32:22 2012 +0200

    Added a stopping condition to the swarm in case it is needed.

    Signed-off-by: Gary Pamparà <gpampara@gmail.com>

commit 1a55f03286a52d9af565f2adda5048e374cfb1ec
Author: Filipe Nepomuceno <filinep@gmail.com>
Date:   Sat Mar 31 15:29:20 2012 +0200

    Fixed cloning an algorithm where it didnt initialise all the algorithm variables.

    Signed-off-by: Gary Pamparà <gpampara@gmail.com>

commit 915b5270f71067fde4fb4646ebe5878963d84e6e
Author: Filipe <filinep@gmail.com>
Date:   Fri Mar 30 18:42:34 2012 +0200

    Initial deratingNichePSO.

    Signed-off-by: Gary Pamparà <gpampara@gmail.com>

commit c0ec7ea05d5cfb2fb034d9ac996a29246c8d4d24
Author: Filipe <filinep@gmail.com>
Date:   Fri Mar 30 15:52:26 2012 +0200

    Created a NichingSwarms class to improve readability of fj functions.

    Signed-off-by: Gary Pamparà <gpampara@gmail.com>

commit 4d384ecee99c57db968a4a8dc632f86b73ea9972
Author: Filipe <filinep@gmail.com>
Date:   Fri Mar 30 15:10:01 2012 +0200

    Finalised sequential niching and the derating problem.

    Signed-off-by: Gary Pamparà <gpampara@gmail.com>

commit 28f1280a1fd232cdcc4679d6ff42afe8ec398dec
Author: Filipe Nepomuceno <filinep@gmail.com>
Date:   Thu Mar 29 23:30:35 2012 +0200

    Further sequential niching changes.

    Signed-off-by: Gary Pamparà <gpampara@gmail.com>

commit e47778b63e15a5f457a572267f13cdcae532a6db
Author: Filipe <filinep@gmail.com>
Date:   Thu Mar 29 16:23:57 2012 +0200

    Started sequential niching work.

    Signed-off-by: Gary Pamparà <gpampara@gmail.com>

commit 5e14b4a17a7c3ea8d8f0ae069037f1f2df509183
Author: Filipe <filinep@gmail.com>
Date:   Thu Mar 29 14:40:50 2012 +0200

    Removed println left over from testing.

    Signed-off-by: Gary Pamparà <gpampara@gmail.com>

commit 6af93a750d2c651930e948e38e53cd29cea00e37
Author: Filipe <filinep@gmail.com>
Date:   Thu Mar 29 13:20:24 2012 +0200

    Made a few modifications to make it easier to use other algorithms in niching.

    Signed-off-by: Gary Pamparà <gpampara@gmail.com>

commit 116b3262b141d9545481b4c49114f42b69d49154
Author: Filipe <filinep@gmail.com>
Date:   Fri Mar 23 16:20:10 2012 +0200

    Refactored niching stuff, TODO: iteration is broken.

    Signed-off-by: Gary Pamparà <gpampara@gmail.com>

commit 48abdfb55384ba67295b51209055e3993ac875e3
Author: Filipe <filinep@gmail.com>
Date:   Tue Mar 20 09:56:11 2012 +0200

    Modified cognitive factor.

    Signed-off-by: Gary Pamparà <gpampara@gmail.com>

commit 9bd0b9f716d82d80a50c4025a683a746a845b39d
Author: Filipe <filinep@gmail.com>
Date:   Mon Mar 19 15:48:01 2012 +0200

    Should be working now.

    Signed-off-by: Gary Pamparà <gpampara@gmail.com>

commit afbb647087aba468dc63a5304b9f7aea3c8fdf16
Author: Filipe <filinep@gmail.com>
Date:   Fri Mar 16 16:55:12 2012 +0200

    More testing.

    Signed-off-by: Gary Pamparà <gpampara@gmail.com>

commit 71648d7e6f5e57b7cfe85ca856ee37e5f05b58f7
Author: Filipe <filinep@gmail.com>
Date:   Wed Mar 14 14:40:44 2012 +0200

    Finished detection test, busy with creation test.

    Signed-off-by: Gary Pamparà <gpampara@gmail.com>

commit 99ba6448d49edba11c98a2e1b325fbeb6aa3f3cc
Author: Filipe <filinep@gmail.com>
Date:   Tue Mar 13 15:52:23 2012 +0200

    More testing.

    Signed-off-by: Gary Pamparà <gpampara@gmail.com>

commit f654e88f7641e8ff3844085f27ebb9a1c269dc88
Author: Filipe <filinep@gmail.com>
Date:   Tue Mar 13 12:53:41 2012 +0200

    Testing carried on.

    Signed-off-by: Gary Pamparà <gpampara@gmail.com>

commit 59c4794f64477b108f790aa52345c665e09fd72f
Author: Filipe <filinep@gmail.com>
Date:   Mon Mar 12 14:58:52 2012 +0200

    Adding tests.

    Signed-off-by: Gary Pamparà <gpampara@gmail.com>

commit 161bd3e57371cfe120286d947269b0dffa6bdd5c
Author: Filipe <filinep@gmail.com>
Date:   Fri Mar 9 11:40:53 2012 +0200

    Pretesting niche creation.

    Signed-off-by: Gary Pamparà <gpampara@gmail.com>

commit 007c580a2169d6ce03a994e84f16cdefa5d747d4
Author: Filipe <filinep@gmail.com>
Date:   Thu Mar 8 17:27:27 2012 +0200

    Minor change.

    Signed-off-by: Gary Pamparà <gpampara@gmail.com>

commit f80e086d9f0e379e7673a0b47d6099b36b2fcb23
Author: Filipe <filinep@gmail.com>
Date:   Thu Mar 8 17:20:45 2012 +0200

    More prelim creation stuff.

    Signed-off-by: Gary Pamparà <gpampara@gmail.com>

commit 6e3c7d8c72a21d80ee27838507e1496ad5e58b12
Author: Filipe <filinep@gmail.com>
Date:   Thu Mar 8 15:17:50 2012 +0200

    Added preliminary absorption.

    Signed-off-by: Gary Pamparà <gpampara@gmail.com>

commit c06cec208b3b83a9b392954b01e5bc2b907cbe9e
Author: Filipe <filinep@gmail.com>
Date:   Wed Mar 7 15:57:04 2012 +0200

    Experimental absorption.

    Signed-off-by: Gary Pamparà <gpampara@gmail.com>

commit 54936915023dfdeab8d8651041b1e89ec3577216
Author: Filipe <filinep@gmail.com>
Date:   Wed Mar 7 12:05:41 2012 +0200

    Finalized the merging strategies and their tests.

    Signed-off-by: Gary Pamparà <gpampara@gmail.com>

commit 37fcc918a7c36f1dcd12330c7ef688c9d5b1a5d9
Author: Filipe <filinep@gmail.com>
Date:   Tue Mar 6 14:05:41 2012 +0200

    Refactored the merging to not need the MergeOperation.

    Signed-off-by: Gary Pamparà <gpampara@gmail.com>

commit 544f3696b668a4c44d6839ea3087af71c296a9c8
Author: Filipe <filinep@gmail.com>
Date:   Tue Mar 6 12:59:21 2012 +0200

    Merging is now done with a MergeOperation which is made up of a merge strategy and merge detection.

    Signed-off-by: Gary Pamparà <gpampara@gmail.com>

commit a0779d9b73e084cefd4c490b19ec452489075ff5
Author: Filipe <filinep@gmail.com>
Date:   Mon Mar 5 15:25:41 2012 +0200

    Split niche merging into a detection and a strategy. Changed composite measurement to always iterate sequentially. Niche tests still have errors.

    Signed-off-by: Gary Pamparà <gpampara@gmail.com>

commit ca76e361cc45c367f89366b3aa280d25c08c2893
Author: Filipe <filinep@gmail.com>
Date:   Fri Mar 2 12:48:48 2012 +0200

    Fixed errors from rebase. Fixed xml files and tests.

    Signed-off-by: Gary Pamparà <gpampara@gmail.com>

commit 0652adeb664684d7f78cf53c97730a5a4cbf5e18
Author: Filipe <filinep@gmail.com>
Date:   Fri Mar 2 12:14:51 2012 +0200

    Refactored niching packages. Changes some classes to use control parameters. Factored out some hard coded operations to use other strategies.

    Signed-off-by: Gary Pamparà <gpampara@gmail.com>