@@ -0,0 +1,1462 @@
+/*%0A* Copyright (c) 2015, Cloudera and Intel, Inc. All Rights Reserved.%0A*%0A* Cloudera, Inc. licenses this file to you under the Apache License,%0A* Version 2.0 (the %22License%22). You may not use this file except in%0A* compliance with the License. You may obtain a copy of the License at%0A*%0A* http://www.apache.org/licenses/LICENSE-2.0%0A*%0A* This software is distributed on an %22AS IS%22 BASIS, WITHOUT WARRANTIES OR%0A* CONDITIONS OF ANY KIND, either express or implied. See the License for%0A* the specific language governing permissions and limitations under the%0A* License.%0A*/%0A%0Apackage com.cloudera.oryx.app.speed.kmeans;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0A%0Aimport org.junit.Test;%0A%0Aimport com.cloudera.oryx.app.kmeans.ClusterInfo;%0Aimport com.cloudera.oryx.common.OryxTest;%0A%0Apublic final class KMeansSpeedModelTest extends OryxTest %7B%0A%0A  @Test%0A  public void update() %7B%0A    List%3CClusterInfo%3E clusters = new ArrayList%3C%3E();%0A    clusters.add(new ClusterInfo(0, new double%5B%5D%7B-1.0, 2.0%7D, 2));%0A    clusters.add(new ClusterInfo(1, new double%5B%5D%7B1.0, 3.0%7D, 3));%0A    clusters.add(new ClusterInfo(2, new double%5B%5D%7B2.0, -1.0%7D, 4));%0A%0A    KMeansSpeedModel model = new KMeansSpeedModel(clusters);%0A    ClusterInfo cluster = model.getCluster(1);%0A    cluster.update(new double%5B%5D%7B-1.0,-1.0%7D, 3);%0A    cluster = model.getCluster(1);%0A%0A    assertEquals(1, cluster.getID());%0A    assertEquals(6, cluster.getCount());%0A    assertArrayEquals(new double%5B%5D%7B0.0,1.0%7D, cluster.getCenter());%0A  %7D%0A%7D

Add KMeansSpeedModelTest