- Timestamp:
- 01/16/20 15:48:32 (5 years ago)
- Location:
- branches/3040_VectorBasedGP/HeuristicLab.Problems.DataAnalysis/3.4
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3040_VectorBasedGP/HeuristicLab.Problems.DataAnalysis/3.4/Dataset.cs
r17365 r17403 450 450 string IStringConvertibleMatrix.GetValue(int rowIndex, int columnIndex) { 451 451 var value = variableValues[variableNames[columnIndex]][rowIndex]; 452 if (value is IVector vector) 453 return $"[{string.Join(", ", vector.Cast<object>())}]"; 452 if (value is IVector vector) { 453 const int maxCount = 10; 454 string extension = vector.Count > maxCount ? ", ..." : ""; 455 return $"[{string.Join(", ", vector.Cast<object>().Take(Math.Min(vector.Count, maxCount)))}{extension}]"; 456 } 457 454 458 return value.ToString(); 455 459 } -
branches/3040_VectorBasedGP/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/IVector.cs
r17365 r17403 6 6 [StorableType("E6B5D191-F094-4A6C-91C1-011191C13A16")] 7 7 public interface IVector : IEnumerable { 8 int Count { get; } 8 9 } 9 10
Note: See TracChangeset
for help on using the changeset viewer.