// File: /workspace/github_cpp_makefile_star2_O3/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 0x3130
movq %rax, 0x8(%rsp)
cmpl $0x0, 0x98(%r14)
je 0x1226f
leaq 0x80(%r14), %r15
leaq 0x80(%rsp), %rbp
xorl %ebx, %ebx
movq 0xdf60(%rip), %rax      # 0x1ffd8
movq (%rax), %rdi
leaq 0x1(%rbx), %r12
leaq 0x47af(%rip), %rsi      # 0x16835
movl %r12d, %edx
xorl %eax, %eax
callq 0x3290
movl $0xa0, %edi
callq 0x3200
movq %rax, %r13
movq 0x8(%r14), %rsi
movl 0xa8(%r14), %edx
movl 0x10(%r14), %ecx
movq %rax, %rdi
callq 0x8194
movq 0xa0(%r14), %rax
movq %r13, (%rax,%rbx,8)
movq 0xa0(%r14), %rax
movq (%rax,%rbx,8), %rdi
movl 0x5c(%r14), %eax
movl %eax, 0x5c(%rdi)
movq %r15, %rsi
callq 0xf460
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), %r13
movq %r13, %rdi
callq 0x11e3c
movq 0xa0(%r14), %rax
movq (%rax,%rbx,8), %rdi
movq %r13, %rsi
callq 0x1057c
movq 0x30(%r14), %rsi
movq 0xa0(%r14), %rax
movq (%rax,%rbx,8), %rdi
callq 0x10588
movq 0xa0(%r14), %rax
movq (%rax,%rbx,8), %rdi
movq (%rdi), %rax
callq *(%rax)
movq 0xa0(%r14), %rax
movq 0xb0(%r14), %r13
movq (%rax,%rbx,8), %rdi
callq 0x1058e
movq %r13, %rdi
leaq 0x4709(%rip), %rsi      # 0x16864
movl %r12d, %edx
movl %eax, %ecx
xorl %eax, %eax
callq 0x3290
movq 0xa0(%r14), %rax
movq 0xb0(%r14), %rdi
movq (%rax,%rbx,8), %rax
movl 0x9c(%rax), %edx
leaq 0x46ff(%rip), %rsi      # 0x16885
xorl %eax, %eax
callq 0x3290
movq 0x8(%r14), %rsi
movq %rbp, %rdi
callq 0x12808
movq 0x28(%r14), %rcx
leaq 0x28(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
movl %r12d, %edx
callq 0x122e8
movq 0x28(%rsp), %rax
movq %rax, 0x80(%rsp)
leaq 0x88(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x73dc
leaq 0xa0(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x74ca
movl 0x60(%rsp), %eax
movl %eax, 0xb8(%rsp)
leaq 0xc0(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x75b6
movq %rbx, %rdi
callq 0x12826
movq 0xb0(%r14), %r13
movq %rbp, %rdi
movsd 0x3df8(%rip), %xmm0     # 0x16010
callq 0x12848
movq %r13, %rdi
leaq 0x4181(%rip), %rsi      # 0x163a8
movb $0x1, %al
callq 0x3290
movq 0xb0(%r14), %rsi
movq %rbp, %rdi
callq 0x12830
movq %rbp, %rdi
callq 0x12826
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x1225c
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x3210
movl 0x98(%r14), %eax
movq %r12, %rbx
cmpq %rax, %r12
jb 0x12071
callq 0x3130
subq 0x8(%rsp), %rax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x122a4
jmp 0x122c5
movq %rax, %rbx
movl $0xa0, %esi
movq %r13, %rdi
jmp 0x122da
movq %rax, %rbx
jmp 0x122b6
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x12826
leaq 0x80(%rsp), %rdi
callq 0x12826
jmp 0x122c8
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x122df
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x3210
movq %rbx, %rdi
callq 0x3320
nop