Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/03/12 18:22:41 (12 years ago)
Author:
abeham
Message:

#1614

  • Added Transpose() extension method for double[,] matrices
  • Added IProblemInstanceConsumer<T> interface
  • Implemented general ProblemView which auto-detects all instances a problem can consume
  • Added ability of IProblemInstanceProvider to directly feed a consumer
  • Implemented general view for problem instance providers
  • Fixed a few bugs
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Common/3.3/ExtensionMethods.cs

    r7432 r7448  
    331331    }
    332332    #endregion
     333
     334    #region Matrix operations
     335    public static double[,] Transpose(this double[,] matrix) {
     336      var result = new double[matrix.GetLength(1), matrix.GetLength(0)];
     337      for (int i = 0; i < matrix.GetLength(0); i++)
     338        for (int j = 0; j < matrix.GetLength(1); j++)
     339          result[j, i] = matrix[i, j];
     340      return result;
     341    }
     342    #endregion
    333343  }
    334344}
Note: See TracChangeset for help on using the changeset viewer.