Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/27/21 17:55:06 (3 years ago)
Author:
dpiringe
Message:

#3026

  • fixed injection of new matrix value in ValueTypeMatrixConverter
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Converters/ValueTypeMatrixConverter.cs

    r17843 r18036  
    77using HeuristicLab.Data;
    88using HeuristicLab.Core;
     9using System.Reflection;
    910
    1011namespace HeuristicLab.JsonInterface {
     
    104105      var rows = data.Length > 0 ? data[0].Length : 0;
    105106
     107
     108      // matrix
     109      var t = matrix.GetType();
     110      var matrixInfo = matrix.GetType().GetField("matrix", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance);
     111      matrixInfo.SetValue(matrix, new T[rows, cols]);
     112      /*
    106113      var rowInfo = matrix.GetType().GetProperty("Rows");
    107       rowInfo.SetValue(matrix, rows);
     114      rowInfo.SetValue(matrix, rows); // TODO
    108115      var colInfo = matrix.GetType().GetProperty("Columns");
    109116      colInfo.SetValue(matrix, cols);
     117      */
     118
    110119
    111120      for (int x = 0; x < rows; ++x) {
Note: See TracChangeset for help on using the changeset viewer.