Search Results for

    Show / Hide Table of Contents

    Class BinAttributeInt

    A binary encoded attribute for integers using less space than a full int.

    Inheritance
    object
    BinAttribute<int>
    BinAttributeInt
    Namespace: AS2.Subroutines.BinStateHelpers
    Assembly: .dll
    Syntax
    public class BinAttributeInt : BinAttribute<int>

    Constructors

    | Edit this page View Source

    BinAttributeInt(ParticleAttribute<int>, int, int)

    Creates a new attribute wrapper referencing the given state attribute int.

    Declaration
    public BinAttributeInt(ParticleAttribute<int> attr, int idx, int width)
    Parameters
    Type Name Description
    ParticleAttribute<int> attr The attribute storing the integer that contains this value as a subset of bits.
    int idx The bit index at which the encoding of this value starts.
    int width

    The number of bits occupied by the integer.

    Fields

    | Edit this page View Source

    bit_mask

    Declaration
    protected int bit_mask
    Field Value
    Type Description
    int

    Methods

    | Edit this page View Source

    GetCurrentValue()

    Returns the latest value.

    Declaration
    public override int GetCurrentValue()
    Returns
    Type Description
    int

    The value decoded from the int's latest value.

    Overrides
    BinAttribute<int>.GetCurrentValue()
    | Edit this page View Source

    GetValue()

    Returns the value from the beginning of the current round.

    Declaration
    public override int GetValue()
    Returns
    Type Description
    int

    The value decoded from the int's snapshot value.

    Overrides
    BinAttribute<int>.GetValue()
    | Edit this page View Source

    SetValue(int)

    Writes a new value to the state integer.

    Declaration
    public override void SetValue(int value)
    Parameters
    Type Name Description
    int value

    The new value to be written.

    Overrides
    BinAttribute<int>.SetValue(int)
    • 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