Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

Genetic Algorithm Library

, 7 Apr 2012 GPL3
A framework for genetic algorithms
galdemoapps.zip
TSP.exe
GeneticLibrary.dll
TestApp1.exe
TestApp2.exe
GaSchedule.exe
GaSchedule.cfg
GalDemoSource.zip
TestApp1
TestApp1.vcxproj.filters
TestApp2
TestApp2.vcxproj.filters
TSP
res
.svn
entries
prop-base
Toolbar.bmp.svn-base
TSP.ico.svn-base
props
text-base
Toolbar.bmp.svn-base
TSP.ico.svn-base
TSP.rc2.svn-base
tmp
prop-base
props
text-base
Toolbar.bmp
TSP.ico
TSP.vcxproj.filters
GaSchedule
Algorithm
GaSchedule.cfg
GaSchedule.vcxproj.filters
res
GaSchedule.ico
galdocumentation.zip
doxygen.png
Graphic
ab_cp.png
alg_st.png
a_cr.png
c_cp.png
i_cp.png
mp_cr.png
mv_cr.png
r_cp.png
s_cp.png
s_cr.png
galsource.zip
GeneticLibrary
build
release
gcc_bsd
gcc_linux
gcc_macos
gcc_solaris
icc_linux
icc_macos
icc_win
mingw
msvc
scc_solaris
makefiles
gcc_bsd_debug
gcc_bsd_release
gcc_linux_debug
gcc_linux_release
gcc_macos_debug
gcc_macos_release
gcc_solaris_debug
gcc_solaris_release
icc_linux_debug
icc_linux_release
icc_macos_debug
icc_macos_release
scc_solaris_debug
scc_solaris_release
source
vs
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Genetic Algorithm Library: Common::GaOperation Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.5 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
    </ul>
  </div>
  <div class="navpath"><a class="el" href="namespace_common.html">Common</a>::<a class="el" href="class_common_1_1_ga_operation.html">GaOperation</a>
  </div>
</div>
<div class="contents">
<h1>Common::GaOperation Class Reference</h1><!-- doxytag: class="Common::GaOperation" -->Interface for genetic operations.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;source/Operation.h&gt;</code>
<p>
Inherited by <a class="el" href="class_algorithm_1_1_ga_stop_criteria.html">Algorithm::GaStopCriteria</a>, <a class="el" href="class_chromosome_1_1_ga_crossover_operation.html">Chromosome::GaCrossoverOperation</a>, <a class="el" href="class_chromosome_1_1_ga_fitness_comparator.html">Chromosome::GaFitnessComparator</a>, <a class="el" href="class_chromosome_1_1_ga_fitness_operation.html">Chromosome::GaFitnessOperation</a>, <a class="el" href="class_chromosome_1_1_ga_mutation_operation.html">Chromosome::GaMutationOperation</a>, <a class="el" href="class_population_1_1_ga_coupling_operation.html">Population::GaCouplingOperation</a>, <a class="el" href="class_population_1_1_ga_replacement_operation.html">Population::GaReplacementOperation</a>, <a class="el" href="class_population_1_1_ga_scaling_operation.html">Population::GaScalingOperation</a>, and <a class="el" href="class_population_1_1_ga_selection_operation.html">Population::GaSelectionOperation</a>.
<p>

<p>
<a href="class_common_1_1_ga_operation-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="class_common_1_1_ga_parameters.html">GaParameters</a> *GACALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_common_1_1_ga_operation.html#7da19e41bc86254ea540a55a09384023">MakeParameters</a> () const =0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Allocates memory and makes corresponding operation's parameters object on heap.  <a href="#7da19e41bc86254ea540a55a09384023"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool GACALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_common_1_1_ga_operation.html#43b1b5c6a68418b09ec1ac04663d02b6">CheckParameters</a> (const <a class="el" href="class_common_1_1_ga_parameters.html">GaParameters</a> &amp;parameters) const =0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Method checks correctness of parameters.  <a href="#43b1b5c6a68418b09ec1ac04663d02b6"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Interface for genetic operations. 
<p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="7da19e41bc86254ea540a55a09384023"></a><!-- doxytag: member="Common::GaOperation::MakeParameters" ref="7da19e41bc86254ea540a55a09384023" args="() const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="class_common_1_1_ga_parameters.html">GaParameters</a>* GACALL Common::GaOperation::MakeParameters           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const<code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Allocates memory and makes corresponding operation's parameters object on heap. 
<p>
Caller is responsible for allocated memory, freeing of new object should be done by delete keyword. User-defined operation classes inherited by built-in classes should override this method to perform creation of custom operation's parameters objects. <dl class="return" compact><dt><b>Returns:</b></dt><dd>Returns pointer to newly created object.</dd></dl>

