-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathlab22.h
executable file
·82 lines (76 loc) · 4.61 KB
/
lab22.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
/** lab22.h
* =============================================================
* Name: Your Name
* Section: Your Section
* Project: FILL IN
* Purpose: FILL IN
* ============================================================= */
#ifndef LAB22_H
#define LAB22_H
/**
* @brief get point differential per game for one team
* @param teamID the team being analyzed
* @param homeIDs the homeIDs for all games
* @param awayIDs the awayIDs for all games
* @param homeScores the ptsHome values for all games
* @param awayScores the ptsAway values for all games
* @param num_games the number of games being analyzed (the length of the parallel arrays)
* @return the point differential per game across all game for the team
* The differential will be positive if the team has gotten more points per game than their opponents, and vice versa
*/
double pointDifferentialPerGameOneTeam(int teamID, int* homeIDs, int* awayIDs, int* homeScores, int* awayScores, int num_games);
/**
* @brief compare who won when the two teams we care about played each other previously
* @param team1 the ID for team1 for the game being analyzed
* @param team2 the ID for team2 for the game being analyzed
* @param homeIDs the homeIDs for all games
* @param awayIDs the awayIDs for all games
* @param homeTeamWins results of all games, 1 if home team won, and 0 otherwise
* @param num_games the number of games being analyzed (the length of the parallel arrays)
* @return the win/loss differential - The differential will be positive if the team 1 has won more, and vice versa.
* For example, if team 1 has won 2 more games, then return 2. if the team 2 has won 1 more game then return -1.
*/
int headToHeadWL(int team1, int team2, int* homeIDs, int* awayIDs, int* homeTeamWins, int num_games);
/**
* @brief get the shooting effectiveness of a team - this stat combines averages of field goal percentage, 3-point percentage, and free throw percentage
* @param teamID the team to get the shooting effectiveness for
* @param homeIDs the homeIDs for all games
* @param awayIDs the awayIDs for all games
* @param homeFgPcts the field goal percentages for the home teams for all games
* @param awayFgPcts the field goal percentages for the away teams for all games
* @param homeFg3Pcts the 3-point field goal percentages for the home teams for all games
* @param awayFg3Pcts the 3-point field goal percentages for the away teams for all games
* @param homeFtPcts the free throw percentages for the home teams for all games
* @param awayFtPcts the free throw percentages for the away teams for all games
* @param num_games the number of games being analyzed (the length of the parallel arrays)
* @return the shooting effectiveness of the team in question -
* The return value should be the result of the function getShootingEffectivenessFromAverages() given the team's fgPct, fg3Pct, and ftPct across all games
*/
double shootingEffectivenessOneTeam(int teamID, int* homeIDs, int* awayIDs, double* homeFgPcts, double* awayFgPcts, double* homeFg3Pcts, double* awayFg3Pcts, double* homeFtPcts, double* awayFtPcts, int num_games);
/**
* @brief compare rebounds per game for two teams
* @param team1 the ID for team1 for the game being analyzed
* @param team2 the ID for team2 for the game being analyzed
* @param homeIDs the homeIDs for all games
* @param awayIDs the awayIDs for all games
* @param homeRebounds the homeRebound values for all games
* @param awayRebounds the awayRebound values for all games
* @param num_games the number of games being analyzed (the length of the parallel arrays)
* @return the difference in rebounds per game between the home and away team
* The differential will be positive if team 1 averages more rebounds per game, and vice versa
*/
double reboundsPerGameComparison(int team1, int team2, int* homeIDs, int* awayIDs, int* homeRebounds, int* awayRebounds, int num_games);
/**
* @brief compare assists per game for two teams
* @param team1 the ID for team1 for the game being analyzed
* @param team2 the ID for team2 for the game being analyzed
* @param homeIDs the homeIDs for all games
* @param awayIDs the awayIDs for all games
* @param homeAssists the homeAssist values for all games
* @param awayAssists the awayAssist values for all games
* @param num_games the number of games being analyzed (the length of the parallel arrays)
* @return the difference in assists per game between team 1 and team 2
* The differential will be positive if team 1 averages more assists per game, and vice versa
*/
double assistsPerGameComparison(int team1, int team2, int* homeIDs, int* awayIDs, int* homeAssists, int* awayAssists, int num_games);
#endif //LAB22_H