Copy paste Vector prototype

It does a cached mean on a Vector.
We want a cached solve on a Matrix.