// File: /workspace/github_cpp_makefile_star2_O1/nikosgalanis[P]Vectors-Similarity-Search-and-Clustering/programs/Clustering/../../algorithms/Clustering/clustering.h
// Function: Clustering<double>::update()
void update(void) {
			// we want to keep a map containing the true values of the vectors, in order to find the median
			std::vector<std::vector<std::vector<T>>> centroids_map(k);
			// insert the vectors in the map
			for (int i = 0; i < n_points; i++) {
				int assigned = assigned_centroid.at(i);
				centroids_map.at(assigned).push_back(feature_vectors.at(i));
			}
			// for each centroid 
			for (int i = 0; i < k; i++) {
				// for each one of its dimenions
				for (int j = 0; j < (int)space_dim; j++) {
					vector<T> current_component;
					// parse through all of its assigned vectors in order to find the median
					for (int n = 0; n < (int)centroids_map.at(i).size(); n++) {
						current_component.push_back(centroids_map.at(i).at(n).at(j));
					}
					centroids.at(i).at(j) = our_math::median(current_component);
				}
			}
		}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, %r13
movslq (%rdi), %rsi
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0xa244
cmpl $0x0, 0x4(%r13)
movabsq $-0x5555555555555555, %rbp # imm = 0xAAAAAAAAAAAAAAAB
jle 0x92cd
xorl %ebx, %ebx
xorl %r14d, %r14d
movq 0x60(%r13), %rax
movq 0x68(%r13), %rdx
subq %rax, %rdx
sarq $0x2, %rdx
cmpq %r14, %rdx
jbe 0x94e9
movslq (%rax,%r14,4), %rax
movq 0x20(%rsp), %rcx
movq 0x28(%rsp), %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
imulq %rbp, %rdx
cmpq %rax, %rdx
jbe 0x94e6
movq 0x48(%r13), %rsi
movq 0x50(%r13), %rdx
subq %rsi, %rdx
sarq $0x3, %rdx
imulq %rbp, %rdx
cmpq %r14, %rdx
jbe 0x94e9
leaq (%rax,%rax,2), %rax
leaq (%rcx,%rax,8), %rdi
addq %rbx, %rsi
callq 0x35ec
incq %r14
movslq 0x4(%r13), %rax
addq $0x18, %rbx
cmpq %rax, %r14
jl 0x9257
cmpl $0x0, (%r13)
jle 0x949b
xorl %r15d, %r15d
movq %r13, 0x38(%rsp)
cmpl $0x0, 0x8(%r13)
jle 0x948b
leaq (%r15,%r15,2), %rbx
xorl %r14d, %r14d
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
movq 0x20(%rsp), %rax
movq 0x28(%rsp), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
imulq %rbp, %rdx
cmpq %r15, %rdx
jbe 0x94bc
movl $0x8, %r12d
xorl %r13d, %r13d
movq (%rax,%rbx,8), %rcx
movq 0x8(%rax,%rbx,8), %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
imulq %rbp, %rdx
movslq %edx, %rax
cmpq %rax, %r13
jge 0x93bc
cmpq %r13, %rdx
jbe 0x94b9
movq -0x8(%rcx,%r12), %rax
movq (%rcx,%r12), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq %r14, %rdx
jbe 0x94b4
leaq (%rax,%r14,8), %rdx
movq 0x8(%rsp), %rsi
cmpq 0x10(%rsp), %rsi
je 0x938a
movsd (%rdx), %xmm0
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rsp)
jmp 0x9392
movq %rsp, %rdi
callq 0x3662
incq %r13
movq 0x20(%rsp), %rax
movq 0x28(%rsp), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
imulq %rbp, %rdx
addq $0x18, %r12
cmpq %r15, %rdx
ja 0x9329
jmp 0x94bc
leaq 0x40(%rsp), %rdi
movq %rsp, %rsi
callq 0x3900
movq 0x40(%rsp), %rdi
movq 0x48(%rsp), %rdx
movq %rdx, %rcx
subq %rdi, %rcx
shrq $0x4, %rcx
movq %rdx, %rax
movslq %ecx, %r12
subq %rdi, %rax
je 0x9407
leaq (%rdi,%r12,8), %rsi
cmpq %rdx, %rsi
je 0x9407
sarq $0x3, %rax
bsrq %rax, %rcx
xorl $0x3f, %ecx
addl %ecx, %ecx
xorq $0x7e, %rcx
callq 0xa32b
movq 0x40(%rsp), %rdi
movq 0x48(%rsp), %rdx
subq %rdi, %rdx
sarq $0x3, %rdx
cmpq %r12, %rdx
jbe 0x94d5
movq 0x38(%rsp), %r13
movq 0x30(%r13), %rax
movq 0x38(%r13), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
imulq %rbp, %rdx
cmpq %r15, %rdx
jbe 0x94d2
movq (%rax,%rbx,8), %rcx
movq 0x8(%rax,%rbx,8), %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
cmpq %r14, %rdx
jbe 0x94cd
movsd (%rdi,%r12,8), %xmm0
movsd %xmm0, (%rcx,%r14,8)
testq %rdi, %rdi
je 0x946d
callq 0x2260
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x947b
callq 0x2260
incq %r14
movslq 0x8(%r13), %rax
cmpq %rax, %r14
jl 0x92f2
incq %r15
movslq (%r13), %rax
cmpq %rax, %r15
jl 0x92e0
leaq 0x20(%rsp), %rdi
callq 0xa2cc
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %r15
jmp 0x94bc
movq %r13, %r15
leaq 0x1e82(%rip), %rdi      # 0xb345
movq %r15, %rsi
xorl %eax, %eax
callq 0x2370
movq %r14, %r12
jmp 0x94d5
movq %r15, %r12
leaq 0x1e69(%rip), %rdi      # 0xb345
movq %r12, %rsi
xorl %eax, %eax
callq 0x2370
movq %rax, %r14
leaq 0x1e55(%rip), %rdi      # 0xb345
movq %r14, %rsi
xorl %eax, %eax
callq 0x2370
jmp 0x94fc
movq %rax, %rbx
jmp 0x952c
jmp 0x9505
jmp 0x951b
movq %rax, %rbx
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x951e
callq 0x2260
jmp 0x951e
jmp 0x951b
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x952c
callq 0x2260
leaq 0x20(%rsp), %rdi
callq 0xa2cc
movq %rbx, %rdi
callq 0x2450