Changeset 591


Ignore:
Timestamp:
Aug 24, 2006, 1:17:36 PM (15 years ago)
Author:
Peter
Message:

added random_shuffle function in Target class

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/c++_tools/classifier/Target.cc

    r581 r591  
    22
    33#include <c++_tools/classifier/Target.h>
     4#include <c++_tools/random/random.h>
    45#include <c++_tools/utility/stl_utility.h>
    56#include <c++_tools/utility/utility.h>
    67
     8#include <algorithm>
    79#include <cassert>
    810#include <iostream>
     
    9597  }
    9698
     99  void Target::random_shuffle(void)
     100  {
     101    random::DiscreteUniform d;
     102    std::random_shuffle(classes_.begin(), classes_.end(),d);
     103  }
     104
    97105  const size_t Target::size(const std::string& label) const
    98106  {
Note: See TracChangeset for help on using the changeset viewer.