Class HexagonalGeometry
Object
AbstractGeometry
AbstractLattice
HexagonalGeometry
Honeycomb/hexagonal lattice geometry with optional fixed boundaries.
-
Field Summary
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
ConstructorsConstructorDescriptionHexagonalGeometry(EvoLudo engine) Create a hexagonal (honeycomb) geometry tied to the given engine. -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanHook for subclasses to implement geometry specific checks.private voidfillEvenIRows(int side, boolean interspecies, int x, int u, boolean uNowrap, int d) Populate even-index rows for the hexagonal lattice, respecting boundary conditions.private voidfillOddIRows(int side, boolean interspecies, int x, int u, int d, boolean dNowrap) Populate odd-index rows for the hexagonal lattice, respecting boundary conditions.voidinit()Generates a hexagonal (honeycomb) regular lattice with degree \(6\) (or optional self-links when connectivity is set to1).private voidinitK1()Initialize the lattice with self-links only (connectivity 1).booleanParse geometry-specific CLI options.Methods inherited from class AbstractLattice
clone, equals, hashCode, 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
-
Constructor Details
-
HexagonalGeometry
Create a hexagonal (honeycomb) geometry tied 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 hexagonal (honeycomb) regular lattice with degree \(6\) (or optional self-links when connectivity is set to1). Fixed boundaries truncate neighbours; periodic boundaries wrap the lattice.- Specified by:
initin classAbstractGeometry
-
initK1
private void initK1()Initialize the lattice with self-links only (connectivity 1). -
fillEvenIRows
private void fillEvenIRows(int side, boolean interspecies, int x, int u, boolean uNowrap, int d) Populate even-index rows for the hexagonal lattice, respecting boundary conditions.- Parameters:
side- side length of the latticeinterspecies-trueif interspecific interactions allow self-linksx- offset for the current rowu- index offset for the row aboveuNowrap-trueif wrapping upward is allowedd- index offset for the row below
-
fillOddIRows
private void fillOddIRows(int side, boolean interspecies, int x, int u, int d, boolean dNowrap) Populate odd-index rows for the hexagonal lattice, respecting boundary conditions.- Parameters:
side- side length of the latticeinterspecies-trueif interspecific interactions allow self-linksx- offset for the current rowu- index offset for the row aboved- index offset for the row belowdNowrap-trueif wrapping downward is allowed
-
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
-