Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
platform
Helpers
RouletteWheelSelector.h
1
// Copyright (c) 2014 eeGeo. All rights reserved.
2
3
#pragma once
4
5
#include "Types.h"
6
#include "Random.h"
7
8
#include <vector>
9
10
namespace
Eegeo
11
{
12
namespace
Helpers
13
{
19
class
RouletteWheelSelector
:
private
Eegeo::NonCopyable
20
{
21
public
:
22
static
RouletteWheelSelector
* CreateWithFitnessValues(
const
std::vector<float>& fitness);
23
void
UpdateFitnessValues(
const
std::vector<float>& fitness);
24
size_t
SelectItemIndex(
Random
& rand)
const
;
25
private
:
26
RouletteWheelSelector
() {}
27
std::vector<float> m_cumulativeFitness;
28
};
29
}
30
}
Generated on Sat Jun 10 2023 02:00:30 for eeGeo Platform SDK by
1.8.3.1