Class Markers

Object
Markers

public class Markers extends Object
The class to manage customised markers for graphs.
Author:
Christoph Hauert
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final CLOption
    Command line option to mark points on graphs (ParaGraph, S3Graph, LineGraph and HistoGraph).
    (package private) ArrayList<double[]>
    The list of markers on graphs.
    (package private) Model
    The model that is using these markers.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Markers(Model model)
    Instantiate new population update for use in IBS models.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    addMarker(double[] aMark)
    Add marker to list of markers.
    boolean
    addMarker(double[] aMark, boolean filled)
    Add marker to list of markers.
    ArrayList<double[]>
    Get the list of markers.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • model

      Model model
      The model that is using these markers.
    • markers

      ArrayList<double[]> markers
      The list of markers on graphs. For example to mark fixed points.
    • clo

      public final CLOption clo
      Command line option to mark points on graphs (ParaGraph, S3Graph, LineGraph and HistoGraph). Very convenient to indicate fixed points
  • Constructor Details

    • Markers

      public Markers(Model model)
      Instantiate new population update for use in IBS models.
      Parameters:
      model - the model using this player update
  • Method Details

    • addMarker

      public boolean addMarker(double[] aMark)
      Add marker to list of markers. Markers are provided as double[] arrays to indicate special frequencies/densities. By default markers are shown as solid dots or lines, respectively.
      Parameters:
      aMark - the marker to add
      Returns:
      true if successfull
    • addMarker

      public boolean addMarker(double[] aMark, boolean filled)
      Add marker to list of markers. Markers are provided as double[] arrays to indicate special frequencies/densities. If filled==true, markers are shown as solid dots or lines, respectively and as open dots (or dashed lines), otherwise. This is useful, for example, to indicate the stability of equilibria.

      In multi-species modules the markers for each species are concatenated into a single array. The frequencies/densities of the marker for the first species are stored in aMark[0] through aMark[n1] where n1 denotes the number of traits in the first species. The current frequencies/densities of the second species are stored in aMark[n1+1] through aMark[n1+n2] where n2 denotes the number of traits in the second species, etc.

      Parameters:
      aMark - the marker to add
      filled - the flag to indicate whether the marker should be filled
      Returns:
      true if successfull
      See Also:
    • getMarkers

      public ArrayList<double[]> getMarkers()
      Get the list of markers. This serves to mark special values in different kinds of graphs.
      Returns:
      the list of markers