View difference between Paste ID: fmGYTZfs and cKdefhZ6
SHOW: | | - or go back to the newest paste.
1
#include <shogun/lib/Map.h>
2
#include <shogun/io/SGIO.h>
3
#include <shogun/base/init.h>
4
#include <shogun/lib/common.h>
5
#include <shogun/mathematics/Math.h>
6
7
#include <shogun/lib/Time.h>
8
9
using namespace shogun;
10
11
#define SIZE 6
12
13
void print_message(FILE* target, const char* str)
14
{
15
	fprintf(target, "%s", str);
16
}
17
18
int main(int argc, char** argv)
19
{
20
	init_shogun(&print_message, &print_message, &print_message);
21-
	//const char* v[SIZE] = {"Russia", "England", "Germany", "USA", "France", "Spain"};
21+
22
	int v[200000];
23
	for (int i=0; i<200000; i++)
24
	{
25
		v[i]=CMath::random(0,200000);
26
	}
27
28-
	CMath::init_random(228);
28+
29
30
	CTime t;
31
	for (int i=0; i<200000; i++)
32
	{
33
		map->add(i, v[i]);
34
	}
35
	t.cur_time_diff(true);
36
37
	SG_UNREF(map);
38
39
	exit_shogun();
40
	return 0;
41
}