本文整理了Java中org.apache.mahout.math.WeightedVector.clone()
方法的一些代码示例,展示了WeightedVector.clone()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WeightedVector.clone()
方法的具体详情如下:
包路径:org.apache.mahout.math.WeightedVector
类名称:WeightedVector
方法名:clone
暂无
代码示例来源:origin: apache/mahout
@Test
public void testOrdering() {
WeightedVector v1 = new WeightedVector(new DenseVector(new double[]{1, 2, 3}), 5.41, 31);
WeightedVector v2 = new WeightedVector(new DenseVector(new double[]{1, 2, 3}), 5.00, 31);
WeightedVector v3 = new WeightedVector(new DenseVector(new double[]{1, 3, 3}), 5.00, 31);
WeightedVector v4 = v1.clone();
WeightedVectorComparator comparator = new WeightedVectorComparator();
assertTrue(comparator.compare(v1, v2) > 0);
assertTrue(comparator.compare(v3, v1) < 0);
assertTrue(comparator.compare(v3, v2) > 0);
assertEquals(0, comparator.compare(v4, v1));
assertEquals(0, comparator.compare(v1, v1));
}
代码示例来源:origin: org.apache.mahout/mahout-mrlegacy
Centroid c_1 = new Centroid(datapoints.get(selected).clone());
c_1.setIndex(0);
代码示例来源:origin: org.apache.mahout/mahout-mr
Centroid c_1 = new Centroid(datapoints.get(selected).clone());
c_1.setIndex(0);
代码示例来源:origin: org.apache.mahout/mahout-core
Centroid c_1 = new Centroid(datapoints.get(selected).clone());
c_1.setIndex(0);
内容来源于网络,如有侵权,请联系作者删除!