<p>Implemented in <a class="el" href="class_chromosome_1_1_ga_fitness_comparator.html#b411938cfd870bcc56a8bf2930483fca">Chromosome::GaFitnessComparator</a>, <a class="el" href="class_population_1_1_coupling_operations_1_1_ga_simple_coupling.html#6ca48dd4fdeec57296d3365a7474e72e">Population::CouplingOperations::GaSimpleCoupling</a>, <a class="el" href="class_population_1_1_coupling_operations_1_1_ga_cross_coupling.html#dad56e27099b5f2dc4fd131622b69a0b">Population::CouplingOperations::GaCrossCoupling</a>, <a class="el" href="class_population_1_1_coupling_operations_1_1_ga_inverse_coupling.html#3dc6763ec2355f788d50947275d26fa6">Population::CouplingOperations::GaInverseCoupling</a>, <a class="el" href="class_population_1_1_coupling_operations_1_1_ga_random_coupling.html#883afe507ca4123b9754679749d665a1">Population::CouplingOperations::GaRandomCoupling</a>, <a class="el" href="class_population_1_1_coupling_operations_1_1_ga_best_always_coupling.html#fd0cc16c1c68c3b512f5d77d708ebacf">Population::CouplingOperations::GaBestAlwaysCoupling</a>, <a class="el" href="class_chromosome_1_1_crossover_operations_1_1_ga_multi_value_crossover.html#d64067dbef4696faabae86efaf821252">Chromosome::CrossoverOperations::GaMultiValueCrossover</a>, <a class="el" href="class_chromosome_1_1_crossover_operations_1_1_ga_add_crossover.html#c6e550a22f405741cb833744d9a5c689">Chromosome::CrossoverOperations::GaAddCrossover</a>, <a class="el" href="class_chromosome_1_1_crossover_operations_1_1_ga_sub_crossover.html#cbd0efa50f8ff0d85024d990574587eb">Chromosome::CrossoverOperations::GaSubCrossover</a>, <a class="el" href="class_chromosome_1_1_crossover_operations_1_1_ga_midpoint_crossover.html#8fcaabc369aa26517c7026f87aff82be">Chromosome::CrossoverOperations::GaMidpointCrossover</a>, <a class="el" href="class_chromosome_1_1_mutation_operations_1_1_ga_flip_mutation.html#14d7c16998f1365b38b1568a40d39a5e">Chromosome::MutationOperations::GaFlipMutation</a>, <a class="el" href="class_chromosome_1_1_mutation_operations_1_1_ga_invert_mutation.html#3114b2931c6726b1227664cd40927c6d">Chromosome::MutationOperations::GaInvertMutation</a>, <a class="el" href="class_chromosome_1_1_mutation_operations_1_1_ga_swap_mutation.html#a31dcbd6baeb4f4b3ec7020b3e962483">Chromosome::MutationOperations::GaSwapMutation</a>, <a class="el" href="class_population_1_1_replacement_operations_1_1_ga_replace_worst.html#4dd145af724735c75e9d5fb97596f2f2">Population::ReplacementOperations::GaReplaceWorst</a>, <a class="el" href="class_population_1_1_replacement_operations_1_1_ga_replace_random.html#add69af46b030088da34aa7ef3c026c8">Population::ReplacementOperations::GaReplaceRandom</a>, <a class="el" href="class_population_1_1_replacement_operations_1_1_ga_replace_parents.html#2092eb846909447ee97dd5f1a025a833">Population::ReplacementOperations::GaReplaceParents</a>, <a class="el" href="class_population_1_1_replacement_operations_1_1_ga_replace_best.html#8b3a7a73bc54bbcf960f925e9e0fb600">Population::ReplacementOperations::GaReplaceBest</a>, <a class="el" href="class_population_1_1_scaling_operations_1_1_ga_window_scaling.html#7ca11bc2530de55801543187f663dd22">Population::ScalingOperations::GaWindowScaling</a>, <a class="el" href="class_population_1_1_scaling_operations_1_1_ga_exponential_scaling.html#9b1cfe6cdb4c3bb820127f74a0e60158">Population::ScalingOperations::GaExponentialScaling</a>, <a class="el" href="class_population_1_1_scaling_operations_1_1_ga_linear_scaling.html#e86fca8dcd6855971fc70729b50f9230">Population::ScalingOperations::GaLinearScaling</a>, <a class="el" href="class_population_1_1_scaling_operations_1_1_ga_normalization_scaling.html#6a289a9b4408840e3e0029a897428edf">Population::ScalingOperations::GaNormalizationScaling</a>, <a class="el" href="class_population_1_1_selection_operations_1_1_ga_select_best.html#c8cc11ebd6bfbb551042d1060ca2f197">Population::SelectionOperations::GaSelectBest</a>, <a class="el" href="class_population_1_1_selection_operations_1_1_ga_select_random.html#a72ea6278598ae856258d03ae22ae4c6">Population::SelectionOperations::GaSelectRandom</a>, <a class="el" href="class_population_1_1_selection_operations_1_1_ga_select_random_best.html#44d0447f93986823f4bc9def76cb100a">Population::SelectionOperations::GaSelectRandomBest</a>, <a class="el" href="class_population_1_1_selection_operations_1_1_ga_select_roulette_wheel.html#580d55ac3fa47bb3e9e83b3ef785c7dc">Population::SelectionOperations::GaSelectRouletteWheel</a>, <a class="el" href="class_population_1_1_selection_operations_1_1_ga_select_tournament.html#b03d97f5584e3ec5902d958d4cf83001">Population::SelectionOperations::GaSelectTournament</a>, <a class="el" href="class_population_1_1_selection_operations_1_1_ga_select_worst.html#344a1b50f880bfcb3cb6065283f00253">Population::SelectionOperations::GaSelectWorst</a>, <a class="el" href="class_algorithm_1_1_stop_criterias_1_1_ga_generation_criteria.html#a672aea5ab7ea137a7331590d472ef48">Algorithm::StopCriterias::GaGenerationCriteria</a>, <a class="el" href="class_algorithm_1_1_stop_criterias_1_1_ga_fitness_criteria.html#bee93e2f31ba20e67f62e2ba56a0370c">Algorithm::StopCriterias::GaFitnessCriteria</a>, and <a class="el" href="class_algorithm_1_1_stop_criterias_1_1_ga_fitness_progress_criteria.html#02ede754e36aef434cc7d5318ad4daa4">Algorithm::StopCriterias::GaFitnessProgressCriteria</a>.</p>

