Exemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GeneticSharp.Domain.Fitnesses.FitnessException"/> class.
 /// </summary>
 /// <param name="fitness">The fitness where occurred the error.</param>
 /// <param name="message">The error message.</param>
 /// <param name="innerException">Inner exception.</param>
 public FitnessException(IFitness fitness, string message, Exception innerException)
     : base("{0}: {1}".With(fitness != null ? fitness.GetType().Name : String.Empty, message), innerException)
 {
     Fitness = fitness;
 }
Exemplo n.º 2
0
 /// <summary>
 /// Compiles brainfuck code into an executable.
 /// </summary>
 /// <param name="program">Brainfuck source code</param>
 /// <param name="pathName">Executable file path</param>
 /// <param name="fitness">IFitness</param>
 /// <param name="includeHeader">True to display the header (Brainfuck .NET Compiler 1.0, Created by ...).</param>
 public static void Compile(string program, string pathName, IFitness fitness, bool includeHeader = true)
 {
     Compile(program, pathName, fitness.GetType().Name, fitness.GetConstructorParameters());
 }
Exemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GeneticSharp.Domain.Fitnesses.FitnessException"/> class.
 /// </summary>
 /// <param name="fitness">The fitness where occurred the error.</param>
 /// <param name="message">The error message.</param>
 /// <param name="innerException">Inner exception.</param>
 public FitnessException(IFitness fitness, string message, Exception innerException)
     : base("{0}: {1}".With(fitness != null ? fitness.GetType().Name : String.Empty, message), innerException)
 {
     Fitness = fitness;
 }
Exemplo n.º 4
0
 /// <summary>
 /// Compiles brainfuck code into an executable.
 /// </summary>
 /// <param name="program">Brainfuck source code</param>
 /// <param name="pathName">Executable file path</param>
 /// <param name="fitness">IFitness</param>
 /// <param name="includeHeader">True to display the header (Brainfuck .NET Compiler 1.0, Created by ...).</param>
 public static void Compile(string program, string pathName, IFitness fitness, bool includeHeader = true)
 {
     Compile(program, pathName, fitness.GetType().Name, fitness.GetConstructorParameters());
 }