Skip to content
Snippets Groups Projects
Commit e6202dae authored by SAHIN Melis damla's avatar SAHIN Melis damla
Browse files

Compléter la classe SubMatrixInitializer

parent fa0f3ca7
No related branches found
No related tags found
No related merge requests found
package matrix;
public class SubMatrixInitializer <T> implements MatrixInitializer<T> {
// Matrix, corner
private final Matrix<T> matrix;
private final Coordinate corner;
public SubMatrixInitializer(Matrix<T> matrix, Coordinate corner) {
this.matrix = matrix;
this.corner = corner;
}
@Override
public T initialValueAt(Coordinate coordinate) {
return matrix.get(coordinate.x()+corner.x(), coordinate.y()+corner.y());
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment