src/ADT/Graph/DirectedWeighted.php
public function getGrade( $source, $target )
	{
		if( $this->isEdge( $source, $target ) )
			return 1;
		$nodes = $this->getTargetNodes( $source );
		foreach( $nodes as $node )
		{
			$way = $this->getGrade( $node, $target );
			return ++$way;
		}
		return false;
	}
public function getGrade( $source, $target )
	{
		if( $this->isEdge( $source, $target ) )
			return 1;
		$nodes = $this->getTargetNodes( $source );
		foreach( $nodes as $node )
		{
			$way = $this->getGrade( $node, $target );
			return ++$way;
		}
		return false;
	}
public function getGrade ( $ source , $ target ) { if ( $ this -> isEdge ( $ source , $ target ) ) return 1 ; $ nodes = $ this -> getTargetNodes ( $ source ) ; foreach ( $ nodes as $ node ) { $ way = $ this -> getGrade ( $ node , $ target ) ; return ++ $ way ; } return false ; }
Returns distance between two Nodes.
@access		public
@param			ADT_Graph_Node		$source		Source Node of this Edge
@param			ADT_Graph_Node		$target		Target Node of this Edge
@return		int
Returns distance between two Nodes .