Class StrongAmplifierGeometry
Object
AbstractGeometry
StrongAmplifierGeometry
Strong undirected amplifier graph based on Giakkoupis (2016).
- See Also:
-
Field Summary
Fields 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
ConstructorsConstructorDescriptionStrongAmplifierGeometry(EvoLudo engine) Create a strong amplifier geometry tied to the given engine. -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanHook for subclasses to implement geometry specific checks.voidinit()Generates a strong undirected amplifier of selection as described by Giakkoupis (2016).private voidinitRRGCore(RNGDistribution rng, int start, int end, int degree) Initialise the random-regular core subgraph.private booleanrewireNeighbourEdge(RNGDistribution rng, int nodeA, int nodeB, int[] done, int nDone) Attempt to rewire edges so thatnodeAandnodeBcan connect without duplicating links.Methods inherited from class AbstractGeometry
addDirected, addEdgeAt, addLinkAt, addUndirected, alloc, check, clearLinksFrom, clearLinksTo, clone, create, create, decodeGeometry, deriveCompetitionGeometry, displaySingle, encodeGeometry, enforceSize, equals, getAddwire, getConnectivity, getEncodeKey, getFeatures, getLabel, getName, getNetwork2D, getNetwork3D, getRewire, getSize, getSpecs, getType, hashCode, isConsistent, isGraphConnected, isInterspecies, isLattice, isNeighborOf, isRegular, isRewired, isSingle, isType, isUndirected, isUnique, parse, parse, removeEdgeAt, removeLinkAt, rewire, rewireDirected, rewireEdgeAt, rewireLinkAt, rewireUndirected, setAddwire, setConnectivity, setInterspecies, setName, setNetwork2D, setNetwork3D, setRewire, setSingle, setSize, setType, swapEdges, usage, warn
-
Constructor Details
-
StrongAmplifierGeometry
Create a strong amplifier geometry tied to the given engine.- Parameters:
engine- EvoLudo pacemaker
-
-
Method Details
-
init
public void init()Generates a strong undirected amplifier of selection as described by Giakkoupis (2016). Population size satisfies \(N=n^3+(1+a)n^2\) with integer \(n\) and suitable \(a\geq 5\) and comprises three node types \(U=n^3\), \(V=n^2\) and \(W=N-U-V\). Nodes in \(U\) are leaves attached to nodes in \(V\) while nodes in \(V\) connect to \(n^2\) nodes in the regular core \(W\).- Specified by:
initin classAbstractGeometry- See Also:
-
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
-
initRRGCore
Initialise the random-regular core subgraph.- Parameters:
rng- random number generatorstart- first node index of the coreend- (exclusive) end index of the coredegree- desired degree per node
-
rewireNeighbourEdge
private boolean rewireNeighbourEdge(RNGDistribution rng, int nodeA, int nodeB, int[] done, int nDone) Attempt to rewire edges so thatnodeAandnodeBcan connect without duplicating links.- Parameters:
rng- random number generatornodeA- first node needing neighboursnodeB- second node needing neighboursdone- array of already satisfied nodesnDone- number of valid entries indone- Returns:
trueif rewiring succeeded
-