public class COG
extends org.nlogo.api.DefaultReporter
Constructor and Description |
---|
COG() |
Modifier and Type | Method and Description |
---|---|
double |
continuousCOG(FuzzySet f)
Calculate the center of gravity of a continuous set.
|
double |
discreteCOG(PointSet f)
Calculate the center of gravity of a discrete set.
|
org.nlogo.api.Syntax |
getSyntax()
This method tells Netlogo the appropriate syntax of the primitive.
|
double |
piecewiseCOG(PointSet f)
Calculate the center of gravity of a piecewise linear set.
|
java.lang.Object |
report(org.nlogo.api.Argument[] arg0,
org.nlogo.api.Context arg1)
This method respond to the call from Netlogo and returns the center of
gravity of a fuzzy set.
|
public org.nlogo.api.Syntax getSyntax()
getSyntax
in interface org.nlogo.api.Primitive
getSyntax
in class org.nlogo.api.DefaultReporter
public java.lang.Object report(org.nlogo.api.Argument[] arg0, org.nlogo.api.Context arg1) throws org.nlogo.api.ExtensionException, org.nlogo.api.LogoException
arg0
- Arguments from Netlogo call, in this case a list.arg1
- Context of Netlogo when the call was done.org.nlogo.api.ExtensionException
org.nlogo.api.LogoException
public double piecewiseCOG(PointSet f)
f
- The piecewise linear set.public double continuousCOG(FuzzySet f)
f
- The continuous set.public double discreteCOG(PointSet f)
f
- The discrete set.