Skip to content
Permalink
Browse files
Filled some javadocs, no functional modifications
  • Loading branch information
marcosperanza committed Jul 12, 2012
1 parent 4593a24 commit 15f4415e60cb6600d529a464efb4272579ab93f2
Showing 12 changed files with 72 additions and 1 deletion.
@@ -54,6 +54,7 @@ public final void connect( GraphConnector<V, E> connector )
/**
* Adds a new vertex to graph connector.
*
* @param <N> the Graph vertex type
* @param node the vertex to add
* @return the vertex added
*/
@@ -65,6 +66,7 @@ protected final <N extends V> N addVertex( N node )
/**
* Adds a new edge to graph connector.
*
* @param <A> the Graph edges type
* @param arc the edge to add.
* @return the {@link HeadVertexConnector}
*/
@@ -31,6 +31,7 @@
/**
* Adds a new vertex to graph.
*
* @param <N> the Graph vertices type
* @param node the vertex to add
* @return the vertex added
*/
@@ -39,6 +40,7 @@
/**
* Adds a new edge to graph.
*
* @param <A> the Graph edges type
* @param arc the edge to add.
* @return the {@link HeadVertexConnector}
*/
@@ -32,6 +32,7 @@
/**
* Specifies the head vertex for the edge
*
* @param <H> the Graph vertex type
* @param head the head vertex
* @return {@link TailVertexConnector} builded from the head
*/
@@ -30,6 +30,8 @@

/**
* Specifies the tail vertex for the edge
*
* @param <T> the Graph vertex type
* @param tail the tail vertex
*/
<T extends V> void to( T tail );
@@ -39,7 +39,7 @@
* Performs the {@code find} operation applying the <i>path compression</i>.
*
* @param e the element has to be find in this {@code DisjointSet} instance
* @return
* @return the value found
*/
public E find( E e )
{
@@ -37,6 +37,10 @@

private final UndirectedGraph<V, E> graph;

/**
* Creates a new instance of {@link DefaultColorsBuilder} for the input graph.
* @param graph the graph
*/
public DefaultColorsBuilder( UndirectedGraph<V, E> graph )
{
this.graph = graph;
@@ -25,12 +25,21 @@

import org.apache.commons.graph.GraphException;

/**
* Exception used by Coloring algorithms. Used when there are not enough colors to
* color the graph.
*
*/
public class NotEnoughColorsException
extends GraphException
{

private static final long serialVersionUID = -8782950517745777605L;

/**
* Creates new instance of {@link NotEnoughColorsException}.
* @param colors the set of color.
*/
public NotEnoughColorsException( Set<?> colors )
{
super( format( "Input color set %s has not enough colors to color the given graph", colors ) );
@@ -30,6 +30,8 @@
import org.apache.commons.graph.Graph;

/**
* TODO Fill me!!
*
* @param <V> the Graph vertices type
* @param <E> the Graph edges type
*/
@@ -41,6 +43,12 @@

private final Iterable<V> includedVertices;

/**
* Create a new instance of {@link DefaultConnectivityAlgorithmsSelector} calculated for a set of included vertices
*
* @param graph the graph
* @param includedVertices included vertices
*/
public DefaultConnectivityAlgorithmsSelector( Graph<V, E> graph, Iterable<V> includedVertices )
{
this.graph = graph;
@@ -25,6 +25,8 @@
import org.apache.commons.graph.Graph;

/**
* TODO Fill me!!
*
* @param <V> the Graph vertices type
* @param <E> the Graph edges type
*/
@@ -34,6 +36,10 @@

private final Graph<V, E> graph;

/**
* Creates a nw instance of {@link DefaultConnectivityBuilder}
* @param graph the graph
*/
public DefaultConnectivityBuilder( Graph<V, E> graph )
{
this.graph = graph;
@@ -23,17 +23,29 @@

import org.apache.commons.graph.DirectedGraph;

/**
* TODO Fill me!!
*
* @param <P> The player's type
*/
public final class DefaultRankingSelector<P>
implements RankingSelector<P>
{

private final DirectedGraph<P, GameResult> tournamentGraph;

/**
* Creates a new instance of {@link DefaultRankingSelector} for gived graph.
* @param tournamentGraph the graph
*/
public DefaultRankingSelector( DirectedGraph<P, GameResult> tournamentGraph )
{
this.tournamentGraph = tournamentGraph;
}

/**
* {@inheritDoc}
*/
public KFactorBuilder<P> werePlayersArRankedIn( PlayersRank<P> playersRank )
{
playersRank = checkNotNull( playersRank, "ELO ranking can not be applied if players can not be ranked!" );
@@ -19,11 +19,26 @@
* under the License.
*/

/**
* The player rank
*
* @param <P> the player's type
*/
public interface PlayersRank<P>
{

/**
* Returns the ranking for the player
* @param player the player
* @return Returns the ranking for the player
*/
Double getRanking( P player );

/**
* Update the ranking for the player
* @param player the player
* @param ranking the ranking value
*/
void updateRanking( P player, Double ranking );

}
@@ -19,9 +19,19 @@
* under the License.
*/

/**
* Ranking selector
* @param <P> the player's type
*/
public interface RankingSelector<P>
{

/**
* TODO Fill me!!!
*
* @param playersRank
* @return
*/
KFactorBuilder<P> werePlayersArRankedIn( PlayersRank<P> playersRank );

}

0 comments on commit 15f4415

Please sign in to comment.