Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/25/20 17:18:00 (5 years ago)
Author:
dpiringe
Message:

#3026:

  • renamed ResultItem to ResultJsonItem
  • implemented RegressionProblemDataConverter
  • added support for "named matrices" (named = rows and columns have names) -> INamedMatrixJsonItem incl. base classes and views
  • added a bool property Active in IJsonItem -> marks items, which should be written into the template
Location:
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Models
Files:
1 added
4 edited
1 moved

Legend:

Unmodified
Added
Removed
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Models/DoubleJsonItems.cs

    r17446 r17451  
    2323    }
    2424  }
     25
     26  public class DoubleNamedMatrixJsonItem : NamedMatrixJsonItemBase<double> {
     27    protected override bool IsInRange() {
     28      for (int c = 0; c < Value.Length; ++c) {
     29        for (int r = 0; r < Value[c].Length; ++r) {
     30          if (Value[c][r] < Range.First() && Range.Last() < Value[c][r])
     31            return false;
     32        }
     33      }
     34      return true;
     35    }
     36  }
    2537}
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Models/IntJsonItems.cs

    r17446 r17451  
    66
    77namespace HeuristicLab.JsonInterface {
    8   public class IntJsonItem : JsonItem<int> { }
     8  public class IntJsonItem : JsonItem<int> {
     9    /*I
     10    public int MinValue { get; set; }
     11    public int MaxValue { get; set; }
     12    */
     13  }
    914  public class IntArrayJsonItem : ArrayJsonItemBase<int> { }
    1015  public class IntRangeJsonItem : ArrayJsonItemBase<int> {
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Models/JsonItem.cs

    r17446 r17451  
    6666    public virtual IEnumerable<object> Range { get; set; }
    6767   
     68    // TODO eigene items für LookUp?
    6869    public virtual string ActualName { get; set; }
     70
     71    // TODO jsonIgnore dataType?
    6972
    7073    [JsonIgnore]
     
    7376    [JsonIgnore]
    7477    public virtual IJsonItem Parent { get; set; }
     78
     79    [JsonIgnore]
     80    public virtual bool Active { get; set; }
    7581
    7682    #region Constructors
     
    8187    }
    8288    #endregion
    83 
    84     #region Public Static Methods
    85     public static void Merge(JsonItem target, JsonItem from) {
    86       target.Name = from.Name ?? target.Name;
    87       target.Range = from.Range ?? target.Range;
    88       target.Value = from.Value ?? target.Value;
    89       target.ActualName = from.ActualName ?? target.ActualName;
    90       if(target.Children != null) {
    91         if (from.Children != null)
    92           ((List<IJsonItem>)from.Children).AddRange(target.Children);
    93       } else {
    94         target.Children = from.Children;
    95       }
    96     }
    97     #endregion
    98 
     89   
    9990    #region Public Methods
    10091    public void AddChildren(params IJsonItem[] childs) =>
     
    124115
    125116    #region Helper
     117    /*
     118     * TODO protected abstract bool Validate();
     119     */
     120
    126121    protected virtual bool IsInRange() {
    127122      bool b1 = true, b2 = true;
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Models/ResultJsonItem.cs

    r17450 r17451  
    66
    77namespace HeuristicLab.JsonInterface {
    8   public class ResultItem : JsonItem {
     8  public class ResultJsonItem : JsonItem {
    99
    1010  }
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Models/StringJsonItem.cs

    r17446 r17451  
    77namespace HeuristicLab.JsonInterface {
    88  public class StringJsonItem : JsonItem<string> { }
     9  public class StringArrayJsonItem : JsonItem<string[], string> { }
    910}
Note: See TracChangeset for help on using the changeset viewer.