コード例 #1
0
ファイル: maxsize.C プロジェクト: pranamibhatt/booksim
void MaxSizeMatch::Allocate( )
{

  // augment as many times as possible 
  // (this is an O(N^3) maximum-size matching algorithm)
  while( _ShortestAugmenting( ) );

  // next time, start at next input to ensure fairness
  _prio = (_prio + 1) % _inputs;
}
コード例 #2
0
ファイル: maxsize.cpp プロジェクト: daib/workspace
void MaxSizeMatch::Allocate( )
{
  // clear matching
  for ( int i = 0; i < _inputs; ++i ) {
    _inmatch[i] = -1;
  }
  for ( int j = 0; j < _outputs; ++j ) {
    _outmatch[j] = -1;
  }

  // augment as many times as possible 
  // (this is an O(N^3) maximum-size matching algorithm)
  while( _ShortestAugmenting( ) );
}
コード例 #3
0
ファイル: maxsize.cpp プロジェクト: pranamibhatt/booksim
void MaxSizeMatch::Allocate( )
{
  // clear matching
  for ( int i = 0; i < _inputs; ++i ) {
    _inmatch[i] = -1;
  }
  for ( int j = 0; j < _outputs; ++j ) {
    _outmatch[j] = -1;
  }

  // augment as many times as possible 
  // (this is an O(N^3) maximum-size matching algorithm)
  while( _ShortestAugmenting( ) );

  // next time, start at next input to ensure fairness
  _prio = (_prio + 1) % _inputs;
}