class FastDistance implements ContinuousDistance {

    public List<FastDistanceData> prepareMatrixData(Iterable<Row> rows, int vectorIdx, int... keepIdxs) {
        Iterable<Tuple2<Vector, Row>> newItearble = Iterables.transform(rows, (row) -> {
            Vector vec = VectorUtil.getVector(row.getField(vectorIdx));
            row = TableUtil.getRow(row, keepIdxs);
            return Tuple2.of(vec, row);
        });
        return prepareMatrixData(newItearble);
    }

}