mirror of
https://github.com/marcin-szczepanski/jFuzzyLogic.git
synced 2024-12-18 16:35:27 +01:00
JS - dodanie funkcji gaussa
This commit is contained in:
parent
d9b7260030
commit
5d4da97dda
Binary file not shown.
@ -66,4 +66,11 @@ public class MembershipFunctionGaussian extends MembershipFunctionContinuous {
|
|||||||
public String toStringFcl() {
|
public String toStringFcl() {
|
||||||
return "GAUSS " + parameters[0] + " " + parameters[1];
|
return "GAUSS " + parameters[0] + " " + parameters[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toStringJS() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append("\t\treturn Math.exp(-(x - " + parameters[0] + ") * (x - " + parameters[0] + ") / (2 * " + parameters[1] + " * " + parameters[1] + "));\n");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user