Search Results for

    Show / Hide Table of Contents

    Class SubSPFPropagation

    Implements the propagation primitive that propagates a shortest path forest from one region into an adjacent region through the portal that separates them. It is possible to run this procedure on both sides of a portal (or even 4 sides of a marker) if the source region is the portal itself. However, only the first phase can run simultaneously. For the second phase, a coloring of the portal graph that colors adjacent regions differently is required, such that only regions of the same color run the procedure at the same time.

    Inheritance
    object
    Subroutine
    SubSPFPropagation
    Namespace: AS2.Subroutines.SPFPropagation
    Assembly: .dll
    Syntax
    public class SubSPFPropagation : Subroutine

    Constructors

    | Edit this page View Source

    SubSPFPropagation(Particle, SubPASC2, SubETT)

    Declaration
    public SubSPFPropagation(Particle p, SubPASC2 pasc = null, SubETT ett = null)
    Parameters
    Type Name Description
    Particle p
    SubPASC2 pasc
    SubETT ett

    Fields

    | Edit this page View Source

    childDirections

    Declaration
    private BinAttributeBitField childDirections
    Field Value
    Type Description
    BinAttributeBitField
    | Edit this page View Source

    comparison

    Declaration
    private BinAttributeEnum<SubSPFPropagation.ComparisonResult> comparison
    Field Value
    Type Description
    BinAttributeEnum<SubSPFPropagation.ComparisonResult>
    | Edit this page View Source

    controlColor

    Declaration
    private BinAttributeBool controlColor
    Field Value
    Type Description
    BinAttributeBool
    | Edit this page View Source

    finished

    Declaration
    private BinAttributeBool finished
    Field Value
    Type Description
    BinAttributeBool
    | Edit this page View Source

    ignoreDirections

    Declaration
    private BinAttributeBitField ignoreDirections
    Field Value
    Type Description
    BinAttributeBitField
    | Edit this page View Source

    inSourceRegion

    Declaration
    private BinAttributeBool inSourceRegion
    Field Value
    Type Description
    BinAttributeBool
    | Edit this page View Source

    inVisibleRegion

    Declaration
    private BinAttributeBool inVisibleRegion
    Field Value
    Type Description
    BinAttributeBool
    | Edit this page View Source

    instanceIndex

    Declaration
    private BinAttributeInt instanceIndex
    Field Value
    Type Description
    BinAttributeInt
    | Edit this page View Source

    isSource

    Declaration
    private BinAttributeBool isSource
    Field Value
    Type Description
    BinAttributeBool
    | Edit this page View Source

    onMainPortal

    Declaration
    private BinAttributeBool onMainPortal
    Field Value
    Type Description
    BinAttributeBool
    | Edit this page View Source

    onOtherPortal

    Declaration
    private BinAttributeBool onOtherPortal
    Field Value
    Type Description
    BinAttributeBool
    | Edit this page View Source

    onTwoAxes

    Declaration
    private BinAttributeBool onTwoAxes
    Field Value
    Type Description
    BinAttributeBool
    | Edit this page View Source

    parentDir1

    Declaration
    private BinAttributeDirection parentDir1
    Field Value
    Type Description
    BinAttributeDirection
    | Edit this page View Source

    parentDir2

    Declaration
    private BinAttributeDirection parentDir2
    Field Value
    Type Description
    BinAttributeDirection
    | Edit this page View Source

    pasc

    Declaration
    private SubPASC2 pasc
    Field Value
    Type Description
    SubPASC2
    | Edit this page View Source

    pascParticipant

    Declaration
    private BinAttributeBool pascParticipant
    Field Value
    Type Description
    BinAttributeBool
    | Edit this page View Source

    portalDir

    Declaration
    private BinAttributeDirection portalDir
    Field Value
    Type Description
    BinAttributeDirection
    | Edit this page View Source

    regionBelowOtherPortal

    Declaration
    private BinAttributeBool regionBelowOtherPortal
    Field Value
    Type Description
    BinAttributeBool
    | Edit this page View Source

    regionBelowSourcePortal

    Declaration
    private BinAttributeBool regionBelowSourcePortal
    Field Value
    Type Description
    BinAttributeBool
    | Edit this page View Source

    round

    Declaration
    private BinAttributeInt round
    Field Value
    Type Description
    BinAttributeInt
    | Edit this page View Source

    singleSourceSPF

    Declaration
    private Sub1SPF singleSourceSPF
    Field Value
    Type Description
    Sub1SPF
    | Edit this page View Source

    sourceRegionIsPortal

    Declaration
    private BinAttributeBool sourceRegionIsPortal
    Field Value
    Type Description
    BinAttributeBool
    | Edit this page View Source

    state1

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

    state2

    Declaration
    private ParticleAttribute<int> state2
    Field Value
    Type Description
    ParticleAttribute<int>

    Methods

    | Edit this page View Source

    ActivateReceive()

    Declaration
    public void ActivateReceive()
    | Edit this page View Source

    ActivateSend()

    Declaration
    public void ActivateSend()
    | Edit this page View Source

    DirUp1()

    Helper computing the "left up" direction relative to the main portal.

    Declaration
    private Direction DirUp1()
    Returns
    Type Description
    Direction

    The "left" direction that points towards the main portal from the target region.

    | Edit this page View Source

    DirUp2()

    Helper computing the "right up" direction relative to the main portal.

    Declaration
    private Direction DirUp2()
    Returns
    Type Description
    Direction

    The "right" direction that points towards the main portal from the target region.

    | Edit this page View Source

    GetColor()

    Declaration
    public Color GetColor()
    Returns
    Type Description
    Color
    | Edit this page View Source

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

    Declaration
    public void Init(Direction portalDir, int instanceIndex, bool onMainPortal, bool onOtherPortal, bool isSource, bool regionBelowSourcePortal, bool regionBelowOtherPortal, bool sourceRegionIsPortal, bool controlColor = false, List<Direction> ignoreDirections = null, bool inSourceRegion = false, Direction parentDir1 = Direction.NONE)
    Parameters
    Type Name Description
    Direction portalDir
    int instanceIndex
    bool onMainPortal
    bool onOtherPortal
    bool isSource
    bool regionBelowSourcePortal
    bool regionBelowOtherPortal
    bool sourceRegionIsPortal
    bool controlColor
    List<Direction> ignoreDirections
    bool inSourceRegion
    Direction parentDir1
    | Edit this page View Source

    IsFinished()

    Checks whether the propagation routine is finished.

    Declaration
    public bool IsFinished()
    Returns
    Type Description
    bool

    true if and only if we are finished with both phases of the propagation routine.

    | Edit this page View Source

    IsFirstPhaseFinished()

    Checks whether the first phase of the propagation routine (handling the visible region) is finished.

    Declaration
    public bool IsFirstPhaseFinished()
    Returns
    Type Description
    bool

    true if and only if we are finished with the first phase of the propagation routine.

    | Edit this page View Source

    Parent()

    Gets the parent direction produced by the propagation procedure.

    Declaration
    public Direction Parent()
    Returns
    Type Description
    Direction

    The direction of this amoebot's parent after the propagation.

    | Edit this page View Source

    SetColor()

    Declaration
    private void SetColor()
    | Edit this page View Source

    SetupAxisCircuit(PinConfiguration, bool, bool)

    Sets up two axis circuits for the axes that do not contain the portal direction. Will not connect pins in ignored directions. The partition set IDs are 2i and 2i + 1, where i is our instance index.

    Declaration
    private void SetupAxisCircuit(PinConfiguration pc, bool split1 = false, bool split2 = false)
    Parameters
    Type Name Description
    PinConfiguration pc

    The pin configuration to modify.

    bool split1

    Whether the connection on the "left" axis circuit should be split.

    bool split2

    Whether the connection on the "right" axis circuit should be split.

    | Edit this page View Source

    SetupPC(PinConfiguration)

    Declaration
    public void SetupPC(PinConfiguration pc)
    Parameters
    Type Name Description
    PinConfiguration pc
    | Edit this page View Source

    SetupRegionalCircuit(PinConfiguration)

    Sets up a circuit that connects the entire region. The partition set ID is the instance index + 10. This might not be setup correctly if the amoebot has no neighbors in this region. The circuit uses the middle 2 pins for amoebots outside a portal and the middle pin closer to the region for amoebots on a bounding portal.

    Declaration
    private void SetupRegionalCircuit(PinConfiguration pc)
    Parameters
    Type Name Description
    PinConfiguration pc

    The pin configuration to modify.

    • 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