Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/project-web/dgpf/htdocs/scripts/datetime.php on line 7

Warning: Cannot modify header information - headers already sent by (output started at /home/project-web/dgpf/htdocs/scripts/datetime.php:7) in /home/project-web/dgpf/htdocs/scripts/init.php on line 28

Warning: Cannot modify header information - headers already sent by (output started at /home/project-web/dgpf/htdocs/scripts/datetime.php:7) in /home/project-web/dgpf/htdocs/scripts/init.php on line 29
Distributed Genetic Programming Framework
Logo
Distributed Genetic Programming Framework
print print


Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/project-web/dgpf/htdocs/scripts/datetime.php on line 16

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/project-web/dgpf/htdocs/scripts/datetime.php on line 16

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/project-web/dgpf/htdocs/scripts/datetime.php on line 16

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/project-web/dgpf/htdocs/scripts/datetime.php on line 16

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/project-web/dgpf/htdocs/scripts/datetime.php on line 16

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/project-web/dgpf/htdocs/scripts/datetime.php on line 16

File org.dgpf.gp.regression.expressions.unary.UnaryExpression.java

Here you can find all the information about the file org.dgpf.gp.regression.expressions.unary.UnaryExpression.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-25 13:44:34
 * Original Filename: org.dgpf.gp.regression.expressions.binary.UnaryExpression.java
 * Version          : 1.0.0
 * Last modification: 2006-07-25
 *                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.regression.expressions.unary;

import org.dgpf.gp.regression.base.Expression;


/**
 * This is the base class for all unary expressions.
 *
 * @author Thomas Weise
 */

public abstract class UnaryExpression extends Expression
  {
/**
 * The first sub-expression.
 */

  Expression  m_sub ;
  
/**
 * Create a unary expression.
 * @param p_sub   The sub-expression.
 */

  public  UnaryExpression  (final Expression p_sub)
    {
    super();
    this.set_sub(p_sub);
    }
  
/**
 * Set the sub-expression
 * @param p_ex  The sub-expression to be set.
 */

  final void  set_sub(final Expression p_ex)
    {
    this.m_sub = p_ex.get_handler().optimize(p_ex);
    }
  
   
  
/**
 * Obtain the sub-expression.
 * @return  The sub-expression.
 */

  public  final Expression  get_sub ()
    {
    return this.m_sub;
    }
  
  

/**
 * Returns the costs that will arise when executing this expression.
 * This is defined as the costs of exactly this expression plus the costs
 * of all sub-expressions.
 * @return The costs of executing this expression.
 */

  @Override
  public  double  get_costs  ()
    {
    return this.m_sub.get_costs();
    }
  
  
/**
 * Check if another object is equal to this one.
 * @param p_o   The object to check.
 * @return  <code>true</code> if and only if <code>p_o</code> is exactly
 *          the same object than this one.
 */

  @Override
  public  boolean equals  (final Object p_o)
    {
    UnaryExpression  l_be;
    
    if(p_o == thisreturn true;
    if(p_o == null) return false;
    
    if(p_o.getClass().equals(this.getClass()))
      {
      l_be = ((UnaryExpression)p_o);
      return ( (l_be.m_sub.equals(this.m_sub)) );
      }
    
    return false;    
    }
  
/**
 * Get a string that can be copy-pasted into a java file an that creates
 * this construct.
 * @param p_b The string builder to add with. 
 */

  @Override
  public void    to_creation_string (final StringBuilder p_b)
    {
    p_b.append("new ");
    p_b.append(this.getClass().getSimpleName());
    p_b.append('(');
    this.m_sub.to_creation_string(p_b);
    p_b.append(')');
    }
  

/**
 * Check whether an expression is constant or not.
 * @return  <code>true</code> if and only if the specified expression is
 *          constant.
 */

  @Override
  public  boolean             is_constant()
    {
    return this.m_sub.is_constant();
    }
  
  
/**
 * Check how the specified variable is used.
 * @param p_index The index of the variable.
 * @return  An or-combination of <code>1</code> if the variable is read and
 *          <code>2</code> if it is written to.
 */

  @Override
  public  final int  get_variable_usage       (final int p_index)
    {
    return ((this.m_sub.get_variable_usage(p_index) != 0) ? 1 : 0);
    }
  

/**
 * Returns the count of variable used.
 * @return The count of variable used.
 */

  @Override
  public  final int     get_variable_count  ()
    {
    return this.m_sub.get_variable_count();
    }
  

/**
 * Obtain the depth of the construct.
 * @return The depth of the construct.
 */

  @Override
  public  int     get_depth           ()
    {
    return (1 + this.m_sub.get_depth());
    }
  }

File Information:

file name:UnaryExpression.java
package:org.dgpf.gp.regression.expressions.unary
qualified name:org.dgpf.gp.regression.expressions.unary.UnaryExpression.java
file type:Java Source File
download location:download http://dgpf.sourceforge.net/source/org/dgpf/gp/regression/expressions/unary/UnaryExpression.java
size:4.356 KB (4461 B)
uploaded: 2018-01-07 12:03:34 GMT+0000
last update: 2006-08-17 03:25:39 GMT+0000
last access: 2018-01-07 12:03:34 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
Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/project-web/dgpf/htdocs/scripts/datetime.php on line 16

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/project-web/dgpf/htdocs/scripts/datetime.php on line 16
last modified at 2018-01-07 12:03:34 GMT+0000
Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/project-web/dgpf/htdocs/scripts/datetime.php on line 19

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/project-web/dgpf/htdocs/scripts/datetime.php on line 19
served at 2018-02-19 02:10:52 GMT+0000.
Valid CSS Valid XHTML 1.1
Valid RSS SourceForge.net Logo