class KMeansUtil implements Serializable {

    public static Vector getKMeansPredictVector(int[] colIdxs, Row row) {
        Vector vec;
        if (colIdxs.length > 1) {
            vec = new DenseVector(2);
            vec.set(0, ((Number)row.getField(colIdxs[0])).doubleValue());
            vec.set(1, ((Number)row.getField(colIdxs[1])).doubleValue());
        } else {
            vec = VectorUtil.getVector(row.getField(colIdxs[0]));
        }
        return vec;
    }

}