-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLanguage.java
More file actions
45 lines (32 loc) · 957 Bytes
/
Language.java
File metadata and controls
45 lines (32 loc) · 957 Bytes
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
public class Language {
String name;
double[] dimensions ;
int type;
double distance;
public Language(double[] data, String name) {
this.name = name;
this.dimensions = new double[data.length];
this.dimensions = data;
}
public Language(double[] data) {
this.dimensions = new double[data.length];
this.dimensions = data;
}
public String findName(){
String ans;
for(Perceptron p : Main.perceptrony){
ans = p.checkLang(this.getDimensions(), p.name);
if(ans!=null){
return ans;
}
}
return null;
}
public String getName() {
return name;
}
public void setDistance(double d){this.distance=d;}
public double getDistance(){return this.distance;}
public double[] getDimensions(){return this.dimensions;}
public void setType(int t){this.type=t;}
}