Package org.evoludo.simulator.modules
Class EcoPGG.EcoPGGMap
Object
EcoPGGMap
- All Implemented Interfaces:
BasicTooltipProvider
,HasPhase2D.Data2Phase
- Enclosing class:
EcoPGG
The map for translating the data of the ecological public goods game models
into 2D phase plane representation.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
data2Phase
(double[] data, Point2D point) Convert data array to point on phase plane.getTooltipAt
(double x, double y) Get the tooltip at the scaled coordinates(x,y)
with the origin in the lower left corner of the graph.Return custom label forx
-axisReturn custom label fory
-axisboolean
phase2Data
(Point2D point, double[] data) Convert point on phase plane to data array.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface BasicTooltipProvider
getTooltipAt
Methods inherited from interface HasPhase2D.Data2Phase
getMaxX, getMaxY, getMinX, getMinY, getTraitsX, getTraitsY, hasFixedAxis, hasMultitrait, hasSetTraits, reset, setTraits
-
Constructor Details
-
EcoPGGMap
public EcoPGGMap()
-
-
Method Details
-
data2Phase
Description copied from interface:HasPhase2D.Data2Phase
Convert data array to point on phase plane. Note:data
includes time atnode[0]
and should not be altered. Point on phase plane is returned in user coordinates.- Specified by:
data2Phase
in interfaceHasPhase2D.Data2Phase
- Parameters:
data
- array of data to convertpoint
- on phase plane- Returns:
true
upon successful completion of conversion
-
phase2Data
Description copied from interface:HasPhase2D.Data2Phase
Convert point on phase plane to data array.data
contains a copy of the last data point recorded in the buffer (excluding time).- Specified by:
phase2Data
in interfaceHasPhase2D.Data2Phase
- Parameters:
point
- on phase plane to convert (in user coordinates)data
- array of data- Returns:
true
upon successful completion of conversion
-
getXAxisLabel
Description copied from interface:HasPhase2D.Data2Phase
Return custom label forx
-axis- Specified by:
getXAxisLabel
in interfaceHasPhase2D.Data2Phase
- Returns:
x
-axis label
-
getYAxisLabel
Description copied from interface:HasPhase2D.Data2Phase
Return custom label fory
-axis- Specified by:
getYAxisLabel
in interfaceHasPhase2D.Data2Phase
- Returns:
y
-axis label
-
getTooltipAt
Description copied from interface:BasicTooltipProvider
Get the tooltip at the scaled coordinates(x,y)
with the origin in the lower left corner of the graph.- Specified by:
getTooltipAt
in interfaceBasicTooltipProvider
- Parameters:
x
- thex
coordinatey
- they
coordinate- Returns:
- the tooltip
-