commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1305138 - in /commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/elo: DefaultRankingSelector.java RankingSelector.java
Date Sun, 25 Mar 2012 21:16:13 GMT
Author: simonetripodi
Date: Sun Mar 25 21:16:13 2012
New Revision: 1305138

URL: http://svn.apache.org/viewvc?rev=1305138&view=rev
Log:
started creating the EDSL for ELO algorithm

Added:
    commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/elo/DefaultRankingSelector.java
  (with props)
    commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/elo/RankingSelector.java
  (with props)

Added: commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/elo/DefaultRankingSelector.java
URL: http://svn.apache.org/viewvc/commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/elo/DefaultRankingSelector.java?rev=1305138&view=auto
==============================================================================
--- commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/elo/DefaultRankingSelector.java
(added)
+++ commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/elo/DefaultRankingSelector.java
Sun Mar 25 21:16:13 2012
@@ -0,0 +1,42 @@
+package org.apache.commons.graph.elo;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import static org.apache.commons.graph.utils.Assertions.checkNotNull;
+
+import org.apache.commons.graph.DirectedGraph;
+
+public final class DefaultRankingSelector<P>
+    implements RankingSelector<P>
+{
+
+    private final DirectedGraph<P, GameResult> tournamentGraph;
+
+    public DefaultRankingSelector( DirectedGraph<P, GameResult> tournamentGraph )
+    {
+        this.tournamentGraph = tournamentGraph;
+    }
+
+    public void herePlayersArRankedIn( PlayersRank<P> playersRank )
+    {
+        playersRank = checkNotNull( playersRank, "ELO ranking can not be applied if players
can not be ranked!" );
+    }
+
+}

Propchange: commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/elo/DefaultRankingSelector.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/elo/DefaultRankingSelector.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/elo/DefaultRankingSelector.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/elo/RankingSelector.java
URL: http://svn.apache.org/viewvc/commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/elo/RankingSelector.java?rev=1305138&view=auto
==============================================================================
--- commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/elo/RankingSelector.java
(added)
+++ commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/elo/RankingSelector.java
Sun Mar 25 21:16:13 2012
@@ -0,0 +1,27 @@
+package org.apache.commons.graph.elo;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+public interface RankingSelector<P>
+{
+
+    void herePlayersArRankedIn( PlayersRank<P> playersRank );
+
+}

Propchange: commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/elo/RankingSelector.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/elo/RankingSelector.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/elo/RankingSelector.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain



Mime
View raw message