Search Results for

    Show / Hide Table of Contents

    Class Rule12

    Implements rules 1 and 2 of the MonotoneToLine algorithm.

    These rules handle columns where different particles hold the left and right line bonds. A shear transformation is used on the column so that both bonds end up on the same particle. Rule 1: If the left line bond is above the right line bond, shear clockwise until they are on the same particle. Rule 2: If the right line bond is above the left line bond, shear counterclockwise until the left line bond is above the right line bond, then perform a second shear clockwise until they are on the same particle.

    Inheritance
    object
    Suboracle<Rule12>
    Rule12
    Namespace: AS2.Suboracles.Reconfiguration
    Assembly: .dll
    Syntax
    public class Rule12 : Suboracle<Rule12>

    Constructors

    | Edit this page View Source

    Rule12(Particle)

    Declaration
    public Rule12(Particle rep)
    Parameters
    Type Name Description
    Particle rep

    Fields

    | Edit this page View Source

    l

    Declaration
    private ParticleAttribute<int> l
    Field Value
    Type Description
    ParticleAttribute<int>
    | Edit this page View Source

    r

    Declaration
    private ParticleAttribute<int> r
    Field Value
    Type Description
    ParticleAttribute<int>
    | Edit this page View Source

    round

    Declaration
    private ParticleAttribute<int> round
    Field Value
    Type Description
    ParticleAttribute<int>
    | Edit this page View Source

    shearSuboracle

    Declaration
    private Shear shearSuboracle
    Field Value
    Type Description
    Shear
    | Edit this page View Source

    xDir

    Declaration
    private Direction xDir
    Field Value
    Type Description
    Direction
    | Edit this page View Source

    yDir

    Declaration
    private Direction yDir
    Field Value
    Type Description
    Direction

    Methods

    | Edit this page View Source

    Init(List<Rule12>, int, int, Direction, Direction)

    Initializes the suboracle for a new run. Determines the shear direction from the positions of l and r.

    Declaration
    public void Init(List<Rule12> memberParticles, int l, int r, Direction xDir = Direction.E, Direction yDir = Direction.NNE)
    Parameters
    Type Name Description
    List<Rule12> memberParticles

    The particles that are part of this suboracle instance.

    int l

    The y-index of the particle with the left line bond.

    int r

    The y-index of the particle with the right line bond.

    Direction xDir

    The direction of the x-axis.

    Direction yDir

    The direction of the y-axis.

    | Edit this page View Source

    OnActivate()

    Executes the next round of the rule. Round 0: Releases bonds and activates the shear suboracle. Round 1: Waits for the shear to complete; if rule 2, proceeds to round 2. Round 2 (rule 2 only): Performs a second shear in the opposite direction. Round 3 (rule 2 only): Waits for the second shear to complete.

    Declaration
    protected override bool OnActivate()
    Returns
    Type Description
    bool

    True if the rule is complete, false otherwise.

    Overrides
    Suboracle<Rule12>.OnActivate()
    • Edit this page
    • View Source
    In this article
    Back to top AmoebotSim 2.0 Documentation v1.12
    Copyright © 2025 AmoebotSim 2.0 Authors
    Generated by DocFX