src/GenFx/GeneticEntity.cs
/// <summary>
/// Returns the appropriate fitness value of the <b>GeneticEntity</b> based on the the <paramref name="fitnessType"/>.
/// </summary>
/// <param name="fitnessType"><see cref="FitnessType"/> indicating which fitness value to
/// return.</param>
/// <returns>The appropriate fitness value of the <b>GeneticEntity</b>.</returns>
/// <exception cref="ArgumentException"><paramref name="fitnessType"/> value is undefined.</exception>
Returns the appropriate fitness value of the GeneticEntity.
Returns the appropriate fitness value of the GeneticEntity .
public double GetFitnessValue(FitnessType fitnessType)
        {
            if (!Enum.IsDefined(typeof(FitnessType), fitnessType))
            {
                throw EnumHelper.CreateUndefinedEnumException(typeof(FitnessType), "fitnessType");
            }
            if (fitnessType == FitnessType.Raw)
            {
                return this.rawFitnessValue;
            }
            else
            {
                return this.scaledFitnessValue;
            }
        }
public double GetFitnessValue ( FitnessType fitnessType ) { if ( ! Enum . IsDefined ( typeof ( FitnessType ) , fitnessType ) ) { throw EnumHelper . CreateUndefinedEnumException ( typeof ( FitnessType ) , " " ) ; } if ( fitnessType == FitnessType . Raw ) { return this . rawFitnessValue ; } else { return this . scaledFitnessValue ; } }
Returns the appropriate fitness value of the GeneticEntity.
Returns the appropriate fitness value of the GeneticEntity .
The appropriate fitness value of the GeneticEntity
The appropriate fitness value of the GeneticEntity
value is undefined.
value is undefined .
fitnessType
FitnessType
indicating which fitness value to
return.
indicating which fitness value to return .