</div>
</div><p>
<a class="anchor" name="43b1b5c6a68418b09ec1ac04663d02b6"></a><!-- doxytag: member="Common::GaOperation::CheckParameters" ref="43b1b5c6a68418b09ec1ac04663d02b6" args="(const GaParameters &amp;parameters) const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool GACALL Common::GaOperation::CheckParameters           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_common_1_1_ga_parameters.html">GaParameters</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>parameters</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const<code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Method checks correctness of parameters. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>parameters</em>&nbsp;</td><td>constant reference to parameters' object on which correctness checking is performed.</td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Returns <code>true</code> if parameters are correct, otherwise it returns <code>false</code>.</dd></dl>

<p>Implemented in <a class="el" href="class_chromosome_1_1_ga_fitness_comparator.html#a49da1aee4c580d2859dda2dfc8a3d92">Chromosome::GaFitnessComparator</a>, <a class="el" href="class_population_1_1_coupling_operations_1_1_ga_simple_coupling.html#1e45b460b5b3346454559e74b94412f8">Population::CouplingOperations::GaSimpleCoupling</a>, <a class="el" href="class_population_1_1_coupling_operations_1_1_ga_cross_coupling.html#6641a1260edd17b12f98a16bc54fbf51">Population::CouplingOperations::GaCrossCoupling</a>, <a class="el" href="class_population_1_1_coupling_operations_1_1_ga_inverse_coupling.html#2513d766b701c2a4a2854ef2b93e3559">Population::CouplingOperations::GaInverseCoupling</a>, <a class="el" href="class_population_1_1_coupling_operations_1_1_ga_random_coupling.html#49e2150b4c191e8560de8d7960ec1b44">Population::CouplingOperations::GaRandomCoupling</a>, <a class="el" href="class_population_1_1_coupling_operations_1_1_ga_best_always_coupling.html#08c19295dad469b9ffb5a3649c978e2b">Population::CouplingOperations::GaBestAlwaysCoupling</a>, <a class="el" href="class_chromosome_1_1_crossover_operations_1_1_ga_multi_value_crossover.html#79b09e3d87af4e34db829fcccb7d061c">Chromosome::CrossoverOperations::GaMultiValueCrossover</a>, <a class="el" href="class_chromosome_1_1_crossover_operations_1_1_ga_add_crossover.html#1579c25ccc3023ca2e4fc0fef9a4a153">Chromosome::CrossoverOperations::GaAddCrossover</a>, <a class="el" href="class_chromosome_1_1_crossover_operations_1_1_ga_sub_crossover.html#185e5ca641b35297a81b2815936ec89d">Chromosome::CrossoverOperations::GaSubCrossover</a>, <a class="el" href="class_chromosome_1_1_crossover_operations_1_1_ga_midpoint_crossover.html#ad2f7614076ccd376fd0f139c65f0154">Chromosome::CrossoverOperations::GaMidpointCrossover</a>, <a class="el" href="class_chromosome_1_1_mutation_operations_1_1_ga_flip_mutation.html#abbf78b7b9b93ff7123825f3784a007c">Chromosome::MutationOperations::GaFlipMutation</a>, <a class="el" href="class_chromosome_1_1_mutation_operations_1_1_ga_invert_mutation.html#2ecea3e504d1fcd4e8a5f0e220b06a86">Chromosome::MutationOperations::GaInvertMutation</a>, <a class="el" href="class_chromosome_1_1_mutation_operations_1_1_ga_swap_mutation.html#77ec96dd7e627caf18b4df5048f3d723">Chromosome::MutationOperations::GaSwapMutation</a>, <a class="el" href="class_population_1_1_replacement_operations_1_1_ga_replace_worst.html#cd0d1d28ab39936038b5ac2a5eaa826d">Population::ReplacementOperations::GaReplaceWorst</a>, <a class="el" href="class_population_1_1_replacement_operations_1_1_ga_replace_random.html#8c08afdc0e61fa8c93d5d9c29d18a55c">Population::ReplacementOperations::GaReplaceRandom</a>, <a class="el" href="class_population_1_1_replacement_operations_1_1_ga_replace_parents.html#e6de9af71c37294a87f283f6b44fe19a">Population::ReplacementOperations::GaReplaceParents</a>, <a class="el" href="class_population_1_1_replacement_operations_1_1_ga_replace_best.html#db70a834ef907742e249640bbce1e90d">Population::ReplacementOperations::GaReplaceBest</a>, <a class="el" href="class_population_1_1_scaling_operations_1_1_ga_window_scaling.html#de149f020c11423b97c46cf903cffadf">Population::ScalingOperations::GaWindowScaling</a>, <a class="el" href="class_population_1_1_scaling_operations_1_1_ga_exponential_scaling.html#236d31d52956eb30bb074c0890f63d33">Population::ScalingOperations::GaExponentialScaling</a>, <a class="el" href="class_population_1_1_scaling_operations_1_1_ga_linear_scaling.html#386b20eecc8b26bb4340687fda48d0d5">Population::ScalingOperations::GaLinearScaling</a>, <a class="el" href="class_population_1_1_scaling_operations_1_1_ga_normalization_scaling.html#e427f91fa5a28737842f88957a87341f">Population::ScalingOperations::GaNormalizationScaling</a>, <a class="el" href="class_population_1_1_selection_operations_1_1_ga_select_best.html#2cf93d2224e9a0672c40156b02ef2f3e">Population::SelectionOperations::GaSelectBest</a>, <a class="el" href="class_population_1_1_selection_operations_1_1_ga_select_random.html#041b7c16ec8d7fcc4dde581467a4bba6">Population::SelectionOperations::GaSelectRandom</a>, <a class="el" href="class_population_1_1_selection_operations_1_1_ga_select_random_best.html#384acf7f5efc0ebbf4ea79078c33616a">Population::SelectionOperations::GaSelectRandomBest</a>, <a class="el" href="class_population_1_1_selection_operations_1_1_ga_select_roulette_wheel.html#0b70bccaa7fa692b3df58d616b11cb04">Population::SelectionOperations::GaSelectRouletteWheel</a>, <a class="el" href="class_population_1_1_selection_operations_1_1_ga_select_tournament.html#2e3f380957b3a5efe3b79021a684e245">Population::SelectionOperations::GaSelectTournament</a>, <a class="el" href="class_population_1_1_selection_operations_1_1_ga_select_worst.html#69765ddac56e0cfe572bdac991e2743c">Population::SelectionOperations::GaSelectWorst</a>, <a class="el" href="class_algorithm_1_1_stop_criterias_1_1_ga_generation_criteria.html#acb70103776052c37c2cbaad3a888673">Algorithm::StopCriterias::GaGenerationCriteria</a>, <a class="el" href="class_algorithm_1_1_stop_criterias_1_1_ga_fitness_criteria.html#6d9034c81120c7b75efa8dd754b1013e">Algorithm::StopCriterias::GaFitnessCriteria</a>, and <a class="el" href="class_algorithm_1_1_stop_criterias_1_1_ga_fitness_progress_criteria.html#e2ca3c65a1cd711adcc370cf78fca9a8">Algorithm::StopCriterias::GaFitnessProgressCriteria</a>.</p>

</div>
</div><p>
<hr>The documentation for this class was generated from the following file:<ul>
<li>source/<a class="el" href="_operation_8h.html">Operation.h</a></ul>
</div>
<br/><a href="http://www.coolsoft-sd.com/ProductVersion.aspx?vid=9">Genetic Algorithm Library</a><br/><a href="http://www.coolsoft-sd.com/">Coolsoft Software Development</a>
</body>
</html>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The GNU General Public License (GPLv3)

Share

About the Author

Mladen Janković
Software Developer
Serbia Serbia
No Biography provided

| Advertise | Privacy | Mobile
Web03 | 2.8.141015.1 | Last Updated 7 Apr 2012
Article Copyright 2008 by Mladen Janković
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid