Last change
on this file since 17464 was
17451,
checked in by dpiringe, 5 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:
1.1 KB
|
Rev | Line | |
---|
[17446] | 1 | using System;
|
---|
| 2 | using System.Collections.Generic;
|
---|
| 3 | using System.Linq;
|
---|
| 4 | using System.Text;
|
---|
| 5 | using System.Threading.Tasks;
|
---|
| 6 |
|
---|
| 7 | namespace HeuristicLab.JsonInterface {
|
---|
| 8 | public class DoubleJsonItem : JsonItem<double> { }
|
---|
| 9 | public class DoubleArrayJsonItem : ArrayJsonItemBase<double> { }
|
---|
| 10 | public class DoubleRangeJsonItem : ArrayJsonItemBase<double> {
|
---|
| 11 | public override bool Resizable { get => false; set { } }
|
---|
| 12 | }
|
---|
| 13 |
|
---|
| 14 | public class DoubleMatrixJsonItem : MatrixJsonItemBase<double> {
|
---|
| 15 | protected override bool IsInRange() {
|
---|
| 16 | for (int c = 0; c < Value.Length; ++c) {
|
---|
| 17 | for (int r = 0; r < Value[c].Length; ++r) {
|
---|
| 18 | if (Value[c][r] < Range.First() && Range.Last() < Value[c][r])
|
---|
| 19 | return false;
|
---|
| 20 | }
|
---|
| 21 | }
|
---|
| 22 | return true;
|
---|
| 23 | }
|
---|
| 24 | }
|
---|
[17451] | 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 | }
|
---|
[17446] | 37 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.