class AbstractVector implements Vector {

    @Override public Vector assign(double val) {
        if (sto.isArrayBased()) {
            ensureReadOnly();

            Arrays.fill(sto.data(), val);
        }
        else {
            int len = size();

            for (int i = 0; i < len; i++)
                storageSet(i, val);
        }

        return this;
    }

    public  AbstractVector(VectorStorage sto);
    public  AbstractVector(boolean readOnly, VectorStorage sto);
    public  AbstractVector();

}