Class LinearGeometry
Object
AbstractGeometry
AbstractLattice
LinearGeometry
Linear (1D lattice) geometry that supports asymmetric neighbourhoods and
optional fixed boundaries.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intDifference between the number of neighbours on the left vs right.Fields inherited from class AbstractLattice
fixedBoundaryFields inherited from class AbstractGeometry
connectivity, EMPTY_LINKS, engine, features, in, isInterspecies, isRegular, isRewired, isSingle, isUndirected, isValid, kin, kout, logger, name, network2D, network3D, out, pAddwire, pRewire, size, specs, type -
Constructor Summary
ConstructorsConstructorDescriptionLinearGeometry(EvoLudo engine) Create a linear (1D lattice) geometry attached to the given engine. -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanHook for subclasses to implement geometry specific checks.clone()Clone geometry.booleanintGet the current left-right neighbour difference.inthashCode()voidinit()Generates a linear chain (1D lattice).booleanParse geometry-specific CLI options.voidsetLinearAsymmetry(int asymmetry) Set the left-right neighbour difference.Methods inherited from class AbstractLattice
isFixedBoundary, setFixedBoundary, stripBoundaryMethods inherited from class AbstractGeometry
addDirected, addEdgeAt, addLinkAt, addUndirected, alloc, check, clearLinksFrom, clearLinksTo, create, create, decodeGeometry, deriveCompetitionGeometry, displaySingle, encodeGeometry, enforceSize, getAddwire, getConnectivity, getEncodeKey, getFeatures, getLabel, getName, getNetwork2D, getNetwork3D, getRewire, getSize, getSpecs, getType, isConsistent, isGraphConnected, isInterspecies, isLattice, isNeighborOf, isRegular, isRewired, isSingle, isType, isUndirected, isUnique, parse, removeEdgeAt, removeLinkAt, rewire, rewireDirected, rewireEdgeAt, rewireLinkAt, rewireUndirected, setAddwire, setConnectivity, setInterspecies, setName, setNetwork2D, setNetwork3D, setRewire, setSingle, setSize, setType, swapEdges, usage, warn
-
Field Details
-
linearAsymmetry
private int linearAsymmetryDifference between the number of neighbours on the left vs right.
-
-
Constructor Details
-
LinearGeometry
Create a linear (1D lattice) geometry attached to the given engine.- Parameters:
engine- EvoLudo pacemaker
-
-
Method Details
-
parse
Description copied from class:AbstractGeometryParse geometry-specific CLI options.- Overrides:
parsein classAbstractGeometry- Parameters:
arg- the argument string without the geometry key- Returns:
trueif parsing succeeded,falseif invalid
-
init
public void init()Generates a linear chain (1D lattice). With asymmetric neighbours and fixed boundaries this represents the simplest suppressor of selection.Requirements/notes:
- Supports different numbers of neighbours to the left and right.
- For inter-species interactions connectivities are incremented by one and
a connectivity of
1is admissible. - Boundaries can be fixed or periodic (default).
- Specified by:
initin classAbstractGeometry
-
setLinearAsymmetry
public void setLinearAsymmetry(int asymmetry) Set the left-right neighbour difference.- Parameters:
asymmetry- positive values favour neighbours on the left
-
getLinearAsymmetry
public int getLinearAsymmetry()Get the current left-right neighbour difference.- Returns:
- the left-right neighbour difference
-
checkSettings
protected boolean checkSettings()Description copied from class:AbstractGeometryHook for subclasses to implement geometry specific checks.- Overrides:
checkSettingsin classAbstractGeometry- Returns:
trueif adjustments require a reset
-
clone
Description copied from class:AbstractGeometryClone geometry.Requirements/notes:
- Overrides:
clonein classAbstractLattice- Returns:
- clone of geometry
-
hashCode
public int hashCode()- Overrides:
hashCodein classAbstractLattice
-
equals
- Overrides:
equalsin classAbstractLattice
-