Skip to content

Commit

Permalink
Relaxed javadoc rules in order to be compatible with multiple jdks (j…
Browse files Browse the repository at this point in the history
  • Loading branch information
d-michail authored Feb 10, 2020
1 parent 442b690 commit ed313dc
Show file tree
Hide file tree
Showing 19 changed files with 88 additions and 93 deletions.
44 changes: 22 additions & 22 deletions jgrapht-core/src/main/java/org/jgrapht/Graph.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@

/**
* The root interface in the graph hierarchy. A mathematical graph-theory graph object
* <tt>G(V,E)</tt> contains a set <tt>V</tt> of vertices and a set <tt>
* E</tt> of edges. Each edge e=(v1,v2) in E connects vertex v1 to vertex v2. for more information
* <code>G(V,E)</code> contains a set <code>V</code> of vertices and a set <code>
* E</code> of edges. Each edge e=(v1,v2) in E connects vertex v1 to vertex v2. for more information
* about graphs and their related definitions see <a href="http://mathworld.wolfram.com/Graph.html">
* http://mathworld.wolfram.com/Graph.html</a>.
*
Expand Down Expand Up @@ -180,7 +180,7 @@ public interface Graph<V, E>
* More formally, adds the specified edge, <code>
* e</code>, to this graph if this graph contains no edge <code>e2</code> such that
* <code>e2.equals(e)</code>. If this graph already contains such an edge, the call leaves this
* graph unchanged and returns <tt>false</tt>. Some graphs do not allow edge-multiplicity. In
* graph unchanged and returns <code>false</code>. Some graphs do not allow edge-multiplicity. In
* such cases, if the graph already contains an edge from the specified source to the specified
* target, than this method does not change the graph and returns <code>
* false</code>. If the edge was added to the graph, returns <code>
Expand All @@ -195,7 +195,7 @@ public interface Graph<V, E>
* @param targetVertex target vertex of the edge.
* @param e edge to be added to this graph.
*
* @return <tt>true</tt> if this graph did not already contain the specified edge.
* @return <code>true</code> if this graph did not already contain the specified edge.
*
* @throws IllegalArgumentException if source or target vertices are not found in the graph.
* @throws ClassCastException if the specified edge is not assignment compatible with the class
Expand Down Expand Up @@ -246,52 +246,52 @@ public interface Graph<V, E>
* specified vertex, <code>v</code>, to this graph if this graph contains no vertex
* <code>u</code> such that <code>
* u.equals(v)</code>. If this graph already contains such vertex, the call leaves this graph
* unchanged and returns <tt>false</tt>. In combination with the restriction on constructors,
* unchanged and returns <code>false</code>. In combination with the restriction on constructors,
* this ensures that graphs never contain duplicate vertices.
*
* @param v vertex to be added to this graph.
*
* @return <tt>true</tt> if this graph did not already contain the specified vertex.
* @return <code>true</code> if this graph did not already contain the specified vertex.
*
* @throws NullPointerException if the specified vertex is <code>
* null</code>.
*/
boolean addVertex(V v);

/**
* Returns <tt>true</tt> if and only if this graph contains an edge going from the source vertex
* Returns <code>true</code> if and only if this graph contains an edge going from the source vertex
* to the target vertex. In undirected graphs the same result is obtained when source and target
* are inverted. If any of the specified vertices does not exist in the graph, or if is <code>
* null</code>, returns <code>false</code>.
*
* @param sourceVertex source vertex of the edge.
* @param targetVertex target vertex of the edge.
*
* @return <tt>true</tt> if this graph contains the specified edge.
* @return <code>true</code> if this graph contains the specified edge.
*/
boolean containsEdge(V sourceVertex, V targetVertex);

/**
* Returns <tt>true</tt> if this graph contains the specified edge. More formally, returns
* <tt>true</tt> if and only if this graph contains an edge <code>e2</code> such that
* Returns <code>true</code> if this graph contains the specified edge. More formally, returns
* <code>true</code> if and only if this graph contains an edge <code>e2</code> such that
* <code>e.equals(e2)</code>. If the specified edge is <code>null</code> returns
* <code>false</code>.
*
* @param e edge whose presence in this graph is to be tested.
*
* @return <tt>true</tt> if this graph contains the specified edge.
* @return <code>true</code> if this graph contains the specified edge.
*/
boolean containsEdge(E e);

/**
* Returns <tt>true</tt> if this graph contains the specified vertex. More formally, returns
* <tt>true</tt> if and only if this graph contains a vertex <code>u</code> such that
* Returns <code>true</code> if this graph contains the specified vertex. More formally, returns
* <code>true</code> if and only if this graph contains a vertex <code>u</code> such that
* <code>u.equals(v)</code>. If the specified vertex is <code>null</code> returns
* <code>false</code>.
*
* @param v vertex whose presence in this graph is to be tested.
*
* @return <tt>true</tt> if this graph contains the specified vertex.
* @return <code>true</code> if this graph contains the specified vertex.
*/
boolean containsVertex(V v);

Expand Down Expand Up @@ -418,10 +418,10 @@ public interface Graph<V, E>
*
* @param edges edges to be removed from this graph.
*
* @return <tt>true</tt> if this graph changed as a result of the call
* @return <code>true</code> if this graph changed as a result of the call
*
* @throws NullPointerException if the specified edge collection is <tt>
* null</tt>.
* @throws NullPointerException if the specified edge collection is <code>
* null</code>.
*
* @see #removeEdge(Object)
* @see #containsEdge(Object)
Expand Down Expand Up @@ -449,10 +449,10 @@ public interface Graph<V, E>
*
* @param vertices vertices to be removed from this graph.
*
* @return <tt>true</tt> if this graph changed as a result of the call
* @return <code>true</code> if this graph changed as a result of the call
*
* @throws NullPointerException if the specified vertex collection is <tt>
* null</tt>.
* @throws NullPointerException if the specified vertex collection is <code>
* null</code>.
*
* @see #removeVertex(Object)
* @see #containsVertex(Object)
Expand All @@ -474,7 +474,7 @@ public interface Graph<V, E>
* Removes the specified edge from the graph. Removes the specified edge from this graph if it
* is present. More formally, removes an edge <code>
* e2</code> such that <code>e2.equals(e)</code>, if the graph contains such edge. Returns
* <tt>true</tt> if the graph contained the specified edge. (The graph will not contain the
* <code>true</code> if the graph contained the specified edge. (The graph will not contain the
* specified edge once the call returns).
*
* <p>
Expand All @@ -493,7 +493,7 @@ public interface Graph<V, E>
* More formally, if the graph contains a vertex <code>
* u</code> such that <code>u.equals(v)</code>, the call removes all edges that touch
* <code>u</code> and then removes <code>u</code> itself. If no such <code>u</code> is found,
* the call leaves the graph unchanged. Returns <tt>true</tt> if the graph contained the
* the call leaves the graph unchanged. Returns <code>true</code> if the graph contained the
* specified vertex. (The graph will not contain the specified vertex once the call returns).
*
* <p>
Expand Down
10 changes: 5 additions & 5 deletions jgrapht-core/src/main/java/org/jgrapht/Graphs.java
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public static <V, E> E addEdgeWithVertices(Graph<V, E> g, V sourceVertex, V targ
* @param <V> the graph vertex type
* @param <E> the graph edge type
*
* @return <tt>true</tt> if the target graph did not already contain the specified edge.
* @return <code>true</code> if the target graph did not already contain the specified edge.
*/
public static <V,
E> boolean addEdgeWithVertices(Graph<V, E> targetGraph, Graph<V, E> sourceGraph, E edge)
Expand Down Expand Up @@ -206,7 +206,7 @@ E> void addGraphReversed(Graph<? super V, ? super E> destination, Graph<V, E> so
* @param <V> the graph vertex type
* @param <E> the graph edge type
*
* @return <tt>true</tt> if this graph changed as a result of the call
* @return <code>true</code> if this graph changed as a result of the call
*/
public static <V, E> boolean addAllEdges(
Graph<? super V, ? super E> destination, Graph<V, E> source, Collection<? extends E> edges)
Expand Down Expand Up @@ -234,11 +234,11 @@ public static <V, E> boolean addAllEdges(
* @param <V> the graph vertex type
* @param <E> the graph edge type
*
* @return <tt>true</tt> if graph changed as a result of the call
* @return <code>true</code> if graph changed as a result of the call
*
* @throws NullPointerException if the specified vertices contains one or more null vertices, or
* if the specified vertex collection is <tt>
* null</tt>.
* if the specified vertex collection is <code>
* null</code>.
*
* @see Graph#addVertex(Object)
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -510,9 +510,6 @@ public int[] getComponentArray()
* Return the internal path array. For each vertex $v$, $pathArray[normalizeVertex(v)] = i$
* iff $v$ appears on path $i$ or $-1$ if $v$ doesn't belong to any path.
*
* <p>
* Note: the indexing of paths is consistent with {@link PathDecomposition#getPaths()}.
*
* @return internal path array
*/
public int[] getPathArray()
Expand All @@ -536,9 +533,6 @@ public int[] getPositionInPathArray()
* Return the internal firstNodeInPath array. For each path $i$, $firstNodeInPath[i] =
* normalizeVertex(v)$ iff $v$ appears as the first vertex on the path.
*
* <p>
* Note: the indexing of paths is consistent with {@link PathDecomposition#getPaths()}.
*
* @return internal firstNodeInPath array
*/
public int[] getFirstNodeInPathArray()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,11 @@ public final class EdmondsKarpMFImpl<V, E>
private final ExtensionFactory<AnnotatedFlowEdge> edgeExtensionsFactory;

/**
* Constructs <tt>MaximumFlow</tt> instance to work with <i>a copy of</i> <tt>network</tt>.
* Current source and sink are set to <tt>null</tt>. If <tt>network</tt> is weighted, then
* Constructs <code>MaximumFlow</code> instance to work with <i>a copy of</i> <code>network</code>.
* Current source and sink are set to <code>null</code>. If <code>network</code> is weighted, then
* capacities are weights, otherwise all capacities are equal to one. Doubles are compared using
* <tt>
* DEFAULT_EPSILON</tt> tolerance.
* <code>
* DEFAULT_EPSILON</code> tolerance.
*
* @param network network, where maximum flow will be calculated
*/
Expand All @@ -92,8 +92,8 @@ public EdmondsKarpMFImpl(Graph<V, E> network)
}

/**
* Constructs <tt>MaximumFlow</tt> instance to work with <i>a copy of</i> <tt>network</tt>.
* Current source and sink are set to <tt>null</tt>. If <tt>network</tt> is weighted, then
* Constructs <code>MaximumFlow</code> instance to work with <i>a copy of</i> <code>network</code>.
* Current source and sink are set to <code>null</code>. If <code>network</code> is weighted, then
* capacities are weights, otherwise all capacities are equal to one.
*
* @param network network, where maximum flow will be calculated
Expand All @@ -120,10 +120,10 @@ public EdmondsKarpMFImpl(Graph<V, E> network, double epsilon)
}

/**
* Sets current source to <tt>source</tt>, current sink to <tt>sink</tt>, then calculates
* maximum flow from <tt>source</tt> to <tt>sink</tt>. Note, that <tt>source</tt> and
* <tt>sink</tt> must be vertices of the <tt>
* network</tt> passed to the constructor, and they must be different.
* Sets current source to <code>source</code>, current sink to <code>sink</code>, then calculates
* maximum flow from <code>source</code> to <code>sink</code>. Note, that <code>source</code> and
* <code>sink</code> must be vertices of the <code>
* network</code> passed to the constructor, and they must be different.
*
* @param source source vertex
* @param sink sink vertex
Expand All @@ -138,10 +138,10 @@ public MaximumFlow<E> getMaximumFlow(V source, V sink)
}

/**
* Sets current source to <tt>source</tt>, current sink to <tt>sink</tt>, then calculates
* maximum flow from <tt>source</tt> to <tt>sink</tt>. Note, that <tt>source</tt> and
* <tt>sink</tt> must be vertices of the <tt>
* network</tt> passed to the constructor, and they must be different. If desired, a flow map
* Sets current source to <code>source</code>, current sink to <code>sink</code>, then calculates
* maximum flow from <code>source</code> to <code>sink</code>. Note, that <code>source</code> and
* <code>sink</code> must be vertices of the <code>
* network</code> passed to the constructor, and they must be different. If desired, a flow map
* can be queried afterwards; this will not require a new invocation of the algorithm.
*
* @param source source vertex
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -321,8 +321,8 @@ public String toString()
}

/**
* Returns current source vertex, or <tt>null</tt> if there was no <tt>
* calculateMaximumFlow</tt> calls.
* Returns current source vertex, or <code>null</code> if there was no <code>
* calculateMaximumFlow</code> calls.
*
* @return current source
*/
Expand All @@ -332,8 +332,8 @@ public V getCurrentSource()
}

/**
* Returns current sink vertex, or <tt>null</tt> if there was no <tt>
* calculateMaximumFlow</tt> calls.
* Returns current sink vertex, or <code>null</code> if there was no <code>
* calculateMaximumFlow</code> calls.
*
* @return current sink
*/
Expand All @@ -343,8 +343,8 @@ public V getCurrentSink()
}

/**
* Returns maximum flow value, that was calculated during last <tt>
* calculateMaximumFlow</tt> call.
* Returns maximum flow value, that was calculated during last <code>
* calculateMaximumFlow</code> call.
*
* @return maximum flow value
*/
Expand All @@ -354,9 +354,9 @@ public double getMaximumFlowValue()
}

/**
* Returns maximum flow, that was calculated during last <tt>
* calculateMaximumFlow</tt> call, or <tt>null</tt>, if there was no <tt>
* calculateMaximumFlow</tt> calls.
* Returns maximum flow, that was calculated during last <code>
* calculateMaximumFlow</code> call, or <code>null</code>, if there was no <code>
* calculateMaximumFlow</code> calls.
*
* @return <i>read-only</i> mapping from edges to doubles - flow values
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,10 @@ public MaximumFlow<E> getMaximumFlow(V source, V sink)
}

/**
* Sets current source to <tt>source</tt>, current sink to <tt>sink</tt>, then calculates
* maximum flow from <tt>source</tt> to <tt>sink</tt>. Note, that <tt>source</tt> and
* <tt>sink</tt> must be vertices of the <tt>
* network</tt> passed to the constructor, and they must be different.
* Sets current source to <code>source</code>, current sink to <code>sink</code>, then calculates
* maximum flow from <code>source</code> to <code>sink</code>. Note, that <code>source</code> and
* <code>sink</code> must be vertices of the <code>
* network</code> passed to the constructor, and they must be different.
*
* @param source source vertex
* @param sink sink vertex
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ public interface MaximumFlowAlgorithm<V, E>
{

/**
* Sets current source to <tt>source</tt>, current sink to <tt>sink</tt>, then calculates
* maximum flow from <tt>source</tt> to <tt>sink</tt>. Returns an object containing detailed
* Sets current source to <code>source</code>, current sink to <code>sink</code>, then calculates
* maximum flow from <code>source</code> to <code>sink</code>. Returns an object containing detailed
* information about the flow.
*
* @param source source of the flow inside the network
Expand All @@ -48,10 +48,10 @@ public interface MaximumFlowAlgorithm<V, E>
MaximumFlow<E> getMaximumFlow(V source, V sink);

/**
* Sets current source to <tt>source</tt>, current sink to <tt>sink</tt>, then calculates
* maximum flow from <tt>source</tt> to <tt>sink</tt>. Note, that <tt>source</tt> and
* <tt>sink</tt> must be vertices of the <tt>
* network</tt> passed to the constructor, and they must be different.
* Sets current source to <code>source</code>, current sink to <code>sink</code>, then calculates
* maximum flow from <code>source</code> to <code>sink</code>. Note, that <code>source</code> and
* <code>sink</code> must be vertices of the <code>
* network</code> passed to the constructor, and they must be different.
*
* @param source source vertex
* @param sink sink vertex
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ interface Partitioning<V>
* @param index index of the partition to return
* @return the index-th partition
* @throws IndexOutOfBoundsException if the index is out of range
* (<tt>index &lt; 0 || index &gt;= getNumberPartitions()</tt>)
* (<code>index &lt; 0 || index &gt;= getNumberPartitions()</code>)
*/
Set<V> getPartition(int index);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@
* algorithm for subset disjoint cycles by Ahuja et al. That is, the algorithm may run in
* exponential time. This algorithm is implemented in two different version: a local search and a
* tabu search. In both cases we have to find the best neighbor of the current capacitated spanning
* tree. For further information about finding such an improving neighbor
* {@link ImprovementGraph} @see ImprovementGraph
* tree.
*
* @param <V> the vertex type
* @param <E> the edge type
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public ScaleFreeGraphGenerator(int size, Random rng)
}

/**
* Generates scale-free network with <tt>size</tt> passed to the constructor.
* Generates scale-free network with <code>size</code> passed to the constructor.
*
* @param target receives the generated edges and vertices; if this is non-empty on entry, the
* result will be a disconnected graph since generated elements will not be connected to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import java.util.*;

/**
* A skeletal implementation of the <tt>Graph</tt> interface, to minimize the effort required to
* A skeletal implementation of the <code>Graph</code> interface, to minimize the effort required to
* implement graph interfaces. This implementation is applicable to both: directed graphs and
* undirected graphs.
*
Expand Down Expand Up @@ -139,7 +139,7 @@ protected boolean assertVertexExist(V v)
*
* @param edges edges to be removed from this graph.
*
* @return <tt>true</tt> if this graph changed as a result of the call.
* @return <code>true</code> if this graph changed as a result of the call.
*
* @see Graph#removeEdge(Object)
* @see Graph#containsEdge(Object)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
*
* <p>
* This graph does <i>not</i> pass the hashCode and equals operations through to the backing graph,
* but relies on <tt>Object</tt>'s <tt>equals</tt> and <tt>hashCode</tt> methods. This graph will be
* but relies on <code>Object</code>'s <code>equals</code> and <code>hashCode</code> methods. This graph will be
* serializable if the backing graph is serializable.
* </p>
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
*
* <p>
* This graph does <i>not</i> pass the hashCode and equals operations through to the backing graph,
* but relies on <tt>Object</tt>'s <tt>equals</tt> and <tt>hashCode</tt> methods. This graph will be
* but relies on <code>Object</code>'s <code>equals</code> and <code>hashCode</code> methods. This graph will be
* serializable if the backing graph is serializable.
* </p>
*
Expand Down
Loading

0 comments on commit ed313dc

Please sign in to comment.