Class AbstractGeometry

Object
AbstractGeometry
Direct Known Subclasses:
AbstractLattice, AbstractNetwork, CompleteGeometry, DesarguesGeometry, DodekahedronGeometry, DynamicGeometry, FranklinGeometry, FruchtGeometry, HeawoodGeometry, IcosahedronGeometry, RandomDirectedGeometry, RandomGeometry, StarGeometry, StrongAmplifierGeometry, StrongSuppressorGeometry, SuperstarGeometry, TietzeGeometry, WellmixedGeometry, WheelGeometry

public abstract class AbstractGeometry extends Object
Abstract implementation of the population interaction and competition structures. Instances of AbstractGeometry describe neighbourhood graphs for IBS, PDE's and graphical representations, such as trait distributions in 1D or 2D.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) double
    Connectivity (average number of neighbors).
    (package private) static final int[]
    Empty link arrays used for well-mixed geometries and while allocating networks lazily.
    (package private) final EvoLudo
    The pacemaker of all models.
    (package private) GeometryFeatures
    Lazily computed summary statistics for the geometry.
    int[][]
    The array storing the neighbourhood of each node by listing the indices of nodes that connect to this one.
    protected boolean
    true if this geometry links different species/populations.
    (package private) boolean
    true if the network structure is regular (all nodes have the same number of neighbours).
    (package private) boolean
    true if rewiring should be applied.
    (package private) boolean
    Convenience flag denoting whether intra- and interspecific competitions are identical.
    (package private) boolean
    Flag indicating whether the network structure is undirected.
    (package private) boolean
    true if the network structure has been successfully initialized.
    int[]
    The array storing the number of incoming neighbours for each node.
    int[]
    The array storing the number of outgoing neighbours for each node.
    (package private) final Logger
    Logger for keeping track of and reporting events and issues.
    (package private) String
    Optional descriptive name.
    (package private) Network2D
    Local storage for the 2D representation of this graph.
    (package private) Network3D
    Local storage for the 3D representation of this graph.
    int[][]
    The array storing the neighbourhood of each node by listing the indices of nodes that this one connects to.
    (package private) double
    Probability for adding new links.
    (package private) double
    Probability for rewiring.
    (package private) int
    The number of nodes in the graph.
    (package private) String
    Optional CLI specification used to configure this geometry.
    (package private) GeometryType
    Current geometry type handled by this instance.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Create a new geometry scaffold linked to the given pacemaker.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Add directed links to network.
    void
    addEdgeAt(int nodea, int nodeb)
    Add edge (undirected link) by inserting a pair of directed links.
    void
    addLinkAt(int from, int to)
    Add a directed link from from to to, allocating storage as needed.
    boolean
    Add undirected links.
    protected void
    Allocate the memory necessary to store the network structure.
    final boolean
    Validate geometry parameters and adjust infeasible settings.
    private boolean
    Check consistency of in- and out-connections.
    private boolean
    checkMultiple(int[] degree, int[][] links, String type)
    Check for multiple connections in the given links.
    private boolean
    Check regularity of the graph.
    private boolean
    Check for self-connections (loops).
    protected boolean
    Hook for subclasses to implement geometry specific checks.
    private boolean
    Check undirected structure of the graph.
    void
    clearLinksFrom(int idx)
    Remove all outgoing links from node idx.
    void
    clearLinksTo(int idx)
    Remove all incoming links to node idx.
    Clone geometry.
    create(EvoLudo engine, String cli)
    Instantiate the requested geometry based on cli.
    create(EvoLudo engine, GeometryType type)
    Factory method for creating geometry instances by type.
    void
    Decode the geometry from the plist.
    Derive competition geometry from current (interaction) geometry for inter-species interactions with isSingle == true.
    static boolean
    displaySingle(AbstractGeometry interaction, AbstractGeometry competition)
    Checks whether a single graphical representation can be used for the interaction and competition graphs.
    Encode geometry as a plist string fragment.
    protected boolean
    enforceSize(int requiredSize)
    Ensure the geometry uses at least requiredSize nodes.
    boolean
     
    double
    Get the probability used when adding new links.
    double
    Get the average node degree (connectivity) configured for the geometry.
    Retrieve the name of the key for storing geometry in plist.
    Evaluate geometry.
    protected String
    Compose a human readable prefix for log messages.
    Retrieve the display name of the geometry (sans trailing structural suffixes such as ": Structure").
    Retrieve (and lazily create) the 2D representation associated with this geometry.
    Retrieve (and lazily create) the 3D representation associated with this geometry.
    double
    Get the probability used when rewiring existing links.
    int
    Report the current number of nodes contained in the geometry.
    Get the CLI specification string that configured this geometry.
    Get the current GeometryType that defines this structure.
    int
     
    private boolean
    hasNeigh(int src, int target, int[] neighs, int nNeigh, String dir)
    Helper that checks whether neighs contains src and logs an error if it does not.
    abstract void
    Initialise the geometry.
    boolean
    Check consistency of links.
    boolean
    Check if graph is connected.
    private boolean
    isGraphConnected(int node, boolean[] check)
    Depth-first traversal helper used to determine connectivity.
    boolean
    Check whether this geometry connects individuals from different populations.
    boolean
    Utility method to determine whether a given geometry type is a lattice.
    boolean
    isNeighborOf(int focal, int check)
    Check whether check is currently a neighbour of focal.
    boolean
    Check whether the geometry is regular (all nodes share the same degree).
    boolean
    Check if the geometry was modified by rewiring.
    boolean
    Check if a single geometry suffices for interaction and competition structures.
    boolean
    Convenience helper to check the geometry type.
    boolean
    Check whether all links are undirected.
    boolean
    Check if current geometry unique.
    boolean
    Re-parse the stored specification string.
    (package private) boolean
    parse(String spec)
    Parse geometry-specific CLI options.
    void
    removeEdgeAt(int nodea, int nodeb)
    Remove edge (undirected link) from nodea to nodeb.
    private void
    removeInLink(int from, int to)
    Remove an incoming link (directed) to node to from node from.
    void
    removeLinkAt(int from, int to)
    Remove a directed link from node from to node to.
    private void
    removeOutLink(int from, int to)
    Remove an outgoing link (directed) from node from to node to.
    void
    Add/rewire directed and undirected random links.
    boolean
    Rewire directed links.
    void
    rewireEdgeAt(int focal, int newneigh, int oldneigh)
    Rewire an undirected edge so that an edge formerly connecting focal and oldneigh now connects focal and newneigh.
    void
    rewireLinkAt(int from, int to, int prev)
    Rewire a directed link so that an edge formerly connecting from to prev now connects to to.
    protected void
    rewireUndirected(double prob)
    Rewire undirected links.
    void
    setAddwire(double probability)
    Sets the probability for adding links to the network.
    void
    setConnectivity(double connectivity)
    Sets the connectivity (average number of neighbors).
    void
    setInterspecies(boolean interspecies)
    Set whether this geometry links different populations.
    void
    Set a descriptive name for this geometry (used in UI/tooltips).
    void
    Store the 2D network representation.
    void
    Store the 3D network representation.
    void
    setRewire(double probability)
    Sets the probability for rewiring existing links.
    void
    setSingle(boolean single)
    Sets whether a single geometry is used for both interaction and competition graphs.
    boolean
    setSize(int size)
    Set the size of the network.
    protected void
    Update the geometry GeometryType.
    (package private) boolean
    swapEdges(int a, int an, int b, int bn)
    Utility method to swap edges (undirected links) between nodes: change link a-an to a-bn and b-bn to b-an.
    Get the usage description for the command line option --geometry.
    private void
    Ensure rewiring parameters are feasible for the current connectivity and adjust them if needed.
    protected void
    warn(String message)
    Log a warning message using the geometry-conditioned label.

    Methods inherited from class Object

    finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • engine

      final EvoLudo engine
      The pacemaker of all models. Interface with the outside world.
    • logger

      final Logger logger
      Logger for keeping track of and reporting events and issues.
    • network2D

      Network2D network2D
      Local storage for the 2D representation of this graph.
    • network3D

      Network3D network3D
      Local storage for the 3D representation of this graph.
    • specs

      String specs
      Optional CLI specification used to configure this geometry.
    • name

      String name
      Optional descriptive name.
    • type

      Current geometry type handled by this instance.
    • size

      int size
      The number of nodes in the graph.
    • isUndirected

      boolean isUndirected
      Flag indicating whether the network structure is undirected.
    • isRegular

      boolean isRegular
      true if the network structure is regular (all nodes have the same number of neighbours).
    • isRewired

      boolean isRewired
      true if rewiring should be applied.
    • isInterspecies

      protected boolean isInterspecies
      true if this geometry links different species/populations.
    • features

      Lazily computed summary statistics for the geometry.
    • isValid

      boolean isValid
      true if the network structure has been successfully initialized.
    • isSingle

      boolean isSingle
      Convenience flag denoting whether intra- and interspecific competitions are identical.
    • connectivity

      double connectivity
      Connectivity (average number of neighbors).
    • pRewire

      double pRewire
      Probability for rewiring.
    • pAddwire

      double pAddwire
      Probability for adding new links.
    • in

      public int[][] in
      The array storing the neighbourhood of each node by listing the indices of nodes that connect to this one.
    • out

      public int[][] out
      The array storing the neighbourhood of each node by listing the indices of nodes that this one connects to.
    • kin

      public int[] kin
      The array storing the number of incoming neighbours for each node.
    • kout

      public int[] kout
      The array storing the number of outgoing neighbours for each node.
  • Constructor Details

    • AbstractGeometry

      protected AbstractGeometry(EvoLudo engine)
      Create a new geometry scaffold linked to the given pacemaker.
      Parameters:
      engine - the EvoLudo engine coordinating simulations
  • Method Details

    • create

      public static AbstractGeometry create(EvoLudo engine, String cli)
      Instantiate the requested geometry based on cli. Parsing of geometry specific arguments is left to the created instance via parse(String).
      Parameters:
      engine - the EvoLudo engine providing module/CLI metadata
      cli - the command line style geometry descriptor
      Returns:
      the instantiated geometry (arguments not yet parsed)
    • create

      public static AbstractGeometry create(EvoLudo engine, GeometryType type)
      Factory method for creating geometry instances by type.
      Parameters:
      engine - pacemaker used by the geometry
      type - geometry type to instantiate
      Returns:
      the instantiated geometry
    • deriveCompetitionGeometry

      public AbstractGeometry deriveCompetitionGeometry()
      Derive competition geometry from current (interaction) geometry for inter-species interactions with isSingle == true. This clones the interaction geometry and simply removes links to self, which corresponds to interactions with individuals at the same location in the other species.
      Returns:
      the derived competition geometry
    • setName

      public void setName(String name)
      Set a descriptive name for this geometry (used in UI/tooltips).
      Parameters:
      name - the human-readable name
    • getName

      public String getName()
      Retrieve the display name of the geometry (sans trailing structural suffixes such as ": Structure").
      Returns:
      the display name or the empty string for anonymous structures
    • getEncodeKey

      public String getEncodeKey()
      Retrieve the name of the key for storing geometry in plist.
      Returns:
      the plist key
    • getType

      public GeometryType getType()
      Get the current GeometryType that defines this structure.
      Returns:
      the current geometry GeometryType
    • setType

      protected void setType(GeometryType type)
      Update the geometry GeometryType.
      Parameters:
      type - the new type
    • setNetwork2D

      public void setNetwork2D(Network2D net)
      Store the 2D network representation.
      Parameters:
      net - the 2D network
    • getNetwork2D

      public Network2D getNetwork2D()
      Retrieve (and lazily create) the 2D representation associated with this geometry.
      Returns:
      the stored 2D network representation (may be null)
    • setNetwork3D

      public void setNetwork3D(Network3D net)
      Store the 3D network representation.
      Parameters:
      net - the 3D network
    • getNetwork3D

      public Network3D getNetwork3D()
      Retrieve (and lazily create) the 3D representation associated with this geometry.
      Returns:
      the stored 3D network representation (may be null)
    • displaySingle

      public static boolean displaySingle(AbstractGeometry interaction, AbstractGeometry competition)
      Checks whether a single graphical representation can be used for the interaction and competition graphs. Two distinct graphical representations are generally required if the two graphs differ but not if they both refer to the same lattice structure even if connectivities or boundary conditions are different.

      Examples:

      A single graphical representation is adequate:
      1. if the interaction and competition graphs are identical,
      2. if both the interaction and competition graphs are lattices, even if the boundary conditions or the connectivities are different,
      3. but not if the interaction and competition graphs are separate instances of the same random structure, e.g. random regular graphs.

      Requirements/notes:

      1. Tooltips need to be careful to report the different graphs and neighborhoods properly.
      Parameters:
      interaction - the interaction geometry (required)
      competition - the competition geometry (optional)
      Returns:
      true if a single representation can be reused for both structures
    • getSpecs

      public String getSpecs()
      Get the CLI specification string that configured this geometry.
      Returns:
      the CLI specification string that configured this geometry, or null
    • parse

      boolean parse(String spec)
      Parse geometry-specific CLI options.
      Parameters:
      spec - the argument string without the geometry key
      Returns:
      true if parsing succeeded, false if invalid
    • parse

      public boolean parse()
      Re-parse the stored specification string.
      Returns:
      true if parsing succeeded
    • setSize

      public boolean setSize(int size)
      Set the size of the network.
      Parameters:
      size - the desired number of nodes
      Returns:
      true if the size changed (requiring a reset)
    • getSize

      public int getSize()
      Report the current number of nodes contained in the geometry.
      Returns:
      the number of nodes in the network
    • isType

      public boolean isType(GeometryType type)
      Convenience helper to check the geometry type.
      Parameters:
      type - the type to compare to
      Returns:
      true if getType() matches type
    • setRewire

      public void setRewire(double probability)
      Sets the probability for rewiring existing links.
      Parameters:
      probability - rewiring probability
    • getRewire

      public double getRewire()
      Get the probability used when rewiring existing links.
      Returns:
      the rewiring probability
    • setAddwire

      public void setAddwire(double probability)
      Sets the probability for adding links to the network.
      Parameters:
      probability - link-addition probability
    • getAddwire

      public double getAddwire()
      Get the probability used when adding new links.
      Returns:
      the link-addition probability
    • isRewired

      public boolean isRewired()
      Check if the geometry was modified by rewiring.
      Returns:
      true if the geometry has been rewired.
    • setSingle

      public void setSingle(boolean single)
      Sets whether a single geometry is used for both interaction and competition graphs.
      Parameters:
      single - true if both graphs are identical
    • isSingle

      public boolean isSingle()
      Check if a single geometry suffices for interaction and competition structures.
      Returns:
      true if a single geometry suffices for interaction and competition structures
    • setConnectivity

      public void setConnectivity(double connectivity)
      Sets the connectivity (average number of neighbors).
      Parameters:
      connectivity - average degree
    • getConnectivity

      public double getConnectivity()
      Get the average node degree (connectivity) configured for the geometry.
      Returns:
      the current connectivity (average degree)
    • isUndirected

      public boolean isUndirected()
      Check whether all links are undirected.
      Returns:
      true if this geometry is undirected.
    • isRegular

      public boolean isRegular()
      Check whether the geometry is regular (all nodes share the same degree).
      Returns:
      true if this geometry is regular (all nodes have identical degree).
    • check

      public final boolean check()
      Validate geometry parameters and adjust infeasible settings.
      Returns:
      true if adjustments require a reset
    • checkSettings

      protected boolean checkSettings()
      Hook for subclasses to implement geometry specific checks.
      Returns:
      true if adjustments require a reset
    • validateRewiring

      private void validateRewiring()
      Ensure rewiring parameters are feasible for the current connectivity and adjust them if needed.
    • enforceSize

      protected boolean enforceSize(int requiredSize)
      Ensure the geometry uses at least requiredSize nodes.
      Parameters:
      requiredSize - the minimum allowed size
      Returns:
      true if enforcing the size changed the network
    • warn

      protected void warn(String message)
      Log a warning message using the geometry-conditioned label.
      Parameters:
      message - the message to log
    • getLabel

      protected String getLabel()
      Compose a human readable prefix for log messages.
      Returns:
      the label to prepend to log output
    • alloc

      protected void alloc()
      Allocate the memory necessary to store the network structure.
    • getFeatures

      public GeometryFeatures getFeatures()
      Evaluate geometry. Convenience method to set frequently used quantities such as minIn, maxOut, avgTot etc.
      Returns:
      cached or freshly computed GeometryFeatures
    • isLattice

      public boolean isLattice()
      Utility method to determine whether a given geometry type is a lattice.
      Returns:
      true if getType() is lattice, false otherwise.
    • isUnique

      public boolean isUnique()
      Check if current geometry unique. Only unique geomteries need to be encoded.

      Requirements/notes:

      1. Lattices etc. are not unique because they can be identically recreated.
      2. Complete graphs, stars, wheels, etc. are not unique.
      3. All geometries involving random elements are unique.
      4. All rewired geometries are unique.
      5. Hierarchical geometries require recursive checks of uniqueness.
      Returns:
      true if geometry is unique
    • isGraphConnected

      public boolean isGraphConnected()
      Check if graph is connected.
      Returns:
      true if graph is connected
    • isGraphConnected

      private boolean isGraphConnected(int node, boolean[] check)
      Depth-first traversal helper used to determine connectivity.
      Parameters:
      node - node to visit
      check - bookkeeping array marking visited nodes
      Returns:
      true if all nodes have been visited
    • isInterspecies

      public boolean isInterspecies()
      Check whether this geometry connects individuals from different populations.
      Returns:
      true if this geometry links two different populations.
    • setInterspecies

      public void setInterspecies(boolean interspecies)
      Set whether this geometry links different populations.
      Parameters:
      interspecies - true for inter-species interactions
    • rewire

      public void rewire()
      Add/rewire directed and undirected random links.

      Requirements/notes:

      None.
      See Also:
    • rewireUndirected

      protected void rewireUndirected(double prob)
      Rewire undirected links.

      Requirements/notes:

      1. Requires an undirected graph.
      2. Rewiring preserves connectivity of all nodes.
      3. Resulting graph obviously remains undirected.
      4. The number of rewired links is \(N_\text{rewired}=\min {N_\text{links}, N_\text{links} \log(1-p_\text{undir})}\), i.e. at most the number undirected links in the graph. Thus, the expected fraction of original links rewired at most an \(1-1/e\) (or \(~63%\)).
      5. Any rewiring attempts that disconnect the graph are reverted (but still count towards the number of rewired links to prevent deadlocks in graphs with low connectivity).
      Parameters:
      prob - the probability of rewiring an undirected link
    • swapEdges

      boolean swapEdges(int a, int an, int b, int bn)
      Utility method to swap edges (undirected links) between nodes: change link a-an to a-bn and b-bn to b-an.

      Requirements/notes:

      Equivalent to invoking rewireEdgeAt(a, bn, an); followed by rewireEdgeAt(b, an, bn); but avoids the additional allocations of those helper methods.
      Parameters:
      a - the first node
      an - the neighbour of a to replace
      b - the second node
      bn - the neighbour of b to replace
      Returns:
      true if the swap succeeded
    • addUndirected

      public boolean addUndirected()
      Add undirected links.

      Requirements/notes:

      The number of links added is \(N_\text{add}=N_\text{links} p_\text{undir}\).
      Returns:
      true if adding of undirected links successfult
    • rewireDirected

      public boolean rewireDirected()
      Rewire directed links.

      Requirements/notes:

      1. Only undirected graphs are guaranteed to remain connected.
      2. Resulting graph is obviously directed (even if original was undirected).
      3. Rewiring preserves connectivity of all nodes (both inlinks and outlinks).
      4. The number of rewired links is \(N_\text{rewired}=\min {N_\text{links}, N_\text{links} \log(1-p_\text{dir})}\), i.e. at most the number directed links in the graph. Thus, at most an expected fraction of \(1-1/e\) (or \(~63%\)) of original links get rewired.
      5. ToDo: Rewrite similar to rewireUndirected().
      Returns:
      true if rewiring succeeded
    • addDirected

      public boolean addDirected()
      Add directed links to network.

      Requirements/notes:

      The number of links added is \(N_\text{add}=N_\text{links} p_\text{dir}\).
      Returns:
      true if adding links succeeded
    • addEdgeAt

      public void addEdgeAt(int nodea, int nodeb)
      Add edge (undirected link) by inserting a pair of directed links.
      Parameters:
      nodea - the index of the first node
      nodeb - the index of the second node
    • addLinkAt

      public void addLinkAt(int from, int to)
      Add a directed link from from to to, allocating storage as needed.

      Requirements/notes:

      1. Allocates additional memory for adjacency lists as needed.
      2. Marks the geometry as requiring recomputation of statistics (via getFeatures()) before cached values are used again.
      Parameters:
      from - the source node index
      to - the destination node index
    • removeEdgeAt

      public void removeEdgeAt(int nodea, int nodeb)
      Remove edge (undirected link) from nodea to nodeb. The convenience method simply removes the directed link in both directions.
      Parameters:
      nodea - the index of the first node
      nodeb - the index of the second node
    • removeLinkAt

      public void removeLinkAt(int from, int to)
      Remove a directed link from node from to node to. Statistics are not updated immediately; call getFeatures() afterwards if fresh metrics are required.
      Parameters:
      from - the index of the first node
      to - the index of the second node
    • clearLinksFrom

      public void clearLinksFrom(int idx)
      Remove all outgoing links from node idx. Memory is retained for potential reuse.
      Parameters:
      idx - the index of the node whose outgoing links should be removed
    • clearLinksTo

      public void clearLinksTo(int idx)
      Remove all incoming links to node idx. Memory is retained for potential reuse.
      Parameters:
      idx - the index of the node whose incoming links should be removed
    • removeInLink

      private void removeInLink(int from, int to)
      Remove an incoming link (directed) to node to from node from. Does not shrink the backing arrays.
      Parameters:
      from - the node that previously pointed to to
      to - the node that received the incoming edge
    • removeOutLink

      private void removeOutLink(int from, int to)
      Remove an outgoing link (directed) from node from to node to. Does not shrink the backing arrays.
      Parameters:
      from - the node whose outgoing edge should be removed
      to - the neighbor to disconnect from from
    • rewireLinkAt

      public void rewireLinkAt(int from, int to, int prev)
      Rewire a directed link so that an edge formerly connecting from to prev now connects to to. Statistics are not updated until getFeatures() is called to recompute them.
      Parameters:
      from - the node whose outgoing link should change
      to - the new neighbour
      prev - the previous neighbour to disconnect
    • rewireEdgeAt

      public void rewireEdgeAt(int focal, int newneigh, int oldneigh)
      Rewire an undirected edge so that an edge formerly connecting focal and oldneigh now connects focal and newneigh.
      Parameters:
      focal - the node whose neighbour should change
      newneigh - the new neighbour
      oldneigh - the previous neighbour to disconnect
    • isNeighborOf

      public boolean isNeighborOf(int focal, int check)
      Check whether check is currently a neighbour of focal.
      Parameters:
      focal - the node whose adjacency list to scan
      check - the node to test for adjacency
      Returns:
      true if check occurs among focal's outgoing links
    • init

      public abstract void init()
      Initialise the geometry.
    • usage

      public String usage()
      Get the usage description for the command line option --geometry.
      Returns:
      the usage description
    • isConsistent

      public boolean isConsistent()
      Check consistency of links.

      Requirements/notes:

      1. Self connections are unacceptable.
      2. Double links between nodes are unacceptable.
      3. For undirected networks every outgoing link must correspond to an incoming link.
      Returns:
      true if check succeeded
    • checkMultiple

      private boolean checkMultiple(int[] degree, int[][] links, String type)
      Check for multiple connections in the given links.
      Parameters:
      degree - the degree of each node
      links - the adjacency list
      type - the type of connection ("in" or "out")
      Returns:
      true if no multiple connections found
    • checkInOut

      private boolean checkInOut()
      Check consistency of in- and out-connections. Every in-connection must be balanced by a corresponding out-connection and vice versa.
      Returns:
      true if all connections are consistent
    • checkSelfing

      private boolean checkSelfing()
      Check for self-connections (loops).
      Returns:
      true if no self-connections found
    • checkRegular

      private boolean checkRegular()
      Check regularity of the graph.
      Returns:
      true if the graph is regular
    • checkUndirected

      private boolean checkUndirected()
      Check undirected structure of the graph. Every outgoing link must be balanced by a corresponding incoming link and vice versa.
      Returns:
      true if the graph is undirected
    • hasNeigh

      private boolean hasNeigh(int src, int target, int[] neighs, int nNeigh, String dir)
      Helper that checks whether neighs contains src and logs an error if it does not.
      Parameters:
      src - the node whose reciprocal connection is required
      target - the node whose adjacency list is being inspected
      neighs - adjacency list of target
      nNeigh - number of valid entries in neighs
      dir - textual description of the direction being verified
      Returns:
      true if a reciprocal connection is present
    • clone

      public AbstractGeometry clone()
      Clone geometry.

      Requirements/notes:

      1. Overrides clone() in Object but conflicts with GWT's aversion to clone()ing...
      2. Remove @SuppressWarnings("all") to ensure that no other issues crept in when modifying method.
      Overrides:
      clone in class Object
      Returns:
      clone of geometry
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • encodeGeometry

      public String encodeGeometry()
      Encode geometry as a plist string fragment.
      Returns:
      the geometry encoded as a plist
      See Also:
    • decodeGeometry

      public void decodeGeometry(Plist plist)
      Decode the geometry from the plist. The structure is encoded in map which provides array of neighbor indices for each individual index.

      Requirements/notes:

      The population (including its geometry/geometries) must already have been initialized. This only restores a particular (unique) geometry.
      Parameters:
      plist - the plist encoding the geometry
      See Also: