Skip to content

Instantly share code, notes, and snippets.

@danielkorzekwa
Created January 24, 2012 19:06
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save danielkorzekwa/1671926 to your computer and use it in GitHub Desktop.
package dk.tennis.compare
import dk.atp.api.AtpWorldTourApi._
import SurfaceEnum._
import dk.tennisprob.TennisProbCalc.MatchTypeEnum._
/**
* Calculates probability of winning a tennis match by player A against player B. For instance Roger Federer vs Novak Djokovic
*
*/
trait TennisPlayerCompare {
/**
* Calculates probability of winning a tennis match by player A against player B.
*
* @param fullNamePlayerA e.g. Roger Federer
* @param fullNamePlayerB e.g. Novak Djokovic
* @param surface Clay, grass or hard.
* @param matchType Three or five set match.
* @param year Probability is calculated for the last day of a year.
*
* @return Probability between 0 and 1.
*/
def matchProb(fullNamePlayerA: String, fullNamePlayerB: String, surface: SurfaceEnum, matchType: MatchTypeEnum, year:Int): Double
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment