コード例 #1
0
 /// <summary>Instatiates a general matrix with the provided matrix data source,
 /// limited to the specified column and row ranges</summary>
 /// <param name="matrixData">Matrix data source</param>
 /// <param name="columnRange">Visible column range</param>
 /// <param name="rowRange">Visible row range</param>
 protected MatrixBase(
     MatrixDataSource <T> matrixData,
     Int32Range columnRange,
     Int32Range rowRange)
 {
     _dataSource      = matrixData;
     _dataColumnRange = columnRange;
     _dataRowRange    = rowRange;
 }
コード例 #2
0
 /// <summary>Instantiates a generic matrix populated with the elements of the provided elementArray</summary>
 /// <param name="elementArray">Initial matrix values (encoded row-first)</param>
 public MatrixBase(T[,] elementArray)
 {
     _dataSource      = new MatrixDataSource <T>(elementArray);
     _dataRowRange    = new Int32Range(0, _dataSource.RowCount);
     _dataColumnRange = new Int32Range(0, _dataSource.ColumnCount);
 }
コード例 #3
0
 /// <summary>Instatiates a generic matrix with the provided matrix data source (all columns and rows)</summary>
 /// <param name="matrixData">Matrix data source</param>
 public MatrixBase(MatrixDataSource <T> matrixData)
 {
     _dataSource      = matrixData;
     _dataRowRange    = new Int32Range(0, matrixData.RowCount);
     _dataColumnRange = new Int32Range(0, matrixData.ColumnCount);
 }
コード例 #4
0
 /// <summary>Instatiates a generic matrix of the specified dimensions (columns x rows) with a new underlying matrix data source</summary>
 /// <param name="columns">Number of columns in the matrix</param>
 /// <param name="rows">Number of rows in the matrix</param>
 public MatrixBase(Int32 columns, Int32 rows)
 {
     _dataSource      = new MatrixDataSource <T>(columns, rows);
     _dataRowRange    = new Int32Range(0, _dataSource.RowCount);
     _dataColumnRange = new Int32Range(0, _dataSource.ColumnCount);
 }