Logo
Distributed Genetic Programming Framework
print print

File org.dgpf.gp.netvm.base.NetworkImpl.java

Here you can find all the information about the file org.dgpf.gp.netvm.base.NetworkImpl.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-07-19 10:48:33
 * Original Filename: org.dgpf.gp.netvm.base.NetworkImpl.java
 * Version          : 1.0.0
 * Last modification: 2006-07-19
 *                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.gp.netvm.base;

import org.dgpf.gp.vm.base.VMContextExtension;
import org.dgpf.gp.vm.base.VMMemory;

/**
 * This abstract class forms the base for network simulator implementations.
 *
 * @author Thomas Weise
 */

public abstract class NetworkImpl extends VMContextExtension<NetVMContext>
  {
/**
 * The network vm context to be used.
 * @param p_nvc The network vm context to be used.
 */

  protected NetworkImpl (final NetVMContext p_nvc)
    {
    super(p_nvc);
    }
  
/**
 * Deliver a message from a source to the destinations in reach.
 * @param p_source  The source node.
 * @param p_data    The message data.
 * @return  <code>true</code> if and only if the message was delivered to
 *          at least one node. 
 */

  protected abstract  boolean deliver (final NetVM         p_source,
                                       final VMMemory      p_data);
  
/**
 * Set the count of virtual machines to be simulated.
 * @param p_vm_count  The new count of virtual machines to be simulated.
 */

  protected abstract  void  set_vm_count(final int p_vm_count);
  
/**
 * Reset the internal caches used.
 */

  protected abstract  void  reset_caches();
  
  
/**
 * This method is called right before a simulation starts to initialize the
 * virtual network.
 * The simulation-setup of the fitness functions will also be invoked here.
 * @param p_index   The index number of the current simulation. The first
 *                  simulation will have index 0, the second will have
 *                  index 1 and so on.
 */

  protected abstract  void  init_network (final int p_index);
  
  
/**
 * This method is called right when a simulation has finished and cleans
 * up the network.
 * @param p_index   The index number of the current simulation. The first
 *                  simulation will have index 0, the second will have
 *                  index 1 and so on.
 */

  protected abstract  void    end_network    (final int p_index);
  
/**
 * This method is called directly before the network implementation is
 * dumped.
 */

  protected void  dispose()
    {
    //
    }
  }

File Information:

file name:NetworkImpl.java
package:org.dgpf.gp.netvm.base
qualified name:org.dgpf.gp.netvm.base.NetworkImpl.java
file type:Java Source File
download location:download http://dgpf.sourceforge.net/source/org/dgpf/gp/netvm/base/NetworkImpl.java
size:3.218 KB (3296 B)
uploaded: 2015-07-22 04:10:56 GMT+0000
last update: 2006-07-19 12:37:34 GMT+0000
last access: 2017-11-19 04:50:28 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-19 04:50:28 GMT+0000.
Valid CSS Valid XHTML 1.1
Valid RSS SourceForge.net Logo