call reduce_vertex on all vertices with identical values.
169318
def merge_vertices(self):
        """"""

        # groupby expects sorted data
        sorted_vertices = sorted(list(self.vertices.items()), key=lambda v: hash(v[1]))
        groups = []
        for k, g in groupby(sorted_vertices, lambda v: hash(v[1])):
            groups.append(list(g))
        for group in groups:
            if len(group) == 1:
                continue
            names = [v[0] for v in group]
            self.reduce_vertex(*names)
1062729
def trimesh(self):
        
        # Generate vertices
        xs = self.interface.coords(self, 0, edges=True)
        ys = self.interface.coords(self, 1, edges=True)

        if xs.ndim == 1:
            if np.all(xs[1:] < xs[:-1]):
                xs = xs[::-1]
            if np.all(ys[1:] < ys[:-1]):
                ys = ys[::-1]
            xs, ys = (np.tile(xs[:, np.newaxis], len(ys)).T,
                      np.tile(ys[:, np.newaxis], len(xs)))
        vertices = (xs.T.flatten(), ys.T.flatten())

        # Generate triangle simplexes
        shape = self.dimension_values(2, flat=False).shape
        s0 = shape[0]
        t1 = np.arange(np.product(shape))
        js = (t1//s0)
        t1s = js*(s0+1)+t1%s0
        t2s = t1s+1
        t3s = (js+1)*(s0+1)+t1%s0
        t4s = t2s
        t5s = t3s
        t6s = t3s+1
        t1 = np.concatenate([t1s, t6s])
        t2 = np.concatenate([t2s, t5s])
        t3 = np.concatenate([t3s, t4s])
        ts = (t1, t2, t3)
        for vd in self.vdims:
            zs = self.dimension_values(vd)
            ts = ts + (np.concatenate([zs, zs]),)

        # Construct TriMesh
        params = util.get_param_values(self)
        params['kdims'] = params['kdims'] + TriMesh.node_type.kdims[2:]
        nodes = TriMesh.node_type(vertices+(np.arange(len(vertices[0])),),
                                  **{k: v for k, v in params.items()
                                     if k != 'vdims'})
        return TriMesh(((ts,), nodes), **{k: v for k, v in params.items()
                                          if k != 'kdims'})
1308162
def vertex_normals(self, values):
        
        if values is not None:
            values = np.asanyarray(values,
                                   order='C',
                                   dtype=np.float64)
            if values.shape == self.vertices.shape:
                self._cache['vertex_normals'] = values
1085646
def make_subgraph(graph, vertices, edges):
    """"""
    # Copy the entire graph
    local_graph = copy.deepcopy(graph)

    # Remove all the edges that aren't in the list
    edges_to_delete = [x for x in local_graph.get_all_edge_ids() if x not in edges]
    for e in edges_to_delete:
        local_graph.delete_edge_by_id(e)

    # Remove all the vertices that aren't in the list
    nodes_to_delete = [x for x in local_graph.get_all_node_ids() if x not in vertices]
    for n in nodes_to_delete:
        local_graph.delete_node(n)

    return local_graph
92772
private Vertex interpolate(Vertex start, Vertex end, double t)
	{
		double x = interpolate(start.getX(), end.getX(), t);
		double y = interpolate(start.getY(), end.getY(), t);
		double z = interpolate(start.getZ(), end.getZ(), t);

		return new Vertex(x, y, z);
	}
1346375
def Sum(input_vertex: vertex_constructor_param_types, label: Optional[str]=None) -> Vertex:
    
    return Double(context.jvm_view().SumVertex, label, cast_to_double_vertex(input_vertex))
575914
def reduce_max(x,
               disable_positional_args=None,
               output_shape=None,
               reduced_dim=None,
               name=None):
  
  output_shape = convert_to_shape(output_shape)
  reduced_dim = convert_to_dimension(reduced_dim)
  assert disable_positional_args is None
  output_shape = _reduction_output_shape(x, output_shape, reduced_dim)
  if output_shape is None:
    output_shape = Shape([])
  if output_shape == x.shape:
    return x
  return ReduceOperation(
      x, output_shape, "MAX", name=name or "reduce_max").outputs[0]
113304
function reduce(options, params, location, program) {
    return options.every? new reduce_every(options, params, location, program) : new reduce_batch(options, params, location, program);
}
852159
def update_all(self):
        
        self.update_points()
        self.update_vertex_list()
        self.update_anchor()

        pyglet.gl.glLoadIdentity()  # reset gl
        pyglet.gl.glLineWidth(self.line_width)
        pyglet.gl.glPointSize(self.point_size)
        self.transform.update_gl()

        # handle shapes click envets
        all_shapes.discard(self)
        if(self._press != None):
            all_shapes.add(self)
448741
def vertices
      verts = Array.new(8)
      length_ary = self.length
      verts[0] = @min_point.clone
      verts[1] = @min_point + Vector3.new(length_ary[0],             0,            0 )
      verts[2] = @min_point + Vector3.new(length_ary[0], length_ary[1],            0 )
      verts[3] = @min_point + Vector3.new(            0, length_ary[1],            0 )
      verts[4] = @min_point + Vector3.new(            0,             0, length_ary[2])
      verts[5] = @min_point + Vector3.new(length_ary[0],             0, length_ary[2])
      verts[6] = @min_point + Vector3.new(length_ary[0], length_ary[1], length_ary[2])
      verts[7] = @min_point + Vector3.new(            0, length_ary[1], length_ary[2])
      return verts
    end
1218676
def add_vertex(self, x, y, z, name):
        
        self.vertices[name] = Vertex(x, y, z, name)
        return self.vertices[name]
953258
def all_equal(keys, axis=semantics.axis_default):
    """"""
    index = as_index(keys, axis)
    return index.groups == 1
799772
private Iterator<JanusGraphVertex> verticesWithProperty(JanusGraphTransaction tx, Object value) {
        return tx.query().has(propertyKey, value).vertices().iterator();
    }
1068598
def color_reducer(c1, c2):
    """"""
    return tuple(v1 + v2 for v1, v2 in itertools.izip(c1, c2))
895162
def finalise_same_chip_constraints(substitutions, placements):
    
    for merged_vertex in reversed(substitutions):
        placement = placements.pop(merged_vertex)
        for v in merged_vertex.vertices:
            placements[v] = placement
1013332
def order_vertices(self):
        """"""
        
        ordered = False
        while ordered == False:
            for i in range(len(self.vertices)):
                ordered = True
                for parent in self.vertices[i].parents:
                    if parent>i:
                        ordered = False
                        self.swap_vertices(i, parent)
1334447
def update_vertices(self, mask):
        
        if self.uv is not None:
            self.uv = self.uv[mask]