Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/21/15 11:54:43 (9 years ago)
Author:
mkommend
Message:

#2174: Updated views and renamed programmable problem to basic problem and added individual extension methods.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Individuals/SingleEncodingIndividual.cs

    r11619 r11813  
    2121
    2222using System;
     23using HeuristicLab.Common;
    2324using HeuristicLab.Core;
    2425
     
    4243    }
    4344
     45    public override TEncoding GetEncoding<TEncoding>() {
     46      TEncoding encoding = Encoding as TEncoding;
     47      if (encoding == null) throw new InvalidOperationException(string.Format("The individual does not use a {0}.", typeof(TEncoding).GetPrettyName()));
     48      return encoding;
     49    }
     50
    4451    internal override Individual Copy(IScope scope) {
    4552      SetScopeValue(Name, scope, (IItem)this[Name].Clone());
Note: See TracChangeset for help on using the changeset viewer.