| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| NeighborhoodGraphProp |
|
| 1.0;1 |
| 1 | /* | |
| 2 | This file is part of Combean. | |
| 3 | ||
| 4 | Combean is free software; you can redistribute it and/or modify | |
| 5 | it under the terms of the GNU General Public License as published by | |
| 6 | the Free Software Foundation; either version 2 of the License, or | |
| 7 | (at your option) any later version. | |
| 8 | ||
| 9 | Combean is distributed in the hope that it will be useful, | |
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 12 | GNU General Public License for more details. | |
| 13 | ||
| 14 | You should have received a copy of the GNU General Public License | |
| 15 | along with Combean; if not, write to the Free Software | |
| 16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | |
| 17 | */ | |
| 18 | /* | |
| 19 | * Created on 06.01.2005 | |
| 20 | * | |
| 21 | */ | |
| 22 | package net.sourceforge.combean.interfaces.graph.prop; | |
| 23 | ||
| 24 | import net.sourceforge.combean.interfaces.graph.Edge; | |
| 25 | import net.sourceforge.combean.interfaces.graph.EdgeIterator; | |
| 26 | import net.sourceforge.combean.interfaces.graph.Graph; | |
| 27 | import net.sourceforge.combean.interfaces.graph.Node; | |
| 28 | ||
| 29 | /** | |
| 30 | * Graph property for exploring the local neighborhood of a node in the graph. | |
| 31 | * | |
| 32 | * @author schickin | |
| 33 | * | |
| 34 | */ | |
| 35 | public interface NeighborhoodGraphProp extends Graph { | |
| 36 | /** | |
| 37 | * Return an iterator for the local neighborhood of v | |
| 38 | * | |
| 39 | * @param v the node for which the neighborhood shall be given. | |
| 40 | * @return an iterator through the neighborhood | |
| 41 | */ | |
| 42 | EdgeIterator getIncidentEdges(Node v); | |
| 43 | ||
| 44 | /** | |
| 45 | * Given an edge and an incident node, return the other node of the edge | |
| 46 | * | |
| 47 | * @param e the given edge | |
| 48 | * @param v the give node | |
| 49 | * @return the other incident node of e | |
| 50 | */ | |
| 51 | Node getOtherNode(Edge e, Node v); | |
| 52 | ||
| 53 | /** | |
| 54 | * Return the first node of an edge. | |
| 55 | * For directed graphs this is the source of the edge. | |
| 56 | * For undirected graphs the ordering of the nodes of an edge is arbitrary. | |
| 57 | * | |
| 58 | * @param e the edge | |
| 59 | * @return the first node of the given edge | |
| 60 | */ | |
| 61 | Node getFirstNode(Edge e); | |
| 62 | ||
| 63 | /** | |
| 64 | * Return the second node of an edge. | |
| 65 | * For directed graphs this is the target of the edge. | |
| 66 | * For undirected graphs the ordering of the nodes of an edge is arbitrary. | |
| 67 | * | |
| 68 | * @param e the edge | |
| 69 | * @return the second node of the given edge | |
| 70 | */ | |
| 71 | Node getSecondNode(Edge e); | |
| 72 | } |