Free cookie consent management tool by TermsFeed Policy Generator

Changeset 14451


Ignore:
Timestamp:
12/03/16 00:33:22 (8 years ago)
Author:
abeham
Message:

#2701: Added Basic QAP problem and option to hide generic type in the ItemAttribute

Location:
branches/MemPRAlgorithm
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • branches/MemPRAlgorithm/HeuristicLab.Core/3.3/Attributes/ItemAttribute.cs

    r14185 r14451  
    3939      set { description = value == null ? string.Empty : value; }
    4040    }
     41    public bool ExcludeGenericTypeInfo { get; set; }
    4142
    42     public ItemAttribute() {
    43       Name = string.Empty;
    44       Description = string.Empty;
    45     }
    46     public ItemAttribute(string name, string description) {
     43    public ItemAttribute() : this(string.Empty, string.Empty, false) { }
     44    public ItemAttribute(string name, string description) : this(name, description, false) { }
     45    public ItemAttribute(string name, string description, bool excludeGenericTypeInfo) {
    4746      Name = name;
    4847      Description = description;
     48      ExcludeGenericTypeInfo = excludeGenericTypeInfo;
    4949    }
    5050
     
    5252      object[] attribs = type.GetCustomAttributes(typeof(ItemAttribute), false);
    5353      if (attribs.Length > 0) {
    54         string name = ((ItemAttribute)attribs[0]).Name;
    55         if (type.IsGenericType) {
     54        var attribute = (ItemAttribute)attribs[0];
     55        string name = attribute.Name;
     56        if (!attribute.ExcludeGenericTypeInfo && type.IsGenericType) {
    5657          name += "<";
    5758          Type[] typeParams = type.GetGenericArguments();
  • branches/MemPRAlgorithm/HeuristicLab.Problems.QuadraticAssignment/3.3/HeuristicLab.Problems.QuadraticAssignment-3.3.csproj

    r11623 r14451  
    137137    <Compile Include="LocalImprovement\QAPExhaustiveInversionLocalImprovement.cs" />
    138138    <Compile Include="QAPAssignment.cs" />
     139    <Compile Include="QAPBasicProblem.cs" />
    139140    <Compile Include="QAPPermutationProximityCalculator.cs" />
    140141    <Compile Include="QuadraticAssignmentProblem.cs" />
Note: See TracChangeset for help on using the changeset viewer.