本文整理汇总了Java中org.apache.giraph.graph.BasicComputation类的典型用法代码示例。如果您正苦于以下问题:Java BasicComputation类的具体用法?Java BasicComputation怎么用?Java BasicComputation使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
BasicComputation类属于org.apache.giraph.graph包,在下文中一共展示了BasicComputation类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setUp
import org.apache.giraph.graph.BasicComputation; //导入依赖的package包/类
@Before
public void setUp() throws IOException, InterruptedException {
rr = mock(RecordReader.class);
GiraphConfiguration giraphConf = new GiraphConfiguration();
giraphConf.setComputationClass(BasicComputation.class);
giraphConf.set(DGALongEdgeValueInputFormat.LINE_TOKENIZE_VALUE, ",");
conf = new ImmutableClassesGiraphConfiguration<Text, Text, Text>(giraphConf);
tac = mock(TaskAttemptContext.class);
when(tac.getConfiguration()).thenReturn(conf);
}
示例2: setUp
import org.apache.giraph.graph.BasicComputation; //导入依赖的package包/类
@Before
public void setUp() throws Exception {
tw = mock(RecordWriter.class);
GiraphConfiguration giraphConfiguration = new GiraphConfiguration();
giraphConfiguration.setComputationClass(BasicComputation.class);
conf = new ImmutableClassesGiraphConfiguration<Text, VertexData, Text>(giraphConfiguration);
vertex = mock(Vertex.class);
vertex2 = mock(Vertex.class);
when(vertex.getId()).thenReturn(new Text("1"));
when(vertex.getValue()).thenReturn(new VertexData());
when(vertex2.getId()).thenReturn(new Text("2"));
vertexData = new VertexData();
vertexData.setApproxBetweenness(1.0);
when(vertex2.getValue()).thenReturn(vertexData);
}
示例3: testInferTypeParams
import org.apache.giraph.graph.BasicComputation; //导入依赖的package包/类
@Test
public void testInferTypeParams() {
checkTypes(TypesHolder.class, IntTypes.class, 5);
checkTypes(TypesHolder.class, IntComputation.class, 5);
checkTypes(Computation.class, IntComputation.class, 5);
checkTypes(TypesHolder.class, IntBasicComputation.class, 5);
checkTypes(Computation.class, IntBasicComputation.class, 5);
checkTypes(BasicComputation.class, IntBasicComputation.class, 4);
}