Search Results for

    Show / Hide Table of Contents

    Class MyMessage

    Inheritance
    object
    Message
    MyMessage
    Namespace: AS2.Algos.LineFormation
    Assembly: .dll
    Syntax
    public class MyMessage : Message

    Constructors

    | Edit this page View Source

    MyMessage()

    Declaration
    public MyMessage()
    | Edit this page View Source

    MyMessage(Direction)

    Declaration
    public MyMessage(MyMessage.Direction dir)
    Parameters
    Type Name Description
    MyMessage.Direction dir

    Fields

    | Edit this page View Source

    dir

    Declaration
    public MyMessage.Direction dir
    Field Value
    Type Description
    MyMessage.Direction

    Methods

    | Edit this page View Source

    Copy()

    Creates a deep copy of this message.

    The main purpose of this method is to prevent particles from sharing instances of messages due to reference semantics. Changing data in a message a particle has received (for example to forward the altered message later) can cause errors if this method does not create a deep copy of the original message.

    Declaration
    public override Message Copy()
    Returns
    Type Description
    Message

    A deep copy of this message.

    Overrides
    Message.Copy()
    | Edit this page View Source

    Equals(Message)

    Checks whether this message is equivalent to the given other message.

    This method should only return true if the two compared messages are equivalent in the sense that any particle receiving one of the messages will behave exactly as if it had received the other message. In other words, the messages have to be equivalent with respect to the total order defined on all possible messages.

    Note that this method and GreaterThan(Message) must not both return true when comparing the same instances.

    Declaration
    public override bool Equals(Message other)
    Parameters
    Type Name Description
    Message other

    The message that should be compared to this one.

    Returns
    Type Description
    bool

    true if and only if the two messages are equivalent with respect to the total ordering of all messages.

    Overrides
    Message.Equals(Message)
    | Edit this page View Source

    GreaterThan(Message)

    Checks whether this message has a higher priority than the given other message.

    This is the main comparison operator defining the total order on the set of all possible messages. If the order is not strict, the message that is received in the case that multiple messages are sent on the same circuit in the same round may not be well-defined.

    Note that this method and Equals(Message) must not both return true when comparing the same instances.

    Declaration
    public override bool GreaterThan(Message other)
    Parameters
    Type Name Description
    Message other

    The message that should be compared to this one.

    Returns
    Type Description
    bool

    true if and only if this message has a strictly higher priority than the given other message.

    Overrides
    Message.GreaterThan(Message)
    • Edit this page
    • View Source
    In this article
    Back to top AmoebotSim 2.0 Documentation v1.11
    Copyright © 2025 AmoebotSim 2.0 Authors
    Generated by DocFX