コード例 #1
0
 /// <inheritdoc/>
 public new T walkInColumnOrder(FieldMatrixPreservingVisitor <T> visitor, int startRow, int endRow, int startColumn, int endColumn)
 {
     checkSubMatrixIndex(startRow, endRow, startColumn, endColumn);
     visitor.start(getRowDimension(), getColumnDimension(),
                   startRow, endRow, startColumn, endColumn);
     for (int j = startColumn; j <= endColumn; ++j)
     {
         for (int i = startRow; i <= endRow; ++i)
         {
             visitor.visit(i, j, data[i][j]);
         }
     }
     return(visitor.end());
 }
コード例 #2
0
 /// <inheritdoc/>
 public T walkInRowOrder(FieldMatrixPreservingVisitor <T> visitor, int startRow, int endRow, int startColumn, int endColumn)
 {
     checkSubMatrixIndex(startRow, endRow, startColumn, endColumn);
     visitor.start(getRowDimension(), getColumnDimension(),
                   startRow, endRow, startColumn, endColumn);
     for (int row = startRow; row <= endRow; ++row)
     {
         for (int column = startColumn; column <= endColumn; ++column)
         {
             visitor.visit(row, column, getEntry(row, column));
         }
     }
     return(visitor.end());
 }
コード例 #3
0
        /// <inheritdoc/>
        public new T walkInColumnOrder(FieldMatrixPreservingVisitor <T> visitor)
        {
            int rows    = getRowDimension();
            int columns = getColumnDimension();

            visitor.start(rows, columns, 0, rows - 1, 0, columns - 1);
            for (int j = 0; j < columns; ++j)
            {
                for (int i = 0; i < rows; ++i)
                {
                    visitor.visit(i, j, data[i][j]);
                }
            }
            return(visitor.end());
        }
コード例 #4
0
        /// <inheritdoc/>
        public T walkInColumnOrder(FieldMatrixPreservingVisitor <T> visitor)
        {
            int rows    = getRowDimension();
            int columns = getColumnDimension();

            visitor.start(rows, columns, 0, rows - 1, 0, columns - 1);
            for (int column = 0; column < columns; ++column)
            {
                for (int row = 0; row < rows; ++row)
                {
                    visitor.visit(row, column, getEntry(row, column));
                }
            }
            return(visitor.end());
        }
コード例 #5
0
 /// <inheritdoc/>
 public T walkInOptimizedOrder(FieldMatrixPreservingVisitor <T> visitor, int startRow, int endRow, int startColumn, int endColumn)
 {
     return(walkInRowOrder(visitor, startRow, endRow, startColumn, endColumn));
 }
コード例 #6
0
 /// <inheritdoc/>
 public T walkInOptimizedOrder(FieldMatrixPreservingVisitor <T> visitor)
 {
     return(walkInRowOrder(visitor));
 }