Skip to content

Commit

Permalink
team sorting fix
Browse files Browse the repository at this point in the history
  • Loading branch information
leiizko authored Aug 7, 2017
1 parent cda3ae4 commit 8d3f817
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/trueskill.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,20 @@ void rate( std::vector< std::vector< double > > &T, std::vector< int > &R, int t
std::vector< std::vector< double > > org;
org = T;
sortTeamsByRank( T, R );

for ( unsigned int i = 0; i < R.size(); i++ )
{
for ( unsigned int n = i + 1; n < R.size(); n++ )
{
if ( R[ i ] > R[ n ] )
{
int temp = R[ i ];
R[ i ] = R[ n ];
R[ n ] = temp;
}
}
}

unsigned int size = T.size(), index = 0;
double ident = T[ 0 ][ 2 ];
std::vector< std::vector< Gaussian > > ratings( t );
Expand Down

0 comments on commit 8d3f817

Please sign in to comment.