checks whether this vertex is a source, i.e. its indegree is zero

@param Vertex $vertex
@return boolean
@uses Edge::hasVertexTarget()
@see self::getDegreeInVertex()
508459
public function isVertexSource(Vertex $vertex)
    {
        foreach ($vertex->getEdges() as $edge) {
            if ($edge->hasVertexTarget($vertex)) {
                return false;
            }
        }

        // reach this point: no edge to this vertex
        return true;
    }
218093
@Override
    public boolean doesCoordinateOverlapWithCommittedCoordinate(Coordinate coordinate) {
        return fixedRows.get(coordinate.row) || fixedVertices.contains(coordinate.match.vertex);
    }
353748
protected function calculatePotentials(VertexInterface $vertex)
    {
        $connections = $vertex->getConnections();
        $sorted = array_flip($connections);

        krsort($sorted);

        foreach ($connections as $id => $distance) {
            $v = $this->getGraph()->getVertex($id);
            $v->setPotential($vertex->getPotential() + $distance, $vertex);

            foreach ($this->getPaths() as $path) {
                $count = count($path);

                if ($path[$count - 1]->getId() === $vertex->getId()) {
                    $this->paths[] = array_merge($path, array($v));
                }
            }
        }

        $vertex->markPassed();

        // Get loop through the current node's nearest connections
        // to calculate their potentials.
        foreach ($sorted as $id) {
            $vertex = $this->getGraph()->getVertex($id);

            if (!$vertex->isPassed()) {
                $this->calculatePotentials($vertex);
            }
        }
    }
461818
def BooleanTake(input_vertex: vertex_constructor_param_types, index: Collection[int], label: Optional[str]=None) -> Vertex:
    
    return Boolean(context.jvm_view().BooleanTakeVertex, label, cast_to_vertex(input_vertex), cast_to_long_array(index))
695407
public boolean isVertexIgnored(Object vertex) {
    return super.isVertexIgnored(vertex) || graph.isSwimlane(vertex) || graph.getModel().getGeometry(vertex).isRelative() || graph.getConnections(vertex).length == 0;
  }
1142879
private void addEdgesForVertex(Vertex vertex)
    {
        ClassDescriptor cld = vertex.getEnvelope().getClassDescriptor();
        Iterator rdsIter = cld.getObjectReferenceDescriptors(true).iterator();
        while (rdsIter.hasNext())
        {
            ObjectReferenceDescriptor rds = (ObjectReferenceDescriptor) rdsIter.next();
            addObjectReferenceEdges(vertex, rds);
        }
        Iterator cdsIter = cld.getCollectionDescriptors(true).iterator();
        while (cdsIter.hasNext())
        {
            CollectionDescriptor cds = (CollectionDescriptor) cdsIter.next();
            addCollectionEdges(vertex, cds);
        }
    }
569964
@Override
    public Direction direction(Vertex vertex) {
        for (int i=0;i<getArity();i++) {
            if (it().getVertex(i).equals(vertex)) return EdgeDirection.fromPosition(i);
        }
        throw new IllegalArgumentException("Relation is not incident on vertex");
    }
1143276
public function isBalanced()
    {
        foreach ($this->graph->getVertices() as $vertex) {
            if ($this->getDegreeInVertex($vertex) !== $this->getDegreeOutVertex($vertex)) {
                return false;
            }
        }

        return true;
    }
794048
public function isTranslationAttribute($key)
    {
        if ($this->isSpecialAttribute($key))
        {
            return false;
        }

        // When there is no node type we exclude source attributes
        return $this->_isTranslationAttribute($key) ||
        (is_null($this->getNodeTypeName()) ? false : $this->isSourceAttribute($key));
    }
915670
public boolean hasOutEdges() {
		final Set<ODocument> docs = document.field(OGraphDatabase.VERTEX_FIELD_OUT);
		return docs != null && !docs.isEmpty();
	}
401685
@SuppressWarnings("unchecked")
    private Set<Integer> getPredecessors(Graph g, Integer vertex) {
        // The DirectedGraph cast seems to change the return type of the set
        // from Set<Integer> to just Set
        if (g instanceof DirectedGraph) {
            DirectedGraph<?> dg = (DirectedGraph)g;
            return dg.predecessors(vertex);
        }
        else {
            return g.getNeighbors(vertex);
        }
    }
934795
public function isTree()
    {
        try {
            $root = $this->getVertexRoot();
        }
        catch (UnderflowException $e) {
            return false;
        }
        catch (UnexpectedValueException $e) {
            return false;
        }

        try {
            $num = count($this->getVerticesSubtree($root));
        }
        catch (UnexpectedValueException $e) {
            return false;
        }

        // check number of vertices reachable from root should match total number of vertices
        return ($num === count($this->graph->getVertices()));
    }
1226295
public float getBitangentX(int vertex) {
        if (!hasTangentsAndBitangents()) {
            throw new IllegalStateException("mesh has no bitangents");
        }
        
        checkVertexIndexBounds(vertex);
        
        return m_bitangents.getFloat(vertex * 3 * SIZEOF_FLOAT);
    }
411122
function isActive(vertex, instance) {
    return vertex.parent ? isActive(vertex.parent.parent, instance) && instance.getLastKnownState(vertex.parent) === vertex : true;
}
578301
public function contains(Vertex $vertex)
	    {
	        if( $this->source == $vertex || 
	        	$this->target == $vertex)
	            return true;
	        return false;
	    }
333605
public float getTangentY(int vertex) {
        if (!hasTangentsAndBitangents()) {
            throw new IllegalStateException("mesh has no bitangents");
        }
        
        checkVertexIndexBounds(vertex);
        
        return m_tangents.getFloat((vertex * 3 + 1) * SIZEOF_FLOAT);
    }
416358
def is_causal_source(graph: BELGraph, node: BaseEntity) -> bool:
    
    # TODO reimplement to be faster
    return not has_causal_in_edges(graph, node) and has_causal_out_edges(graph, node)