本文整理了Java中org.apache.tez.dag.api.Vertex.<init>()
方法的一些代码示例,展示了Vertex.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Vertex.<init>()
方法的具体详情如下:
包路径:org.apache.tez.dag.api.Vertex
类名称:Vertex
方法名:<init>
暂无
代码示例来源:origin: stackoverflow.com
shape = new Vertex (new float[]
});
texture = new Vertex (new float[]
代码示例来源:origin: stackoverflow.com
// create 8 vertexes for cube
private Vertex[] vertArray = new Vertex[8] {
new Vertex(50.0, 50.0, 0.0, 1.0),
new Vertex(150.0, 50.0, 0.0, 1.0),
new Vertex(150.0, 150.0, 0.0, 1.0),
new Vertex(50.0, 150.0, 0.0, 1.0),
new Vertex(50.0, 50.0, -100.0, 1.0),
new Vertex(150.0, 50.0, -100.0, 1.0),
new Vertex(150.0, 150.0, -100.0, 1.0),
new Vertex(50.0, 150.0, -100.0, 1.0)
};
代码示例来源:origin: stackoverflow.com
private Object addVertex(String label, int posX, int posY) {
Vertex newVertex = new Vertex();
this.getModel().beginUpdate();
try {
return insertVertex(parent, null, label, posX, posY, 80, 30);
}
finally {
this.getModel().endUpdate();
}
}
代码示例来源:origin: stackoverflow.com
String text_input[] = new String[num_lines_in_file];
// Read the text file and store inputs in above array...
// ...
Vertex nodes[] = new Vertex[text_input.length];
for(int i=0; i< nodes.length; i++){
nodes[i] = new Vertex(text_input[i]);
}
代码示例来源:origin: stackoverflow.com
Vertex vertices[2] = new Vertex[2];
vertices[0] = new Vertex();
vertices[1] = new Vertex();
代码示例来源:origin: stackoverflow.com
final Vertex a = new Vertex("a");
graph.computeIfAbsent(a, v -> new LinkedHashSet<>()).add(new Vertex("b"));
graph.computeIfAbsent(a, v -> new LinkedHashSet<>()).add(new Vertex("c"));
graph.computeIfAbsent(a, v -> new LinkedHashSet<>()).add(new Vertex("d"));
代码示例来源:origin: stackoverflow.com
Vertex v1 = new Vertex("a", 1);
Vertex v2 = new Vertex("b", 1);
代码示例来源:origin: stackoverflow.com
Map<Vertex, Set<Vertex>> m = new HashMap<>();
Set<Vertex> set = new HashSet<>();
set.add(new Vertex("b"));
set.add(new Vertex("c"));
set.add(new Vertex("d"));
m.add (new Vertex("a"), set);
代码示例来源:origin: org.apache.tez/tez-api
/**
* Create a new vertex with the given name. <br>
* The vertex task resource will be picked from configuration <br>
* The vertex parallelism will be inferred. If it cannot be inferred then an
* error will be reported. This constructor may be used for vertices that have
* data sources, or connected via 1-1 edges or have runtime parallelism
* estimation via data source initializers or vertex managers. Calling this
* constructor is equivalent to calling
* {@link Vertex#Vertex(String, ProcessorDescriptor, int)} with the
* parallelism set to -1.
*
* @param vertexName
* Name of the vertex
* @param processorDescriptor
* Description of the processor that is executed in every task of
* this vertex
* @return a new Vertex with the given parameters
*/
public static Vertex create(String vertexName, ProcessorDescriptor processorDescriptor) {
return new Vertex(vertexName, processorDescriptor);
}
代码示例来源:origin: stackoverflow.com
String[] names = {"v1", "v2", "v3"};
String[] constructorArgs = {"a", "b", "c"};
Map<String, Vertex> map = new HashMap<String, Vertex>();
for (int i = 0; i < names.length; i++)
{
map.put(names[i], new Vertex(constructorArgs[i]));
}
for (int i = 0; i < names.length; i++)
{
Vertex v = map.get(names[i]);
//do whatever you want with this vertex
}
代码示例来源:origin: stackoverflow.com
Vertex[] vertices = new Vertex[8];
for (int i = 0; i < 8; i++) {
vertices[i] = new Vertex();
}
vertices[0].adjacencies = new Edge[7];
for (int i = 1; i < 8; i++) {
vertices[0].adjacencies[i - 1] = new Edge(vertices[i], distance[0][i]);
}
代码示例来源:origin: stackoverflow.com
var vertex = new JavaAdapter(java.lang.Object, new Vertex(1, 10));
hm.put(vertex, 10);
代码示例来源:origin: stackoverflow.com
var g_vertices = [];
for( var i = 0; i < 50; i++ ) {
g_vertices.push( new Vertex( Math.random() * 350 + 25, Math.random() * 250 + 25 ) );
}
// var triangles = Triangulate( g_vertices );
// console.log(triangles);
console.log(g_vertices);
for (var i in g_vertices) {
console.log(i);
}
代码示例来源:origin: stackoverflow.com
Map<String, Vertex> testObjs = new HashMap<String, Vertex>();
for(int i = 0; i < k; i++)
testObjs.put("v" + String.valueOf(i), new Vertex(i));
// The names would be like v1, v2, etc.
// Access example
testObjs.get("v1").doVertexStuff();
代码示例来源:origin: stackoverflow.com
public Vertex getVertexByNumber(int number) {
Vertex answer;
for (Vertex v : vertices) {
if (v.getNumber() == number) {
answer = v;
break;
}
}
return answer == null ? new Vertex(number) : answer;
}
代码示例来源:origin: stackoverflow.com
public Vertex getVertexByNumber(int number) {
for (Vertex v : vertices) {
if (v.getNumber() == number) {
return v;
}
}
return new Vertex(number);
}
代码示例来源:origin: stackoverflow.com
LinkedHashMap<Integer, Integer> currentMap = new LinkedHashMap<Integer, Integer>();
while ( ... ) {
Vertex v = new Vertex(...);
v.setAdjacent(currentMap);
currentMap.clear();
}
代码示例来源:origin: stackoverflow.com
while ( ... ) {
LinkedHashMap<Integer, Integer> currentMap = new LinkedHashMap<Integer, Integer>();
Vertex v = new Vertex(...);
v.setAdjacent(currentMap);
}
代码示例来源:origin: stackoverflow.com
public EdgeWeightedGraph(In in) {
vertex = new ArrayList<Vertex>();
adj = (Bag<Edge>[]) new Bag[vertex.size()];
V = in.readInt();
E = in.readInt();
for (int j =0;j < V; j++){
int v = in.readInt();
double cost = in.readDouble();
Vertex u = new Vertex(v, cost);
vertex.add(u);
}
/* Snipped */
}
代码示例来源:origin: stackoverflow.com
boolean hc(Graph g){
if(!g.hp()) return false;
Vertex test = new Vertex();
for(Vertex v : g){
g.connect(test,v); //adds single edge between test and v
if(!g.hp()) return false;
g.disconnect(test,v); //removes any edges between test and v
}
//every test yielded a new graph with a Hamiltonian Path, therefore
//g must have a Hamiltonian Cycle:
return true;
}
内容来源于网络,如有侵权,请联系作者删除!