// File: /workspace/github_cpp_makefile_star2_O3/0asa[P]TTree-source/RandomForest.cpp
// Function: RandomForest::learn()
double RandomForest::learn() {
	clock_t clock_start = clock();
	for (int t = 0 ; t < nbtree ; ++t) {
		term[t] = new ClassicTree(db,nmin,k);
		std::vector<unsigned int> bsls = Sampler::bootstrap((*ls));
		term[t]->setLearnFonction(NOTBESTFIRST);
		term[t]->setLS(&bsls);
		term[t]->setAttCand(cand);
		term[t]->learn();
		fprintf(_treeinfo, "Tree %03d - Complexity : %03d - ",t+1,term[t]->getComplexity());
		// 09-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, 0x58(%r14)
je 0x119ca
leaq 0x80(%rsp), %rbx
leaq 0x28(%rsp), %r15
xorl %r12d, %r12d
movl $0x170, %edi            # imm = 0x170
callq 0x3200
movq %rax, %rbp
movq 0x8(%r14), %rsi
movl 0x10(%r14), %edx
movl 0x5c(%r14), %ecx
movq %rax, %rdi
callq 0xa068
movq 0x60(%r14), %rax
movq %rbp, (%rax,%r12,8)
movq 0x20(%r14), %rsi
leaq 0x10(%rsp), %r13
movq %r13, %rdi
callq 0x11e3c
movq 0x60(%r14), %rax
movq (%rax,%r12,8), %rax
leaq -0x7762(%rip), %rcx     # 0xa0ee
movq %rcx, 0x160(%rax)
movq $0x0, 0x168(%rax)
movabsq $0x4654534542544f4e, %rcx # imm = 0x4654534542544F4E
movq %rcx, 0x5c(%rax)
movabsq $0x54535249465453, %rcx # imm = 0x54535249465453
movq %rcx, 0x61(%rax)
movq 0x60(%r14), %rax
movq (%rax,%r12,8), %rdi
movq %r13, %rsi
callq 0x1057c
movq 0x30(%r14), %rsi
movq 0x60(%r14), %rax
movq (%rax,%r12,8), %rdi
callq 0x10588
movq 0x60(%r14), %rax
movq (%rax,%r12,8), %rdi
movq (%rdi), %rax
callq *(%rax)
movq 0x60(%r14), %rax
movq 0x68(%r14), %r13
movq (%rax,%r12,8), %rdi
callq 0x1058e
leaq 0x1(%r12), %rbp
movq %r13, %rdi
leaq 0x4f98(%rip), %rsi      # 0x16864
movl %ebp, %edx
movl %eax, %ecx
xorl %eax, %eax
callq 0x3290
movq 0x60(%r14), %rax
movq 0x68(%r14), %rdi
movq (%rax,%r12,8), %rax
movl 0x15c(%rax), %edx
leaq 0x4f95(%rip), %rsi      # 0x16885
xorl %eax, %eax
callq 0x3290
movq 0x8(%r14), %rsi
movq %rbx, %rdi
callq 0x12808
movq 0x28(%r14), %rcx
movq %r15, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x11a42
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 %r15, %rdi
callq 0x12826
movq 0x68(%r14), %r13
movq %rbx, %rdi
movsd 0x4697(%rip), %xmm0     # 0x16010
callq 0x12848
movq %r13, %rdi
leaq 0x4a20(%rip), %rsi      # 0x163a8
movb $0x1, %al
callq 0x3290
movq 0x68(%r14), %rsi
movq %rbx, %rdi
callq 0x12830
movq %rbx, %rdi
callq 0x12826
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x119ba
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x3210
incq %r12
movl 0x58(%r14), %eax
cmpq %rax, %r12
jb 0x11807
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
movq %rax, %rbx
movl $0x170, %esi            # imm = 0x170
movq %rbp, %rdi
jmp 0x11a35
jmp 0x11a20
jmp 0x119ff
movq %rax, %rbx
jmp 0x11a11
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x12826
leaq 0x80(%rsp), %rdi
callq 0x12826
jmp 0x11a23
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x11a3a
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x3210
movq %rbx, %rdi
callq 0x3320