// File: nikosgalanis[P]Vectors-Similarity-Search-and-Clustering/programs/Clustering/../../algorithms/Clustering/clustering.h
// Function: Clustering<double>::Clustering(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::vector<std::vector<double, std::allocator<double>>, std::allocator<std::vector<double, std::allocator<double>>>>, unsigned int, unsigned int, unsigned int, unsigned int)
Clustering(std::string assignment_method, std::vector<std::vector<T>> feature_vectors, uint32_t k,
			uint32_t hc_M, uint32_t hc_k, uint32_t hc_probes): feature_vectors(feature_vectors), k(k),
			hc_M(hc_M), hc_k(hc_k), hc_probes(hc_probes) {
				if (assignment_method != "reverse_Hypercube") {
					cout << "Wrong assignment method selected\n";
					exit(EXIT_FAILURE);
				}	
				// initialize all the classs fields necessary
				this->assignment_method = assignment_method;

				// default hypercube arguments
				uint32_t m = pow(2,32) - 5;
				uint32_t w = 10000;

				
				n_points = feature_vectors.size();
				assert(n_points);
				space_dim = feature_vectors.at(0).size();

				hc_instant = new Hypercube<T>(hc_k, m, hc_M, hc_probes, n_points, w, space_dim, feature_vectors);

				vector<int> assigned(n_points, 0);
				assigned_centroid = assigned;
		}

