checks whether the graph has any undirected edges

This method is intentionally not named "isUndirected()",
because that might be misleading in regards to empty and/or mixed graphs.

@return boolean
194412
public function hasUndirected()
    {
        foreach ($this->set->getEdges() as $edge) {
            if ($edge instanceof EdgeUndirected) {
                return true;
            }
        }

        return false;
    }
489196
public function isActive()
    {
        if (($page = Director::get_current_page()) && $page instanceof Page) {
            
            $ids = $this->Pages()->column('ID');
            
            if (!$this->isInherited()) {
                return in_array($page->ID, $ids);
            }
            
            return !empty(array_intersect($ids, $page->getAncestors(true)->column('ID')));
            
        }
        
        return false;
    }
997461
public String graphVizExport() {
		boolean directed = isDirected();
		String arc = directed ? " -> " : " -- ";
		StringBuilder sb = new StringBuilder();
		sb.append(directed ? "digraph " : "graph ").append(getName() + "{\n");
		sb.append("node [color = red, fontcolor=red]; ");
		for (int i : getMandatoryNodes()) sb.append(i + " ");
		sb.append(";\n");
		for (int i : getMandatoryNodes()) {
			for (int j : getMandSuccOrNeighOf(i)) {
				if (directed || i < j) sb.append(i + arc + j + " [color=red] ;\n");
			}
		}
		if (getMandatoryNodes().size() < getPotentialNodes().size()) {
			sb.append("node [color = black, fontcolor=black]; ");
			for (int i : getPotentialNodes()) if (!getMandatoryNodes().contains(i)) sb.append(i + " ");
			sb.append(";\n");
		}
		for (int i : getPotentialNodes()) {
			for (int j : getPotSuccOrNeighOf(i)) {
				if ((directed || i < j) && !getMandSuccOrNeighOf(i).contains(j)) sb.append(i + arc + j + " ;\n");
			}
		}
		sb.append("}");
		return sb.toString();
	}
21002
public function hasSingleChildBlockElement()
    {
        $result = false;
        if ($this->hasChildNodes()) {
            foreach ($this->getChildren() as $child) {
                if (in_array($child->nodeName, $this->divToPElements)) {
                    $result = true;
                } else {
                    // If any of the hasSingleChildBlockElement calls return true, return true then.
                    /** @var $child DOMElement */
                    $result = ($result || $child->hasSingleChildBlockElement());
                }
            }
        }

        return $result;
    }
1246141
public function getVertices()
    {
        $stack = array(); // visited nodes with unvisited children
        $visited = array();
        $output = array();

        /** @var Vertex $top */
        // TODO: avoid having to reverse all vertices multiple times
        // pick a node to examine next - assume there are isolated nodes
        foreach (array_reverse($this->graph->getVertices()->getVector()) as $top) {
            $tid = $top->getId();
            if (!isset($visited[$tid])) { // don't examine if already found
                array_push($stack, $top);
            }

            while ($stack) {
                /** @var Vertex $current */
                $node = end($stack);
                $nid = $node->getId();

                $visited[$nid] = false; // temporary mark
                $found = false; // new children found during visit to this node

                // find the next node to visit
                /** @var Vertex $child */
                foreach (array_reverse($node->getVerticesEdgeTo()->getVector()) as $child) {
                    $cid = $child->getId();
                    if (!isset($visited[$cid])) {
                        // found a new node - push it onto the stack
                        array_push($stack, $child);
                        $found = true; // move onto the new node
                        break;
                    } else if ($visited[$cid] === false) {
                        // temporary mark => not a DAG
                        throw new UnexpectedValueException('Not a DAG');
                    }
                }

                if (!$found) {
                    array_pop($stack); // no new children found - we're done with this node
                    $visited[$nid] = true; // mark as visited
                    array_push($output, $node); // add to results
                }
            }
        }

        return new Vertices(array_reverse($output, true));
    }
112237
public function isIgnoredRoute() {
        if ($this->ignoreRoute === null) {
            $this->ignoreRoute = ($this->route = $this->routes->matchIgnore($this)) !== null;
        }

        return $this->ignoreRoute;
    }
537540
public function isCurrent()
    {
        if (null === $this->isCurrent)
        {
            $this->isCurrent = $this->isMatchingRouteName() && $this->isMatchingRequestVariables();
        }

        return $this->isCurrent;
    }
1130374
public function isValid()
    {
        $vertices = $this->getGraph()->getVertices()->getMap();
        // check source graph contains all vertices
        foreach ($this->getVertices()->getMap() as $vid => $vertex) {
            // make sure vertex ID exists and has not been replaced
            if (!isset($vertices[$vid]) || $vertices[$vid] !== $vertex) {
                return false;
            }
        }
        $edges = $this->getGraph()->getEdges()->getVector();
        // check source graph contains all edges
        foreach ($this->edges as $edge) {
            if (!in_array($edge, $edges, true)) {
                return false;
            }
        }

        return true;
    }
382506
protected function isNextLineIndented()
  {
    $currentIndentation = $this->getCurrentLineIndentation();
    $notEOF = $this->moveToNextLine();

    while ($notEOF && $this->isCurrentLineEmpty()) {
      $notEOF = $this->moveToNextLine();
    }

    if (false === $notEOF) {
      return false;
    }

    $ret = false;
    if ($this->getCurrentLineIndentation() <= $currentIndentation) {
      $ret = true;
    }

    $this->moveToPreviousLine();

    return $ret;
  }
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;
    }
695407
public boolean isVertexIgnored(Object vertex) {
    return super.isVertexIgnored(vertex) || graph.isSwimlane(vertex) || graph.getModel().getGeometry(vertex).isRelative() || graph.getConnections(vertex).length == 0;
  }
1137791
public static function isNewline() {
    static $callback = NULL;
    if (!$callback) {
      $callback = function (Node $node) {
        return $node instanceof WhitespaceNode && $node->getNewlineCount() > 0;
      };
    }
    return $callback;
  }
852639
public function isUnsigned()
    {
        $flags = $this->parameters->get('flags');
        if (is_array($flags)) {
            return array_key_exists('UNSIGNED', array_flip($flags));
        }
        return false;
    }
1078915
public function isMultiValued() {
    if ($this->isMultiValued == null) {
      $maxMultiplicity = $this->getOtherMaxMultiplicity();
      $this->isMultiValued = ($maxMultiplicity > 1 || $maxMultiplicity == 'unbounded');
    }
    return $this->isMultiValued;
  }
1319448
public boolean hasBorders() {
		switch (border) {
			case UNDEFINED:
			case NO_BORDER:
				return false;
			default:
				return borderWidth > 0 || borderWidthLeft > 0
						|| borderWidthRight > 0 || borderWidthTop > 0 || borderWidthBottom > 0;
		}
	}
705597
public function isEmpty()
    {
        return $this->y === 0 && $this->m === 0 && $this->d === 0 && $this->h === 0 && $this->i === 0 && $this->s === 0;
    }
915670
public boolean hasOutEdges() {
		final Set<ODocument> docs = document.field(OGraphDatabase.VERTEX_FIELD_OUT);
		return docs != null && !docs.isEmpty();
	}