Free cookie consent management tool by TermsFeed Policy Generator

source: branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Models/IntJsonItems.cs @ 17451

Last change on this file since 17451 was 17451, checked in by dpiringe, 4 years ago

#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
File size: 866 bytes
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using System.Threading.Tasks;
6
7namespace HeuristicLab.JsonInterface {
8  public class IntJsonItem : JsonItem<int> {
9    /*I
10    public int MinValue { get; set; }
11    public int MaxValue { get; set; }
12    */
13  }
14  public class IntArrayJsonItem : ArrayJsonItemBase<int> { }
15  public class IntRangeJsonItem : ArrayJsonItemBase<int> {
16    public override bool Resizable { get => false; set { } }
17  }
18  public class IntMatrixJsonItem : MatrixJsonItemBase<int> {
19
20    protected override bool IsInRange() {
21      for (int c = 0; c < Value.Length; ++c) {
22        for (int r = 0; r < Value[c].Length; ++r) {
23          if (Value[c][r] < Range.First() && Range.Last() < Value[c][r])
24            return false;
25        }
26      }
27      return true;
28    }
29  }
30}
Note: See TracBrowser for help on using the repository browser.