@Override
        public Builder cell(Cell cell, double value) {
            long directIndex = cell.getDirectIndex();
            if (directIndex >= 0) // optimization
                values[(int)directIndex] = value;
            else
                super.cell(cell, value);
            return this;
        }
A bound builder can create the double array directly
vespajlib/src/main/java/com/yahoo/tensor/IndexedDoubleTensor.java