Class EcoPGG.EcoPGGMap

Object
EcoPGGMap
All Implemented Interfaces:
BasicTooltipProvider, HasPhase2D.Data2Phase
Enclosing class:
EcoPGG

public class EcoPGG.EcoPGGMap extends Object implements HasPhase2D.Data2Phase, BasicTooltipProvider
The map for translating the data of the ecological public goods game models into 2D phase plane representation.
  • Constructor Details

    • EcoPGGMap

      public EcoPGGMap()
  • Method Details

    • data2Phase

      public boolean data2Phase(double[] data, Point2D point)
      Description copied from interface: HasPhase2D.Data2Phase
      Convert data array to point on phase plane. Note: data includes time at node[0] and should not be altered. Point on phase plane is returned in user coordinates.
      Specified by:
      data2Phase in interface HasPhase2D.Data2Phase
      Parameters:
      data - array of data to convert
      point - on phase plane
      Returns:
      true upon successful completion of conversion
    • phase2Data

      public boolean phase2Data(Point2D point, double[] data)
      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 interface HasPhase2D.Data2Phase
      Parameters:
      point - on phase plane to convert (in user coordinates)
      data - array of data
      Returns:
      true upon successful completion of conversion
    • getXAxisLabel

      public String getXAxisLabel()
      Description copied from interface: HasPhase2D.Data2Phase
      Return custom label for x-axis
      Specified by:
      getXAxisLabel in interface HasPhase2D.Data2Phase
      Returns:
      x-axis label
    • getYAxisLabel

      public String getYAxisLabel()
      Description copied from interface: HasPhase2D.Data2Phase
      Return custom label for y-axis
      Specified by:
      getYAxisLabel in interface HasPhase2D.Data2Phase
      Returns:
      y-axis label
    • getTooltipAt

      public String getTooltipAt(double x, double y)
      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 interface BasicTooltipProvider
      Parameters:
      x - the x coordinate
      y - the y coordinate
      Returns:
      the tooltip