#include "histogram.h" #include "kgramstats.h" #include #include template void histogram::add(const T& inst) { freqtable[inst]++; } template void histogram::compile() { distribution.clear(); int max = 0; for (auto& it : freqtable) { max += it.second; distribution.emplace(max, it.first); } freqtable.clear(); } template const T& histogram::next() const { int max = distribution.rbegin()->first; int r = rand() % max; return distribution.upper_bound(r)->second; } template void histogram::print() const { for (auto& freqpair : freqtable) { std::cout << freqpair.first << ": " << freqpair.second << std::endl; } } template class histogram ; template class histogram ; dden' name='id' value='f4a383ae208da8363ef9ffad7763e0853e02a678'/> Randomizer for LINGO 2 using Archipelago Multiworld
about summary refs log tree commit diff stats
blob: fd2fc9de1e181c7f61aa9e775ce42d3cfc8c22dc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
name: "Inside"
display_name: "Inside"
panels {
  name: "REMEMBER"
  path: "Panels/panel_3"
  clue: "remember"
  answer: "remember"
  required_door { name: "Double Letters" }
}
endings {
  name: "BLACK"
  path: "Components/Ending/black_ending"
}
# TODO: Not sure if the paintings in here should be randomized.