Add midpoints to any segment connected to the vertices in the
        list / array provided.
766292
def segment_midpoints_by_vertices(self, vertices):
        

        segments = set()

        for vertex in vertices:
            neighbours = self.identify_vertex_neighbours(vertex)
            segments.update( min( tuple((vertex, n1)), tuple((n1, vertex))) for n1 in neighbours )

        segs = np.array(list(segments))

        new_midpoint_lonlats = self.segment_midpoints(segments=segs)

        return new_midpoint_lonlats
515340
public static final Point add(Point... points)
    {
        AbstractPoint res = new AbstractPoint();
        for (Point pp : points)
        {
            res.x += pp.getX();
            res.y += pp.getY();
        }
        return res;
    }
695404
def add_edges(self, edges, *args, **kwargs):
        
        for edge in edges:
            self.add_edge(edge, *args, **kwargs)
685600
private static <T> void addDependencies(final Vertex<T> vertex, final List<Vertex<T>> vertices)
    {
        if (!vertices.contains(vertex))
        {
            vertices.add(vertex);

            for (Vertex<T> v : vertex.getDependencies())
            {
                addDependencies(v, vertices);
            }
        }
    }
495960
public void addPoint(double x, double y)
    {
        if (npoints >= xpoints.length)
        {
            final int newLength = npoints * 2;
            xpoints = Arrays.copyOf(xpoints, newLength);
            ypoints = Arrays.copyOf(ypoints, newLength);
        }
        xpoints[npoints] = x;
        ypoints[npoints] = y;
        npoints++;
        updateBounds();
    }
706769
def add_set_of_points(self, points):
        
        self.set_of_points = np.concatenate((self.set_of_points, points))
775648
def add_edge(self, fr, to):
        
        if fr not in set(self.graph.vs):  # ToDo: find out why item can be in set but not dict
            raise ValueError('can not connect unknown vertices in n-partite graphs, {!r} missing'.format(fr))
        elif to not in set(self.graph.vs):
            raise ValueError('can not connect unknown vertices in n-partite graphs, {!r} missing'.format(to))
        self.graph.add_edge(fr, to)
661915
private void expand(final Vector3f... vertices) {
        mVertices = appendArrays(mVertices, vertices);

        if (vertices != null) {
            for (Vector3f vertex : vertices) {
                mMinCorner.min(vertex);
                mMaxCorner.max(vertex);

                Vector3f temp = new Vector3f(mMinCorner);
                mCenter = new Vector3f(mMinCorner.x + (mMaxCorner.x - mMinCorner.x) * .5f,
                        mMinCorner.y + (mMaxCorner.y - mMinCorner.y) * .5f,
                        mMinCorner.z + (mMaxCorner.z - mMinCorner.z) * .5f);
                temp.set(mMaxCorner);
                mRadius = temp.sub(mMinCorner).length() * .5f;
            }
        }
    }
104683
private void addPoint(Point point, Collidable collidable)
    {
        final Integer group = collidable.getGroup();
        if (!collidables.containsKey(group))
        {
            collidables.put(group, new HashMap<Point, Set<Collidable>>());
        }
        final Map<Point, Set<Collidable>> elements = collidables.get(group);
        if (!elements.containsKey(point))
        {
            elements.put(point, new HashSet<Collidable>());
        }
        elements.get(point).add(collidable);
    }
193327
def points(self):
        ''''''
        # add all points in a section except the first one, which is a duplicate
        _pts = [v for s in self.root_node.ipreorder()
                for v in s.points[1:, COLS.XYZR]]
        # except for the very first point, which is not a duplicate
        _pts.insert(0, self.root_node.points[0][COLS.XYZR])
        return np.array(_pts)
250868
public static ArrayList<Point2> getPoints(int startX, int startY, int endX, int endY) {
    final ArrayList<Point2> result = new ArrayList<Point2>();
    for (int y = startY; y < endY; y++) {
      for (int x = startX; x < endX; x++) {
        result.add(new Point2(x, y));
      }
    }
    return result;
  }
292422
function buildSegmentRows(segments) {
		var rowCnt = getRowCnt();
		var segmentRows = [];
		var segmentI;
		var segment;
		var rowI;

		// group segments by row
		for (segmentI=0; segmentI<segments.length; segmentI++) {
			segment = segments[segmentI];
			rowI = segment.row;
			if (segment.element) { // was rendered?
				if (segmentRows[rowI]) {
					// already other segments. append to array
					segmentRows[rowI].push(segment);
				}
				else {
					// first segment in row. create new array
					segmentRows[rowI] = [ segment ];
				}
			}
		}

		// sort each row
		for (rowI=0; rowI<rowCnt; rowI++) {
			segmentRows[rowI] = sortSegmentRow(
				segmentRows[rowI] || [] // guarantee an array, even if no segments
			);
		}

		return segmentRows;
	}
302647
def _prepPointsForSegments(points):
    
    while 1:
        point = points[-1]
        if point.segmentType:
            break
        else:
            point = points.pop()
            points.insert(0, point)
            continue
        break
1320366
def segments (self):
    """"""
    for n in xrange(len(self.vertices) - 1):
      yield Line(self.vertices[n], self.vertices[n + 1])

    yield Line(self.vertices[-1], self.vertices[0])
1310384
def fixed_point(points, cells, *args, **kwargs):
    

    def get_new_points(mesh):
        # move interior points into average of their neighbors
        num_neighbors = numpy.zeros(len(mesh.node_coords), dtype=int)
        idx = mesh.edges["nodes"]
        fastfunc.add.at(num_neighbors, idx, numpy.ones(idx.shape, dtype=int))

        new_points = numpy.zeros(mesh.node_coords.shape)
        fastfunc.add.at(new_points, idx[:, 0], mesh.node_coords[idx[:, 1]])
        fastfunc.add.at(new_points, idx[:, 1], mesh.node_coords[idx[:, 0]])

        new_points /= num_neighbors[:, None]
        idx = mesh.is_boundary_node
        new_points[idx] = mesh.node_coords[idx]
        return new_points

    mesh = MeshTri(points, cells)
    runner(get_new_points, mesh, *args, **kwargs)
    return mesh.node_coords, mesh.cells["nodes"]
1360341
private void addPoint(Vector2f pt) {
		if (holes == null) {
			Point p = getPoint(pt);
			contour.add(p);
		} else {
			Point p = getPoint(pt);
			holes.add(p);
		}
	}
140967
def multipointz(self, points):
        """"""
        shapeType = MULTIPOINTZ
        points = [points] # nest the points inside a list to be compatible with the generic shapeparts method
        self._shapeparts(parts=points, shapeType=shapeType)