Logo
Distributed Genetic Programming Framework
print print

File org.dgpf.search.algorithms.sa.SAStateBag.java

Here you can find all the information about the file org.dgpf.search.algorithms.sa.SAStateBag.java. You may explore it here or download it onto your local disk.
/*
 * Copyright (c) 2006 Thomas Weise
 * 
 * E-Mail           : tweise@gmx.de
 * Creation Date    : 2006-06-05 13:27:42
 * Created by       : Stefan Niemczyk, Marc Kirchhoff
 * Original Filename: org.dgpf.search.algorithms.sa.SAStateBag.java
 * Version          : 1.0.1
 * Last modification: 2006-06-22
 *                by: Thomas Weise
 * 
 * License          : GNU LESSER GENERAL PUBLIC LICENSE
 *                    Version 2.1, February 1999
 *                    You should have received a copy of this license along
 *                    with this library; if not, write to the Free Software
 *                    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
 *                    MA 02111-1307, USA or download the license under
 *                    http://www.gnu.org/copyleft/lesser.html.
 *                    
 * Warranty         : This software is provided "as is" without any
 *                    warranty; without even the implied warranty of
 *                    merchantability or fitness for a particular purpose.
 *                    See the Gnu Lesser General Public License for more
 *                    details.
 */


package org.dgpf.search.algorithms.sa;

import java.io.Serializable;

import org.dgpf.search.api.SearchState;
import org.dgpf.search.api.SearchStateBag;
import org.sfc.math.stochastic.statistics.StatisticInfoBag;

/**
 * The state of the simulated annealing engine.
 * @param <Genotype> The genotype of the elements to be evolved.
 *
 * @author Stefan Niemczyk, Marc Kirchhoff
 */

public class SAStateBag<Genotype extends Serializable>
                                 extends SearchStateBag<Genotype>
  {
  /**
 * The serial version uid.
 */

  private static final long serialVersionUID = 1;
  
/**
 * The statistic info for all the elements of the current update.
 */

  StatisticInfoBag[]      m_stat       ;
  
/**
 * Create a new simulated annealing state bag.
 * @param p_ff_count  The count of fitness functions evaluated by this
 *                    search.
 */

  protected SAStateBag  (final int  p_ff_count)
    {
    super(p_ff_count);
    }
  

/**
 * This method allows you to perform additional initialization before
 * the hosted search state will be created.
 * @param p_ff_count  The count of fitness functions evaluated by this
 *                    search.
 */

  @Override
  protected void  init  (int  p_ff_count)
    {
    StatisticInfoBag[]  l_a;

    this.m_stat = l_a = new StatisticInfoBag[p_ff_count];

    for(--p_ff_count; p_ff_count >= 0; p_ff_count--)
      {
      l_a[p_ff_count] = new StatisticInfoBag();
      }
    }
  
/**
 * This method is used internally to create a search state instance that
 * can be hosted by this bag.
 * @param p_ff_count  The count of fitness functions evaluated by this
 *                    search.
 * @return  The new search state. 
 */

  @Override
  protected SearchState<Genotype> create_state(final int  p_ff_count)
    {
    return new SAState<Genotype>(p_ff_count, this);
    }
  }

File Information:

file name:SAStateBag.java
package:org.dgpf.search.algorithms.sa
qualified name:org.dgpf.search.algorithms.sa.SAStateBag.java
file type:Java Source File
download location:download http://dgpf.sourceforge.net/source/org/dgpf/search/algorithms/sa/SAStateBag.java
size:3.028 KB (3101 B)
uploaded: 2015-07-22 04:10:59 GMT+0000
last update: 2006-06-22 13:15:56 GMT+0000
last access: 2017-11-18 07:26:15 GMT+0000

statistics online since 2006-01-02.   RSS Feed
Contact us by sending an email to tweise@gmx.de to receive further information, to report errors, or to join our project.
All content on this site (http://dgpf.sourceforge.net/) is LGPL-licensed.
http://dgpf.sourceforge.net/scripts/source/source.php last modified at 2015-07-22 04:10:53 GMT+0000 served at 2017-11-18 23:25:17 GMT+0000.
Valid CSS Valid XHTML 1.1
Valid RSS SourceForge.net Logo