interface Matrix { public int getWidth(); public int getHeight(); public A get(int x, int y); public void set(int x, int y, A a); default int nCells() { ret getWidth()*getHeight(); } }