-
Notifications
You must be signed in to change notification settings - Fork 4
/
innovation.cpp
46 lines (39 loc) · 993 Bytes
/
innovation.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#include "innovation.h"
using namespace NEAT;
Innovation::Innovation(int nin,int nout,double num1,double num2,int newid,double oldinnov) {
innovation_type=NEWNODE;
node_in_id=nin;
node_out_id=nout;
innovation_num1=num1;
innovation_num2=num2;
newnode_id=newid;
old_innov_num=oldinnov;
//Unused parameters set to zero
new_weight=0;
new_traitnum=0;
recur_flag=false;
}
Innovation::Innovation(int nin,int nout,double num1,double w,int t) {
innovation_type=NEWLINK;
node_in_id=nin;
node_out_id=nout;
innovation_num1=num1;
new_weight=w;
new_traitnum=t;
//Unused parameters set to zero
innovation_num2=0;
newnode_id=0;
recur_flag=false;
}
Innovation::Innovation(int nin,int nout,double num1,double w,int t,bool recur) {
innovation_type=NEWLINK;
node_in_id=nin;
node_out_id=nout;
innovation_num1=num1;
new_weight=w;
new_traitnum=t;
//Unused parameters set to zero
innovation_num2=0;
newnode_id=0;
recur_flag=recur;
}