-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
68 lines (58 loc) · 2.18 KB
/
Program.cs
File metadata and controls
68 lines (58 loc) · 2.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
using System;
using System.Numerics;
using System.Collections.Generic;
using Hash;
using System.Diagnostics;
namespace Project
{
class Program
{
static void Main(string[] args)
{
// Init
ImplementationTester tester = new ImplementationTester();
List<Tuple<ulong, int>> stream;
int q = 89;
BigInteger a = new BigInteger(1);
a = a<<q;
BigInteger b = (1<<89);
Console.WriteLine(b);
//// Opgave 1c
// n = 20 ; l = 1
//tester.ModVsShift(20,1);
//our choice of n for Opgave 3,7 and 8
//byte n = 26;
// // Opgave 3
// Console.WriteLine("Opgave 3"
// +"-----------------------------------");
// for (byte l=6; l<n; l+=4){
// stream = Stream.CreateStreamWrap((int)1L<<n,l);
// tester.QuadSumModVsShift(n,l,stream);
// }
//max l working in Opgave 3
//byte l = 22;
byte l = 15;
byte n = 15;
// Opgave 7
Console.WriteLine("Opgave 7"
+"-----------------------------------");
//create stream
stream = Stream.CreateStreamWrap((int)1L<<n,l);
//calculates S
tester.CalcS(n,l,stream);
//perform 100 experiments
tester.Sketch100Test(stream,15);
Console.WriteLine("\nh: "+CountSketchFunctions.stoperh.ElapsedMilliseconds+
" \ns: "+CountSketchFunctions.stopers.ElapsedMilliseconds+
" \nC: "+CountSketchFunctions.stoperC.ElapsedMilliseconds);
// // Opgave 8
// Console.WriteLine("Opgave 8"
// +"-----------------------------------");
// //test for t = 8, 16 and 24
// for (byte t=8; t<=24;t+=8){
// tester.CalcS(n,l,stream);
// tester.Sketch100Test(stream,t);
// }
}
}
}