Skip to content

Instantly share code, notes, and snippets.

View Kaminate's full-sized avatar
🙃
Killin' it

白★能盛 Kaminate

🙃
Killin' it
  • United States
View GitHub Profile
@Kaminate
Kaminate / PartitionProblem
Created August 6, 2013 06:04
C++ solution of the "easiest hard problem", the partition problem. (the problem itself and algorithm described on wikipedia). It includes a file called Array2D.h (another one of my gists), which is just a wrapper around a dynamic 2d array which deletes the array in the destructor.
//////////////////////////
// Nathan Park (age 21) //
// August 4, 2013 //
//////////////////////////
#include <iostream>
#include <fstream>
#include <vector>
#include <numeric> // std::accumulate
@Kaminate
Kaminate / ThatGameProfiler.h
Created August 6, 2013 05:59
Cute little profiler from ThatGameCompany. Constructor starts ticking, Destructor prints the time taken.
class Profiler
{
public:
Profiler();
~Profiler(); // couts the amount of time the profiler was alive
private:
float GetTime();
float startSeconds;
float endSeconds;