Package org.evoludo.simulator.modules
Class ATBT.ATBTMap
Object
ATBTMap
- All Implemented Interfaces:
BasicTooltipProvider,HasPhase2D.Data2Phase
- Enclosing class:
ATBT
The class that defines the mapping of asymmetric
2×2 games onto
a 2D phase plane: fraction of cooperators along x-axis and fraction
of rich patches along y-axis.-
Constructor Summary
ConstructorsConstructorDescriptionATBTMap()Constructs a new map to translate between population states and the phase plane. -
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
-
ATBTMap
public ATBTMap()Constructs a new map to translate between population states and the phase plane.
-
-
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
-