/// ------------------------------------------------------
/// SwarmOps - Numeric and heuristic optimization for C#
/// Copyright (C) 2003-2011 Magnus Erik Hvass Pedersen.
/// Please see the file license.txt for license details.
/// SwarmOps on the internet: http://www.Hvass-Labs.org/
/// ------------------------------------------------------
namespace SwarmOps
{
///
/// Best solution found during optimization.
///
public class Result
{
#region Constructors.
///
/// Construct the object.
///
/// Best found solution parameters.
/// Fitness for best found solution.
/// Feasibility (constraint satisfaction) of best found solution.
/// Number of iterations used.
public Result(double[] parameters, double fitness, bool feasible, int iterations)
{
Parameters = parameters.Clone() as double[];
Fitness = fitness;
Iterations = iterations;
Feasible = feasible;
}
#endregion
#region Public fields.
///
/// Best found solution parameters.
///
public double[] Parameters
{
get;
protected set;
}
///
/// Fitness associated with best found solution.
///
public double Fitness
{
get;
protected set;
}
///
/// Feasibility (constraint satisfaction) associated with best found solution.
/// Defaults to true if problem is not constrained.
///
public bool Feasible
{
get;
protected set;
}
///
/// Number of iterations (i.e. fitness evaluations) it took
/// to achieve these results.
///
public double Iterations
{
get;
protected set;
}
#endregion
}
}