// Assembly:
pushq %rbx
subq $0x120, %rsp            # imm = 0x120
movq %rdx, 0x90(%rsp)
movq %rsi, 0x70(%rsp)
movl 0x130(%rsp), %eax
movq %rdi, 0x118(%rsp)
movq %rsi, 0x110(%rsp)
movq %rdx, 0x108(%rsp)
movl %ecx, 0x104(%rsp)
movl %r8d, 0x100(%rsp)
movl %r9d, 0xfc(%rsp)
movq 0x118(%rsp), %rdi
movq %rdi, 0x88(%rsp)
movl 0x104(%rsp), %eax
movl %eax, (%rdi)
addq $0x10, %rdi
movq %rdi, 0x78(%rsp)
callq 0x22c0
movq 0x88(%rsp), %rdi
addq $0x30, %rdi
movq %rdi, 0x80(%rsp)
callq 0x3450
movq 0x88(%rsp), %rdi
movq 0x90(%rsp), %rsi
addq $0x48, %rdi
movq %rdi, 0x98(%rsp)
callq 0x5f70
jmp 0x680e
movq 0x88(%rsp), %rdi
addq $0x60, %rdi
movq %rdi, 0x60(%rsp)
callq 0x8370
movq 0x88(%rsp), %rax
movq 0x70(%rsp), %rdi
movl 0x100(%rsp), %ecx
movl %ecx, 0x88(%rax)
movl 0xfc(%rsp), %ecx
movl %ecx, 0x8c(%rax)
movl 0x130(%rsp), %ecx
movl %ecx, 0x90(%rax)
leaq 0x14a2f(%rip), %rsi     # 0x1b28e
callq 0x8380
movb %al, 0x6f(%rsp)
jmp 0x686a
movb 0x6f(%rsp), %al
testb $0x1, %al
jne 0x6874
jmp 0x68c5
movq 0x2075d(%rip), %rdi     # 0x26fd8
leaq 0x14ad5(%rip), %rsi     # 0x1b357
callq 0x2200
jmp 0x6889
movl $0x1, %edi
callq 0x2260
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf0(%rsp)
movl %eax, 0xec(%rsp)
jmp 0x6ba2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf0(%rsp)
movl %eax, 0xec(%rsp)
jmp 0x6b8b
movq 0x70(%rsp), %rsi
movq 0x88(%rsp), %rdi
addq $0x10, %rdi
callq 0x2030
jmp 0x68dd
movl $0x2, %edi
movl $0x20, %esi
callq 0x9680
movq 0x90(%rsp), %rdi
movsd 0x148c4(%rip), %xmm1    # 0x1b1c0
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %rax
movl %eax, 0xe8(%rsp)
movl $0x2710, 0xe4(%rsp) # imm = 0x2710
callq 0x4df0
movq %rax, %rcx
movq 0x88(%rsp), %rax
movl %ecx, 0x4(%rax)
cmpl $0x0, 0x4(%rax)
je 0x6932
jmp 0x6951
leaq 0x14a40(%rip), %rdi     # 0x1b379
leaq 0x14a42(%rip), %rsi     # 0x1b382
movl $0xb6, %edx
leaq 0x14c11(%rip), %rcx     # 0x1b55d
callq 0x2170
movq 0x90(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x6f30
movq %rax, 0x58(%rsp)
jmp 0x6969
movq 0x58(%rsp), %rdi
callq 0x3f60
movq %rax, %rcx
movq 0x88(%rsp), %rax
movl %ecx, 0x8(%rax)
movl $0x88, %edi
callq 0x2210
movq %rax, 0x50(%rsp)
jmp 0x6992
movq 0x90(%rsp), %rsi
movq 0x88(%rsp), %rax
movb $0x1, 0xc7(%rsp)
movl 0xfc(%rsp), %ecx
movl %ecx, 0x2c(%rsp)
movl 0xe8(%rsp), %ecx
movq %rcx, 0x30(%rsp)
movl 0x100(%rsp), %ecx
movl %ecx, 0x3c(%rsp)
movl 0x130(%rsp), %ecx
movl %ecx, 0x40(%rsp)
movl 0x4(%rax), %ecx
movl %ecx, 0x44(%rsp)
movl 0x8(%rax), %eax
movl %eax, 0x48(%rsp)
movl 0xe4(%rsp), %eax
movl %eax, 0x4c(%rsp)
leaq 0xc8(%rsp), %rdi
callq 0x5f70
jmp 0x69ff
movl 0x44(%rsp), %r9d
movl 0x40(%rsp), %r8d
movl 0x3c(%rsp), %ecx
movq 0x30(%rsp), %rdx
movl 0x2c(%rsp), %esi
movq 0x50(%rsp), %rdi
movl 0x4c(%rsp), %r10d
movl 0x48(%rsp), %r11d
movq %rsp, %rax
leaq 0xc8(%rsp), %rbx
movq %rbx, 0x10(%rax)
movl %r11d, 0x8(%rax)
movl %r10d, (%rax)
callq 0xf4f0
jmp 0x6a42
movq 0x88(%rsp), %rax
movq 0x50(%rsp), %rcx
movb $0x0, 0xc7(%rsp)
movq %rcx, 0x98(%rax)
leaq 0xc8(%rsp), %rdi
callq 0x35b0
movq 0x88(%rsp), %rax
movslq 0x4(%rax), %rax
movq %rax, 0x18(%rsp)
movl $0x0, 0xa4(%rsp)
leaq 0xa3(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x83b0
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rcx
leaq 0xa8(%rsp), %rdi
leaq 0xa4(%rsp), %rdx
callq 0x83c0
jmp 0x6aba
leaq 0xa3(%rsp), %rdi
callq 0x8440
movq 0x88(%rsp), %rdi
addq $0x60, %rdi
leaq 0xa8(%rsp), %rsi
callq 0x8450
jmp 0x6ae2
leaq 0xa8(%rsp), %rdi
callq 0x7a50
addq $0x120, %rsp            # imm = 0x120
popq %rbx
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf0(%rsp)
movl %eax, 0xec(%rsp)
jmp 0x6b2f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf0(%rsp)
movl %eax, 0xec(%rsp)
leaq 0xc8(%rsp), %rdi
callq 0x35b0
testb $0x1, 0xc7(%rsp)
jne 0x6b3b
jmp 0x6b45
movq 0x50(%rsp), %rdi
callq 0x21f0
jmp 0x6b8b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf0(%rsp)
movl %eax, 0xec(%rsp)
leaq 0xa3(%rsp), %rdi
callq 0x8440
jmp 0x6b8b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf0(%rsp)
movl %eax, 0xec(%rsp)
leaq 0xa8(%rsp), %rdi
callq 0x7a50
movq 0x60(%rsp), %rdi
callq 0x7a50
movq 0x98(%rsp), %rdi
callq 0x35b0
movq 0x80(%rsp), %rdi
callq 0x35b0
movq 0x78(%rsp), %rdi
callq 0x2150
movq 0xf0(%rsp), %rdi
callq 0x2400
nopw %cs:(%rax,%rax)