// File: /workspace/github_cpp_makefile_star2_O2/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 0x3140
movq %rax, 0x8(%rsp)
leaq 0x10(%rsp), %r12
leaq 0x80(%rsp), %rbp
xorl %r15d, %r15d
movl 0x58(%r14), %eax
cmpq %rax, %r15
jae 0xecfa
movl $0x170, %edi            # imm = 0x170
callq 0x3200
movq %rax, %r13
movq 0x8(%r14), %rsi
movl 0x10(%r14), %edx
movl 0x5c(%r14), %ecx
movq %rax, %rdi
callq 0x8c40
movq 0x60(%r14), %rax
movq %r13, (%rax,%r15,8)
movq 0x20(%r14), %rsi
movq %r12, %rdi
callq 0xf122
movq 0x60(%r14), %rax
movq (%rax,%r15,8), %rax
leaq -0x5f11(%rip), %rcx     # 0x8cc0
movq %rcx, 0x160(%rax)
andq $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,%r15,8), %rdi
movq %r12, %rbx
movq %r12, %rsi
callq 0xdeb0
movq 0x30(%r14), %rsi
movq 0x60(%r14), %rax
movq (%rax,%r15,8), %rdi
callq 0xdebc
movq 0x60(%r14), %rax
movq (%rax,%r15,8), %rdi
movq (%rdi), %rax
callq *(%rax)
movq 0x60(%r14), %rax
movq 0x68(%r14), %r12
movq (%rax,%r15,8), %rdi
callq 0xdec2
leaq 0x1(%r15), %r13
movq %r12, %rdi
leaq 0x4c20(%rip), %rsi      # 0x1386c
movl %r13d, %edx
movl %eax, %ecx
xorl %eax, %eax
callq 0x32a0
movq 0x60(%r14), %rax
movq 0x68(%r14), %rdi
movq (%rax,%r15,8), %rax
movl 0x15c(%rax), %edx
leaq 0x4c1c(%rip), %rsi      # 0x1388d
xorl %eax, %eax
callq 0x32a0
movq 0x8(%r14), %rsi
movq %rbp, %rdi
callq 0xfa38
movq 0x28(%r14), %rcx
leaq 0x28(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
movl %r13d, %edx
callq 0xed68
movq %rbp, %rdi
movq %r15, %rsi
callq 0x5906
movq %r15, %rdi
callq 0xfa56
movq 0x68(%r14), %r12
movq %rbp, %rdi
movsd 0x4353(%rip), %xmm0     # 0x13010
callq 0xfa78
movq %r12, %rdi
leaq 0x46dc(%rip), %rsi      # 0x133a8
movb $0x1, %al
callq 0x32a0
movq 0x68(%r14), %rsi
movq %rbp, %rdi
callq 0xfa60
movq %rbp, %rdi
callq 0xfa56
movq %rbx, %r12
movq %rbx, %rdi
callq 0x6886
movq %r13, %r15
jmp 0xeb80
callq 0x3140
subq 0x8(%rsp), %rax
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 %r13, %rdi
callq 0x3210
jmp 0xed5f
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0xfa56
jmp 0xed43
jmp 0xed40
jmp 0xed52
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
callq 0xfa56
jmp 0xed55
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x6886
movq %rbx, %rdi
callq 0x3330
nop