get indegree of this vertex (number of edges TO this vertex)

@param Vertex $vertex
@return int
@uses Edge::hasVertexTarget()
@see self::getDegreeVertex()
975594
public function getDegreeInVertex($vertex)
    {
        $n = 0;
        foreach ($vertex->getEdges() as $edge) {
            if ($edge->hasVertexTarget($vertex)) {
                ++$n;
            }
        }

        return $n;
    }
1346635
public int compareTo(final Vertex<T> o)
    {
        int orderInd;

        if (m_order < o.m_order)
        {
            orderInd = -1;
        }
        else if (m_order > o.m_order)
        {
            orderInd = 1;
        }
        else
        {
            orderInd = 0;
        }

        return orderInd;
    }
829169
def getVertex(self, _id):
        """"""
        try:
            node = self.neograph.nodes.get(_id)
        except client.NotFoundError:
            return None
        return Vertex(node)
1038770
def get_irregular_vertex(bgedge):
    
    if not bgedge.is_irregular_edge:
        raise Exception("trying to retrieve an irregular vertex from regular edge")
    return bgedge.vertex1 if bgedge.vertex1.is_irregular_vertex else bgedge.vertex2
590563
public Model deleteVertex(Vertex vertex) {
    edges.removeIf(edge -> vertex.equals(edge.getSourceVertex()) || vertex.equals(edge.getTargetVertex()));
    vertices.remove(vertex);
    return this;
  }
578301
public function contains(Vertex $vertex)
	    {
	        if( $this->source == $vertex || 
	        	$this->target == $vertex)
	            return true;
	        return false;
	    }
957826
def degree(self, vertex):
        
        try:
            return len(self.vertices[vertex])
        except KeyError:
            raise GraphInsertError("Vertex %s doesn't exist." % (vertex,))
457800
public function isOnSameLine(Vertex $vertex) {
        if (is_null($this->getGradient()) && is_null($vertex->getGradient()) && $this->from->getLongitude() == $vertex->getFrom()->getLongitude()) {
            return true;
        } elseif (!is_null($this->getGradient()) && !is_null($vertex->getGradient())) {
            return (
                bccomp($this->getGradient(), $vertex->getGradient(), $this->getPrecision()) === 0
                &&
                bccomp($this->getOrdinateIntercept(), $vertex->getOrdinateIntercept(), $this->getPrecision()) ===0
            );
        } else {
            return false;
        }
    }
881494
def getOutEdges(self, vertex, rawResults = False) :
        """"""
        return self.getEdges(vertex, inEdges = False, outEdges = True, rawResults = rawResults)
1053316
public Graph<K, VV, EV> addVertex(final Vertex<K, VV> vertex) {
		List<Vertex<K, VV>> newVertex = new ArrayList<>();
		newVertex.add(vertex);

		return addVertices(newVertex);
	}
875697
public function getDegree()
    {
        $max = null;
        foreach ($this->graph->getVertices() as $vertex) {
            $num = count($this->getVerticesChildren($vertex));
            if ($max === null || $num > $max) {
                $max = $num;
            }
        }
        if ($max === null) {
            throw new UnderflowException('No vertices found');
        }
        return $max;
    }
311596
public float getTangentZ(int vertex) {
        if (!hasTangentsAndBitangents()) {
            throw new IllegalStateException("mesh has no tangents");
        }
        
        checkVertexIndexBounds(vertex);
        
        return m_tangents.getFloat((vertex * 3 + 2) * SIZEOF_FLOAT);
    }
474170
private function getSingleUndirectedRelation()
    {
        $ed = $this->getEdgeDefinitions();
        if (count($ed) > 0) {
            $a = $ed[0];
            $b = $a->getFromCollections();
            $c = $a->getToCollections();
        }
        if (count($ed) > 1 ||
            (
                count($ed) === 1 && (
                    count($a->getFromCollections()) > 1 ||
                    count($a->getToCollections()) > 1 ||
                    $b[0] !== $c[0]

                )
            )
        ) {
            throw new ClientException('This operation only supports graphs with one undirected single collection relation');
        }
        if (count($ed) === 1) {
            $eD                     = $ed[0];
            $this->_edgeDefinitions = [];
        } else {
            $eD = new EdgeDefinition();
        }

        return $eD;
    }
488396
def remove_vertex(vertex)
      @vertices[vertex].each do |edge|
        remove_edge(edge) if edge.include?(vertex)
      end
      delete_vertex(vertex)
      callback(vertex, :removed_from_graph, self)
    end
539953
public function getDegree()
    {

        if (!is_a($this->nodeGraph, Graph::class)):
            throw new \Exception("Unkown node parent graph. Cannot calculate InDegree of NODE:" . $this->getId(), PLATFORM_ERROR); //Unkonwn graph type;
        endif;

        $incidence = 0;
        $graph = $this->getGraph();
        $edges = $graph->getEdgeSet();

        //If this graph is undirected, then we can't calculate the  indegree to this node;
        if (empty($edges))
            return $incidence;

        //search for all arcs with this node as tail
        foreach ($edges as $edge):
            if ($edge->getTail()->getId() == $this->getId()) {
                $incidence++;
                //if head is the same as self, as is the case in cycled edges then we have one more indegree,
                //looped vertices have an indegree of two;
                if ($edge->getHead()->getId() == $this->getId())
                    $incidence++;
            } elseif ($edge->getHead()->getId() == $this->getId()) {
                //Cover for cycles
                if ($edge->getHead()->getId() == $this->getId())
                    $incidence++;
            }
        endforeach;

        return $incidence;
    }
204479
def add_vertex(self, v):
        
        if v not in self.adjacency:
            self.adjacency[v] = Vertex(v)
        return self.adjacency[v].vertex
1289204
def IntegerTake(input_vertex: vertex_constructor_param_types, index: Collection[int], label: Optional[str]=None) -> Vertex:
    
    return Integer(context.jvm_view().IntegerTakeVertex, label, cast_to_integer_vertex(input_vertex), cast_to_long_array(index))