// File: /workspace/github_cpp_makefile_star2_O2/0asa[P]TTree-source/RandomTTForest.cpp
// Function: RandomTTForest::learn()
double RandomTTForest::learn() {
	clock_t clock_start = clock();
	for (int t = 0 ; t < nbtree ; ++t) {
		fprintf(stderr, "# TTree %3d ",t+1);
		term[t] = new ClassicNodeTree((BlockDB*)db,k, nmin);
		term[t]->setKint(kint);
		//term[t]->setMaxComplexity(2);
		term[t]->setGroupCand(groupcand);
		term[t]->setInternalComp(internalComp);
		term[t]->setTreeType(treeType);
		std::vector<unsigned int> bsls = Sampler::bootstrap((*ls));
		term[t]->setLS(&bsls);
		term[t]->setAttCand(cand);
		term[t]->learn();
		fprintf(_treeinfo, "Tree %03d - Complexity : %03d - ",t+1,term[t]->getComplexity());
		// 27-07-2012
		fprintf(_treeinfo, "MaxDepth : %03d - ",term[t]->getMaxDepth());
		Result result(db);
		result = test(t+1,ts);
		fprintf(_treeinfo,"Error rate : %f %%\n", result.getErrorRate());
		result.printProb(_treeinfo);
	}
	
	return (clock() - clock_start);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rdi, %r14
callq 0x3140
movq %rax, (%rsp)
leaq 0x80(%r14), %rax
movq %rax, 0x8(%rsp)
leaq 0x80(%rsp), %rbp
leaq 0x28(%rsp), %r12
xorl %ebx, %ebx
movl 0x98(%r14), %eax
cmpq %rax, %rbx
jae 0xf506
movq 0xec6b(%rip), %rax      # 0x1dfd8
movq (%rax), %rdi
leaq 0x1(%rbx), %r13
leaq 0x44c2(%rip), %rsi      # 0x1383d
movl %r13d, %edx
xorl %eax, %eax
callq 0x32a0
movl $0xa0, %edi
callq 0x3200
movq %rax, %r15
movq 0x8(%r14), %rsi
movl 0xa8(%r14), %edx
movl 0x10(%r14), %ecx
movq %rax, %rdi
callq 0x7394
movq 0xa0(%r14), %rax
movq %r15, (%rax,%rbx,8)
movq 0xa0(%r14), %rax
movq (%rax,%rbx,8), %rdi
movl 0x5c(%r14), %eax
movl %eax, 0x5c(%rdi)
movq 0x8(%rsp), %rsi
callq 0xcfd0
movq 0xa0(%r14), %rax
movq (%rax,%rbx,8), %rax
movl 0x58(%r14), %ecx
movl %ecx, 0x58(%rax)
movl 0x60(%r14), %ecx
movl %ecx, 0x60(%rax)
movq 0x20(%r14), %rsi
leaq 0x10(%rsp), %r15
movq %r15, %rdi
callq 0xf122
movq 0xa0(%r14), %rax
movq (%rax,%rbx,8), %rdi
movq %r15, %rsi
callq 0xdeb0
movq 0x30(%r14), %rsi
movq 0xa0(%r14), %rax
movq (%rax,%rbx,8), %rdi
callq 0xdebc
movq 0xa0(%r14), %rax
movq (%rax,%rbx,8), %rdi
movq (%rdi), %rax
callq *(%rax)
movq 0xa0(%r14), %rax
movq 0xb0(%r14), %r15
movq (%rax,%rbx,8), %rdi
callq 0xdec2
movq %r15, %rdi
leaq 0x441a(%rip), %rsi      # 0x1386c
movl %r13d, %edx
movl %eax, %ecx
xorl %eax, %eax
callq 0x32a0
movq 0xa0(%r14), %rax
movq 0xb0(%r14), %rdi
movq (%rax,%rbx,8), %rax
movl 0x9c(%rax), %edx
leaq 0x4410(%rip), %rsi      # 0x1388d
xorl %eax, %eax
callq 0x32a0
movq 0x8(%r14), %rsi
movq %rbp, %rdi
callq 0xfa38
movq 0x28(%r14), %rcx
movq %r12, %rdi
movq %r14, %rsi
movl %r13d, %edx
callq 0xf572
movq %rbp, %rdi
movq %r12, %rsi
callq 0x5906
movq %r12, %rdi
callq 0xfa56
movq 0xb0(%r14), %r15
movq %rbp, %rdi
movsd 0x3b49(%rip), %xmm0     # 0x13010
callq 0xfa78
movq %r15, %rdi
leaq 0x3ed2(%rip), %rsi      # 0x133a8
movb $0x1, %al
callq 0x32a0
movq 0xb0(%r14), %rsi
movq %rbp, %rdi
callq 0xfa60
movq %rbp, %rdi
callq 0xfa56
leaq 0x10(%rsp), %rdi
callq 0x6886
movq %r13, %rbx
jmp 0xf356
callq 0x3140
subq (%rsp), %rax
cvtsi2sd %rax, %xmm0
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xf54b
jmp 0xf55d
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0xfa56
jmp 0xf54e
movq %rax, %rbx
movl $0xa0, %esi
movq %r15, %rdi
callq 0x3210
jmp 0xf56a
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
callq 0xfa56
jmp 0xf560
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x6886
movq %rbx, %rdi
callq 0x3330