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 TypeMethodDescriptionbooleandata2Phase(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-axisbooleanphase2Data(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, waitMethods inherited from interface BasicTooltipProvider
getTooltipAtMethods inherited from interface HasPhase2D.Data2Phase
getMaxX, getMaxY, getMinX, getMinY, getTraitsX, getTraitsY, hasFixedAxes, hasMultitrait, hasSetTraits, reset, setFixedAxes, setTraits
-
Constructor Details
-
EcoPGGMap
public EcoPGGMap()
-
-
Method Details
-
data2Phase
Description copied from interface:HasPhase2D.Data2PhaseConvert data array to point on phase plane. Note:dataincludes time atnode[0]and should not be altered. Point on phase plane is returned in user coordinates.- Specified by:
data2Phasein interfaceHasPhase2D.Data2Phase- Parameters:
data- array of data to convertpoint- on phase plane- Returns:
trueupon successful completion of conversion
-
phase2Data
Description copied from interface:HasPhase2D.Data2PhaseConvert point on phase plane to data array.datacontains a copy of the last data point recorded in the buffer (excluding time).- Specified by:
phase2Datain interfaceHasPhase2D.Data2Phase- Parameters:
point- on phase plane to convert (in user coordinates)data- array of data- Returns:
trueupon successful completion of conversion
-
getXAxisLabel
Description copied from interface:HasPhase2D.Data2PhaseReturn custom label forx-axis- Specified by:
getXAxisLabelin interfaceHasPhase2D.Data2Phase- Returns:
x-axis label
-
getYAxisLabel
Description copied from interface:HasPhase2D.Data2PhaseReturn custom label fory-axis- Specified by:
getYAxisLabelin interfaceHasPhase2D.Data2Phase- Returns:
y-axis label
-
getTooltipAt
Description copied from interface:BasicTooltipProviderGet the tooltip at the scaled coordinates(x,y)with the origin in the lower left corner of the graph.- Specified by:
getTooltipAtin interfaceBasicTooltipProvider- Parameters:
x- thexcoordinatey- theycoordinate- Returns:
- the tooltip
-