Class ShearTest
Simple algorithm to test the Shear suboracle.
All particles along a contiguous line are marked as members.
The root particle acts as the anchor.
Inheritance
object
ShearTest
Assembly: .dll
Syntax
public class ShearTest : ParticleAlgorithm
Constructors
|
Edit this page
View Source
ShearTest(Particle)
Declaration
public ShearTest(Particle p)
Parameters
Fields
|
Edit this page
View Source
clockwise
Declaration
private ParticleAttribute<bool> clockwise
Field Value
|
Edit this page
View Source
count
Declaration
private ParticleAttribute<int> count
Field Value
|
Edit this page
View Source
isAnchor
Declaration
private ParticleAttribute<bool> isAnchor
Field Value
|
Edit this page
View Source
isRoot
Declaration
private ParticleAttribute<bool> isRoot
Field Value
|
Edit this page
View Source
m
Declaration
private ParticleAttribute<bool> m
Field Value
|
Edit this page
View Source
round
Declaration
private ParticleAttribute<int> round
Field Value
|
Edit this page
View Source
shearSuboracle
Declaration
private Shear shearSuboracle
Field Value
|
Edit this page
View Source
stickEndHead
Declaration
private ParticleAttribute<bool> stickEndHead
Field Value
Properties
|
Edit this page
View Source
GenerationMethod
Declaration
public static string GenerationMethod { get; }
Property Value
|
Edit this page
View Source
Name
Declaration
public static string Name { get; }
Property Value
|
Edit this page
View Source
PinsPerEdge
The number of pins on each edge.
This number must be the same constant for all
particles.
Declaration
public override int PinsPerEdge { get; }
Property Value
Overrides
Methods
|
Edit this page
View Source
ActivateBeep()
This is the second part of the main activation logic of the
particle. It is called exactly once in each round, after the
movements scheduled in ActivateMove() have been
executed, and should contain the algorithm code that
implements the look-compute-beep cycle.
Inside of this method, particles are allowed to change their
pin configuration and send beeps and messages on the updated
configuration.
Note that beeps and messages sent in the current round will
be readable in both the ActivateMove() and
ActivateBeep() calls in the next round.
Declaration
public override void ActivateBeep()
Overrides
|
Edit this page
View Source
ActivateMove()
This is one part of the main activation logic of the particle.
It is called exactly once in each round and should contain the
algorithm code that implements the look-compute-move cycle.
After the movements are executed, ActivateBeep()
is called within the same round.
Inside of this method, particles are allowed to release bonds,
define which bonds should be marked, and schedule movements.
Only the last movement operation scheduled in this method will
be applied.
Declaration
public override void ActivateMove()
Overrides
|
Edit this page
View Source
Init(bool, bool, bool, bool, int, bool)
Declaration
public void Init(bool isRoot, bool isAnchor, bool m, bool clockwise, int count = 1, bool stickEndHead = false)
Parameters
| Type |
Name |
Description |
| bool |
isRoot |
|
| bool |
isAnchor |
|
| bool |
m |
|
| bool |
clockwise |
|
| int |
count |
|
| bool |
stickEndHead |
|
|
Edit this page
View Source
Oracle(ParticleSystem)
Executes the oracle rounds for the shear test.
Round 0: Collects members, initializes and activates the shear suboracle.
Round 1: Continues activating the shear suboracle until it finishes.
Declaration
public static bool Oracle(ParticleSystem system)
Parameters
Returns
| Type |
Description |
| bool |
True if the shear test is complete, false otherwise.
|