Free cookie consent management tool by TermsFeed Policy Generator

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

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

#3026:

  • refactored inheritance structure of json items, now the default JsonItem is an abstract class without properties Value and Range -> splitted up into new interfaces
  • updated view models for new json item structure
  • updated SingleLineArrayJsonWriter
File size: 764 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 : IntervalRestrictedValueJsonItem<int> { }
9  public class IntArrayJsonItem : IntervalRestrictedArrayJsonItem<int> { }
10  public class IntRangeJsonItem : RangedJsonItem<int> { }
11  public class IntMatrixJsonItem : IntervalRestrictedMatrixJsonItem<int> {
12    /*
13    protected override bool IsInRange() {
14      for (int c = 0; c < Value.Length; ++c) {
15        for (int r = 0; r < Value[c].Length; ++r) {
16          if (Value[c][r] < Range.First() && Range.Last() < Value[c][r])
17            return false;
18        }
19      }
20      return true;
21    }
22    */
23  }
24}
Note: See TracBrowser for help on using the repository browser.